003 File Manager
Current Path:
/usr/src/tests/sys/geom/class/eli
usr
/
src
/
tests
/
sys
/
geom
/
class
/
eli
/
📁
..
📄
Makefile
(817 B)
📄
Makefile.depend
(317 B)
📄
attach_test.sh
(2.97 KB)
📄
conf.sh
(2.17 KB)
📄
configure_test.sh
(1.28 KB)
📄
delkey_test.sh
(3.03 KB)
📄
detach_test.sh
(1.03 KB)
📄
gentestvect.py
(1.58 KB)
📄
hmac_test.c
(706 B)
📄
init_test.sh
(10.91 KB)
📄
integrity_test.sh
(4.06 KB)
📄
kill_test.sh
(2.48 KB)
📄
misc_test.sh
(4.85 KB)
📄
onetime_test.sh
(4.07 KB)
📄
online_resize_test.sh
(8.73 KB)
📄
reentrancy_test.sh
(1.53 KB)
📄
resize_test.sh
(2.56 KB)
📄
setkey_test.sh
(4.6 KB)
📄
testvect.h
(471.52 KB)
Editing: reentrancy_test.sh
# $FreeBSD$ # Test various operations for geli-on-geli providers, to ensure that geli is # reentrant. . $(atf_get_srcdir)/conf.sh init_test() { cipher=$1 aalgo=$2 secsize=$3 ealgo=${cipher%%:*} keylen=${cipher##*:} atf_check dd if=/dev/random of=testdata bs=$secsize count=1 status=none atf_check dd if=/dev/random of=keyfile bs=$secsize count=16 status=none # Create the lower geli device atf_check -s exit:0 -e ignore \ geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K keyfile \ -s $secsize ${md} atf_check geli attach -p -k keyfile ${md} # Create the upper geli device atf_check -s exit:0 -e ignore \ geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K keyfile \ -s $secsize ${md}.eli atf_check geli attach -p -k keyfile ${md}.eli echo ${md} > layered_md_device # Ensure we can read and write. atf_check dd if=testdata of=/dev/${md}.eli.eli bs=$secsize count=1 \ status=none atf_check dd if=/dev/${md}.eli.eli of=cmpdata bs=$secsize count=1 \ status=none atf_check cmp -s testdata cmpdata geli detach ${md}.eli 2>/dev/null } atf_test_case init cleanup init_head() { atf_set "descr" "Initialize a geli provider on top of another" atf_set "require.user" "root" atf_set "timeout" 600 } init_body() { sectors=2 geli_test_setup for_each_geli_config init_test } init_cleanup() { if [ -f layered_md_device ]; then while read provider; do [ -c /dev/${md}.eli.eli ] && \ geli detach $md.eli.eli 2>/dev/null done < layered_md_device fi geli_test_cleanup } atf_init_test_cases() { atf_add_test_case init }
Upload File
Create Folder