1 2. $(atf_get_srcdir)/conf.sh 3 4atf_test_case configure_b_B cleanup 5configure_b_B_head() 6{ 7 atf_set "descr" "geli configure -b will set the BOOT flag" 8 atf_set "require.user" "root" 9} 10configure_b_B_body() 11{ 12 geli_test_setup 13 14 sectors=100 15 md=$(attach_md -t malloc -s `expr $sectors + 1`) 16 17 atf_check geli init -B none -P -K /dev/null ${md} 18 19 atf_check -s exit:0 -o match:'flags: 0x200$' geli dump ${md} 20 21 atf_check geli init -B none -b -P -K /dev/null ${md} 22 23 atf_check -s exit:0 -o match:'flags: 0x202$' geli dump ${md} 24 25 atf_check geli configure -B ${md} 26 27 atf_check -s exit:0 -o match:'flags: 0x200$' geli dump ${md} 28 29 atf_check geli configure -b ${md} 30 31 atf_check -s exit:0 -o match:'flags: 0x202$' geli dump ${md} 32 33 atf_check geli attach -p -k /dev/null ${md} 34 35 atf_check -s exit:0 -o match:'^Flags: .*BOOT' geli list ${md}.eli 36 37 atf_check geli configure -B ${md} 38 39 atf_check -o not-match:'^Flags: .*BOOT' geli list ${md}.eli 40 41 atf_check -s exit:0 -o match:'flags: 0x200$' geli dump ${md} 42 43 atf_check geli configure -b ${md} 44 45 atf_check -s exit:0 -o match:'^Flags: .*BOOT' geli list ${md}.eli 46 47 atf_check -s exit:0 -o match:'flags: 0x202$' geli dump ${md} 48 49 atf_check geli detach ${md} 50} 51configure_b_B_cleanup() 52{ 53 geli_test_cleanup 54} 55 56atf_init_test_cases() 57{ 58 atf_add_test_case configure_b_B 59} 60