From 74537dec09ceb7b176a0cf6819b56f389754bb4e Mon Sep 17 00:00:00 2001 From: kn Date: Mon, 21 Aug 2023 15:59:38 +0000 Subject: [PATCH] cover expected failures for volume recreation and the empty passphrase --- regress/sbin/bioctl/Makefile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/regress/sbin/bioctl/Makefile b/regress/sbin/bioctl/Makefile index 837fa50fc8c..69b48da4a07 100644 --- a/regress/sbin/bioctl/Makefile +++ b/regress/sbin/bioctl/Makefile @@ -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 -- 2.20.1