Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: robustness enhancement of regression tests #4433

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/basic/ctime/ctime-heal-symlinks.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ TEST rm -f $B0/${V0}2/SOFTLINK
TEST stat SOFTLINK

# To heal and clear new-entry mark on source bricks.
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 2
TEST $CLI volume heal $V0
EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0

Expand Down Expand Up @@ -49,6 +52,7 @@ TEST rm -f $B0/${V0}2/SOFTLINK
TEST stat SOFTLINK

# To heal and clear new-entry mark on source bricks.
EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count_shd $V0 0
TEST $CLI volume heal $V0
EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0

Expand Down
2 changes: 2 additions & 0 deletions tests/basic/global-threading.t
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ TEST check_threads $(get_brick_pid $V0 $H0 $B0/b0) glfs_iotwr 1
TEST check_threads $(get_brick_pid $V0 $H0 $B0/b1) glfs_iotwr 1

# Self-heal should be using global threads
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
TEST check_threads $(get_shd_process_pid) glfs_tpw 1
TEST check_threads $(get_shd_process_pid) glfs_iotwr 0 0

Expand Down
2 changes: 2 additions & 0 deletions tests/basic/graph-cleanup-brick-down-shd-mux.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ TEST $CLI volume set $V0 cluster.eager-lock off
TEST $CLI volume set $V0 performance.flush-behind off
TEST $CLI volume start $V0

EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^6$" number_healer_threads_shd $V0 "afr_shd_index_healer"

for i in $(seq 1 2); do
TEST $CLI volume create ${V0}_afr$i replica 3 $H0:$B0/${V0}_afr${i}{0,1,2,3,4,5}
TEST $CLI volume start ${V0}_afr$i
Expand Down
13 changes: 2 additions & 11 deletions tests/bugs/fuse/bug-858215.t
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,8 @@ TEST touch $M0/newfile;
TEST stat $M0/newfile;
TEST rm $M0/newfile;

nfs_pid=$(cat $GLUSTERD_PIDFILEDIR/nfs/nfs.pid || echo -1);
glustershd_pid=`ps auxwww | grep glustershd | grep -v grep | awk -F " " '{print $2}'`
TEST [ $glustershd_pid != 0 ];
pids=$(pidof glusterfs);
for i in $pids
do
if [ $i -ne $nfs_pid ] && [ $i -ne $glustershd_pid ]; then
mount_pid=$i;
break;
fi
done
mount_pid=`ps auxwww | grep glusterfs| grep $M0 | grep -v grep | awk -F " " '{print $2}'`
TEST [ $mount_pid != 0 ];

dump_dir='/tmp/gerrit_glusterfs'
cat >$statedumpdir/glusterdump.options <<EOF
Expand Down
4 changes: 4 additions & 0 deletions tests/bugs/heal-symlinks.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ TEST rm -f $B0/${V0}2/SOFTLINK
TEST stat SOFTLINK

# To heal and clear new-entry mark on source bricks.
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 2
TEST $CLI volume heal $V0
EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0

Expand Down Expand Up @@ -49,6 +52,7 @@ TEST rm -f $B0/${V0}2/SOFTLINK
TEST stat SOFTLINK

# To heal and clear new-entry mark on source bricks.
EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count_shd $V0 0
TEST $CLI volume heal $V0
EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0

Expand Down
8 changes: 4 additions & 4 deletions tests/bugs/replicate/bug-1325792.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ TEST $CLI volume start $V0

TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 --entry-timeout=0 $M0;

EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status $V0 0
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status $V0 1
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status $V0 2
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status $V0 3
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 2
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 3


EXPECT 1 echo `$CLI volume heal $V0 statistics heal-count replica $H0:$B0/${V0}0 | grep -A 1 ${V0}0 | grep "entries" | wc -l`
Expand Down
1 change: 1 addition & 0 deletions tests/include.rc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# clang-format off
export LANG=en_US.UTF-8
checkpoint_time="$(date +%s%N)"

M0=${M0:=/mnt/glusterfs/0}; # 0th mount point for FUSE
Expand Down