git: b9b5a4dd590e - main - gmultipath failloop test: Put the dtrace sanity checker in right place

Li-Wen Hsu lwhsu at FreeBSD.org
Tue Sep 28 18:38:43 UTC 2021


The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/src/commit/?id=b9b5a4dd590e1b30d92dc73b3d1f22d3303e7e41

commit b9b5a4dd590e1b30d92dc73b3d1f22d3303e7e41
Author:     Li-Wen Hsu <lwhsu at FreeBSD.org>
AuthorDate: 2021-09-28 18:38:34 +0000
Commit:     Li-Wen Hsu <lwhsu at FreeBSD.org>
CommitDate: 2021-09-28 18:38:34 +0000

    gmultipath failloop test: Put the dtrace sanity checker in right place
    
    Check if dtrace excution is successful or not right after execution.
    
    Sponsored by:   The FreeBSD Foundation
---
 tests/sys/geom/class/multipath/failloop.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/sys/geom/class/multipath/failloop.sh b/tests/sys/geom/class/multipath/failloop.sh
index 632458e1f0b1..48006d6b10da 100755
--- a/tests/sys/geom/class/multipath/failloop.sh
+++ b/tests/sys/geom/class/multipath/failloop.sh
@@ -60,12 +60,12 @@ failloop_body()
 		-i 'geom:multipath:config:restore {@restore = count()}' \
 		-c "dd if=/dev/zero of=/dev/multipath/"$name" bs=4096 count=1" \
 		2>&1 | awk '/exited with status/ {print $NF}'`
-	# The dd command should've failed ...
-	atf_check_equal 1 $dd_status
-	# and triggered 1 or 2 path restores
 	if [ ! -f restore_count ]; then
 		atf_fail "dtrace didn't execute successfully"
 	fi
+	# The dd command should've failed ...
+	atf_check_equal 1 $dd_status
+	# and triggered 1 or 2 path restores
 	if [ `cat restore_count` -gt 2 ]; then
 		atf_fail "gmultipath restored paths too many times"
 	fi


More information about the dev-commits-src-main mailing list