3 atf_test_case configure_b_B cleanup
6 atf_set "descr" "geli configure -b will set the BOOT flag"
7 atf_set "require.user" "root"
11 . $(atf_get_srcdir)/conf.sh
14 md=$(attach_md -t malloc -s `expr $sectors + 1`)
16 atf_check geli init -B none -P -K /dev/null ${md}
18 atf_check -s exit:0 -o match:'flags: 0x0$' geli dump ${md}
20 atf_check geli init -B none -b -P -K /dev/null ${md}
22 atf_check -s exit:0 -o match:'flags: 0x2$' geli dump ${md}
24 atf_check geli configure -B ${md}
26 atf_check -s exit:0 -o match:'flags: 0x0$' geli dump ${md}
28 atf_check geli configure -b ${md}
30 atf_check -s exit:0 -o match:'flags: 0x2$' geli dump ${md}
32 atf_check geli attach -p -k /dev/null ${md}
34 atf_check -s exit:0 -o match:'^Flags: .*BOOT' geli list ${md}.eli
36 atf_check geli configure -B ${md}
38 atf_check -o not-match:'^Flags: .*BOOT' geli list ${md}.eli
40 atf_check -s exit:0 -o match:'flags: 0x0$' geli dump ${md}
42 atf_check geli configure -b ${md}
44 atf_check -s exit:0 -o match:'^Flags: .*BOOT' geli list ${md}.eli
46 atf_check -s exit:0 -o match:'flags: 0x2$' geli dump ${md}
48 atf_check geli detach ${md}
50 configure_b_B_cleanup()
52 . $(atf_get_srcdir)/conf.sh
58 atf_add_test_case configure_b_B