diff options
author | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2024-05-19 12:53:17 +0000 |
---|---|---|
committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2024-05-19 12:53:17 +0000 |
commit | 4b3141f5d5373989598f9447ab5a9f87e2d1c9fb (patch) | |
tree | 842991a011ba8c5f9212aa2629db1e20a84371f0 /tests/sys | |
parent | ff4480baf6f15551aee58707bffc9b15608d89d8 (diff) | |
download | src-4b3141f5d5373989598f9447ab5a9f87e2d1c9fb.tar.gz src-4b3141f5d5373989598f9447ab5a9f87e2d1c9fb.zip |
Diffstat (limited to 'tests/sys')
-rw-r--r-- | tests/sys/geom/class/eli/attach_test.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/sys/geom/class/eli/attach_test.sh b/tests/sys/geom/class/eli/attach_test.sh index eb59234f014b..b6b1848f2d37 100644 --- a/tests/sys/geom/class/eli/attach_test.sh +++ b/tests/sys/geom/class/eli/attach_test.sh @@ -39,6 +39,34 @@ attach_d_cleanup() geli_test_cleanup } +atf_test_case atach_multiple_fails cleanup +attach_multiple_fails_head() +{ + atf_set "descr" "test multiple failed attach of geli provider" + atf_set "require.user" "root" +} +attach_multiple_fails_body() +{ + geli_test_setup + + sectors=1000 + attach_md 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 ${md} + atf_check geli attach -d -p -k keyfile ${md} + + for i in $(jot 100); do + atf_check -s not-exit:0 -e ignore -- geli attach -d -p -k keyfile ${md} + done + atf_check -o ignore -- newfs ${md}.eli +} +attach_multiple_fails_cleanup() +{ + geli_test_cleanup +} + + atf_test_case attach_r cleanup attach_r_head() { @@ -125,5 +153,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 attach_multiple_fails atf_add_test_case nokey } |