From 0149e962e4269562b3590d952a7eda131fa342fe Mon Sep 17 00:00:00 2001 From: kn Date: Mon, 21 Aug 2023 18:56:06 +0000 Subject: [PATCH] cover force recreation (with smallest non-default number of rounds) The idea is for a later diff to inspect -v output wrt. chosen number of rounds in order to a) test -r behaviour and b) confirm that '-Cforce -rN' that a value has been recreated (output is identical for attach an create). --- regress/sbin/bioctl/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/regress/sbin/bioctl/Makefile b/regress/sbin/bioctl/Makefile index 1dccc99d3a0..4109e1396f9 100644 --- a/regress/sbin/bioctl/Makefile +++ b/regress/sbin/bioctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2023/08/21 17:55:51 kn Exp $ +# $OpenBSD: Makefile,v 1.6 2023/08/21 18:56:06 kn Exp $ BIOCTL ?= /sbin/bioctl @@ -18,6 +18,7 @@ create-chunk: SUCCESS_TESTS = scripted-create-volume \ + scripted-recreate-volume \ scripted-change-passphrase REGRESS_TARGETS = ${SUCCESS_TESTS} REGRESS_ROOT_TARGETS = ${SUCCESS_TESTS} @@ -27,6 +28,11 @@ scripted-create-volume: ${SUDO} ${BIOCTL} -s -cC -l"$$(<${CHUNKDEVFILE})a" -- softraid0 | \ grep -o 'sd[0-9]*$$' -- 1>${VOLDEVFILE} +scripted-recreate-volume: detach-volume + printf '%s\n' '${OLDPW}' | \ + ${SUDO} ${BIOCTL} -s -Cforce -r17 -cC -l"$$(<${CHUNKDEVFILE})a" -- softraid0 | \ + grep -o 'sd[0-9]*$$' -- 1>${VOLDEVFILE} + scripted-change-passphrase: printf '%s\n%s\n' '${OLDPW}' '${NEWPW}' | \ ${SUDO} ${BIOCTL} -s -P -- "$$(<${VOLDEVFILE})" @@ -48,8 +54,9 @@ set-empty-passphrase: CLEANFILES = *.txt *.img REGRESS_CLEANUP = cleanup -cleanup: +detach-volume: ${SUDO} ${BIOCTL} -d -- "$$(<${VOLDEVFILE})" 2>/dev/null +cleanup: detach-volume ${SUDO} vnconfig -u -- "$$(<${CHUNKDEVFILE})" 2>/dev/null .include -- 2.20.1