Skip to content

Commit fc81efd

Browse files
author
Paul Dagnelie
committed
Make tests more reliable with draid
Signed-off-by: Paul Dagnelie <[email protected]>
1 parent 961dcd3 commit fc81efd

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

tests/zfs-tests/tests/functional/events/slow_vdev_degraded_sit_out.ksh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ for raidtype in raidz2 raidz3 draid2 draid3 ; do
7878
log_must zinject -d $BAD_VDEV -A $action -T read $TESTPOOL2
7979

8080
# Do some reads and wait for us to sit out
81-
for i in {1..100} ; do
82-
dd if=/$TESTPOOL2/bigfile skip=$i bs=2M count=1 of=/dev/null
81+
for i in {0..99} ; do
82+
dd if=/$TESTPOOL2/bigfile skip=$i bs=2M count=1 of=/dev/null &
83+
dd if=/$TESTPOOL2/bigfile skip=$((i + 100)) bs=2M count=1 of=/dev/null
8384

8485
sit_out=$(get_vdev_prop sit_out $TESTPOOL2 $SLOW_VDEV)
8586
if [[ "$sit_out" == "on" ]] ; then

tests/zfs-tests/tests/functional/events/slow_vdev_sit_out.ksh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ for raidtype in raidz raidz2 raidz3 draid1 draid2 draid3 ; do
7272
log_must zinject -d $BAD_VDEV -D200:1 -T read $TESTPOOL2
7373

7474
# Do some reads and wait for us to sit out
75-
for i in {1..100} ; do
76-
dd if=/$TESTPOOL2/bigfile skip=$i bs=2M count=1 of=/dev/null
75+
for i in {0..99} ; do
76+
dd if=/$TESTPOOL2/bigfile skip=$i bs=2M count=1 of=/dev/null &
77+
dd if=/$TESTPOOL2/bigfile skip=$((i + 100)) bs=2M count=1 of=/dev/null
7778

7879
sit_out=$(get_vdev_prop sit_out $TESTPOOL2 $BAD_VDEV)
7980
if [[ "$sit_out" == "on" ]] ; then

tests/zfs-tests/tests/functional/events/slow_vdev_sit_out_neg.ksh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ log_must eval [[ "$(get_vdev_prop sit_out $TESTPOOL2 $BAD_VDEV3)" == "off" ]]
7373
log_must zinject -d $BAD_VDEV1 -D200:1 -T read $TESTPOOL2
7474

7575
# Do some reads and wait for us to sit out
76-
for i in {1..100} ; do
77-
dd if=/$TESTPOOL2/bigfile skip=$i bs=2M count=1 of=/dev/null
76+
for i in {0..99} ; do
77+
dd if=/$TESTPOOL2/bigfile skip=$i bs=2M count=1 of=/dev/null &
78+
dd if=/$TESTPOOL2/bigfile skip=$((i + 100)) bs=2M count=1 of=/dev/null
7879

7980
sit_out=$(get_vdev_prop sit_out $TESTPOOL2 $BAD_VDEV1)
8081
if [[ "$sit_out" == "on" ]] ; then
@@ -85,8 +86,9 @@ log_must test "$(get_vdev_prop sit_out $TESTPOOL2 $BAD_VDEV1)" == "on"
8586

8687
log_must zinject -d $BAD_VDEV2 -D200:1 -T read $TESTPOOL2
8788
# Do some reads and wait for us to sit out
88-
for i in {1..100} ; do
89-
dd if=/$TESTPOOL2/bigfile skip=$i bs=2M count=1 of=/dev/null
89+
for i in {0..99} ; do
90+
dd if=/$TESTPOOL2/bigfile skip=$i bs=2M count=1 of=/dev/null &
91+
dd if=/$TESTPOOL2/bigfile skip=$((i + 100)) bs=2M count=1 of=/dev/null
9092

9193
sit_out=$(get_vdev_prop sit_out $TESTPOOL2 $BAD_VDEV2)
9294
if [[ "$sit_out" == "on" ]] ; then
@@ -97,8 +99,9 @@ log_must test "$(get_vdev_prop sit_out $TESTPOOL2 $BAD_VDEV2)" == "on"
9799

98100
log_must zinject -d $BAD_VDEV3 -D200:1 -T read $TESTPOOL2
99101
# Do some reads and wait for us to sit out
100-
for i in {1..100} ; do
101-
dd if=/$TESTPOOL2/bigfile skip=$i bs=2M count=1 of=/dev/null
102+
for i in {0..99} ; do
103+
dd if=/$TESTPOOL2/bigfile skip=$i bs=2M count=1 of=/dev/null &
104+
dd if=/$TESTPOOL2/bigfile skip=$((i + 100)) bs=2M count=1 of=/dev/null
102105

103106
sit_out=$(get_vdev_prop sit_out $TESTPOOL2 $BAD_VDEV3)
104107
if [[ "$sit_out" == "on" ]] ; then

0 commit comments

Comments
 (0)