cover expected failures for volume recreation and the empty passphrase
authorkn <kn@openbsd.org>
Mon, 21 Aug 2023 15:59:38 +0000 (15:59 +0000)
committerkn <kn@openbsd.org>
Mon, 21 Aug 2023 15:59:38 +0000 (15:59 +0000)
regress/sbin/bioctl/Makefile

index 837fa50..69b48da 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.2 2023/08/21 05:10:25 anton Exp $
+#      $OpenBSD: Makefile,v 1.3 2023/08/21 15:59:38 kn Exp $
 
 BIOCTL ?=              /sbin/bioctl
 
@@ -17,9 +17,10 @@ create-chunk:
        echo 'RAID *' | ${SUDO} disklabel -wAT- -- "$$(<${CHUNKDEVFILE})"
 
 
-REGRESS_TARGETS =              scripted-create-volume \
+SUCCESS_TESTS =                        scripted-create-volume \
                                scripted-change-passphrase
-REGRESS_ROOT_TARGETS =         ${REGRESS_TARGETS}
+REGRESS_TARGETS =              ${SUCCESS_TESTS}
+REGRESS_ROOT_TARGETS =         ${SUCCESS_TESTS}
 
 scripted-create-volume:
        printf '%s\n' '${OLDPW}' | \
@@ -31,6 +32,19 @@ scripted-change-passphrase:
                ${SUDO} ${BIOCTL} -s -P -- "$$(<${VOLDEVFILE})"
 
 
+FAILURE_TESTS =                        recreate-existing-volume \
+                               set-empty-passphrase
+REGRESS_EXPECTED_FAILURES +=   ${FAILURE_TESTS}
+REGRESS_TARGETS +=             ${FAILURE_TESTS}
+REGRESS_ROOT_TARGETS =         ${FAILURE_TESTS}
+
+recreate-existing-volume:
+       ${SUDO} ${BIOCTL} -cC -l"$$(<${CHUNKDEVFILE})a" -- softraid0
+
+set-empty-passphrase:
+       printf '\n' | ${SUDO} ${BIOCTL} -s -P -- "$$(<${VOLDEVFILE})"
+
+
 CLEANFILES =           *.txt *.img
 REGRESS_CLEANUP =      cleanup