diff options
| author | Alan Somers <asomers@FreeBSD.org> | 2020-01-28 18:32:19 +0000 |
|---|---|---|
| committer | Alan Somers <asomers@FreeBSD.org> | 2020-01-28 18:32:19 +0000 |
| commit | 95e6640be2eaed01e9186f1a437b5863b851285d (patch) | |
| tree | 9a647acf6a7607b3a2b9255569a42bd0c7acd05f /tests | |
| parent | f0ddecd745f1c3027ea744acf2bb3a84308e6b87 (diff) | |
Notes
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/sys/geom/class/eli/attach_test.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/sys/geom/class/eli/attach_test.sh b/tests/sys/geom/class/eli/attach_test.sh index 94c7e88ada3da..b0104710d43b6 100644 --- a/tests/sys/geom/class/eli/attach_test.sh +++ b/tests/sys/geom/class/eli/attach_test.sh @@ -68,6 +68,36 @@ attach_r_cleanup() geli_test_cleanup } +atf_test_case attach_multiple cleanup +attach_multiple_head() +{ + atf_set "descr" "geli attach can attach multiple providers" + atf_set "require.user" "root" +} +attach_multiple_body() +{ + geli_test_setup + + sectors=100 + md0=$(attach_md -t malloc -s `expr $sectors + 1`) + md1=$(attach_md -t malloc -s `expr $sectors + 1`) + md2=$(attach_md -t malloc -s `expr $sectors + 1`) + atf_check dd if=/dev/random of=keyfile bs=512 count=16 status=none + + atf_check geli init -B none -P -K keyfile ${md0} + atf_check geli init -B none -P -K keyfile ${md1} + atf_check geli init -B none -P -K keyfile ${md2} + atf_check geli attach -p -k keyfile ${md0} ${md1} ${md2} + # verify that it did create all 3 geli devices + atf_check -s exit:0 test -c /dev/${md0}.eli + atf_check -s exit:0 test -c /dev/${md1}.eli + atf_check -s exit:0 test -c /dev/${md2}.eli +} +attach_multiple_cleanup() +{ + geli_test_cleanup +} + atf_test_case nokey cleanup nokey_head() { @@ -95,5 +125,6 @@ atf_init_test_cases() { atf_add_test_case attach_d atf_add_test_case attach_r + atf_add_test_case attach_multiple atf_add_test_case nokey } |
