]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - tests/ts/libmount/utils
3 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
5 TS_TOPDIR
="${0%/*}/../.."
8 .
$TS_TOPDIR/functions.sh
11 TESTPROG
="$TS_HELPER_LIBMOUNT_UTILS"
13 [ -x $TESTPROG ] || ts_skip
"test not compiled"
15 ts_init_subtest
"match-fstype"
16 ts_run
$TESTPROG --match-fstype ext3
"ext2,ext3,cifs" &> $TS_OUTPUT
19 ts_init_subtest
"match-fstype-neg"
20 ts_run
$TESTPROG --match-fstype cifs
"ext2,ext3,nocifs" &> $TS_OUTPUT
23 ts_init_subtest
"match-fstype-neg2"
24 ts_run
$TESTPROG --match-fstype cifs
"noext2,ext3,cifs" &> $TS_OUTPUT
27 ts_init_subtest
"match-options"
28 ts_run
$TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ccc" &> $TS_OUTPUT
31 ts_init_subtest
"match-options-list"
32 ts_run
$TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ccc,aaa,ddd" &> $TS_OUTPUT
35 ts_init_subtest
"match-options-neg"
36 ts_run
$TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "noxxx" &> $TS_OUTPUT
39 ts_init_subtest
"match-options-neg-list"
40 ts_run
$TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ddd,noaaa" &> $TS_OUTPUT
43 ts_init_subtest
"match-options-neg-list2"
44 ts_run
$TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "noxxx,ccc,aaa" &> $TS_OUTPUT
47 ts_init_subtest
"starts-with"
48 ts_run
$TESTPROG --starts-with "AAAbbbCCC" "AAA" &> $TS_OUTPUT
51 ts_init_subtest
"ends-with"
52 ts_run
$TESTPROG --ends-with "AAAbbbCCC" "CCC" &> $TS_OUTPUT
55 ts_init_subtest
"mountpoint"
57 ts_run
$TESTPROG --mountpoint /proc
&> $TS_OUTPUT
60 ts_skip_subtest
"no /proc"
63 ts_init_subtest
"mountpoint-subdir"
64 if [ -d /proc
/sys
/kernel
]; then
65 ts_run
$TESTPROG --mountpoint /proc
/sys
/kernel
&> $TS_OUTPUT
68 ts_skip_subtest
"no /proc"
71 ts_init_subtest
"mountpoint-root"
72 ts_run
$TESTPROG --mountpoint / &> $TS_OUTPUT
75 ts_init_subtest
"kernel-cmdline"
76 export LIBMOUNT_KERNEL_CMDLINE
="$TS_SELF/files/kernel_cmdline"
77 ts_run
$TESTPROG --kernel-cmdline selinux
= >> $TS_OUTPUT 2>> $TS_ERRLOG
78 ts_run
$TESTPROG --kernel-cmdline selinux
>> $TS_OUTPUT 2>> $TS_ERRLOG
79 ts_run
$TESTPROG --kernel-cmdline ro
>> $TS_OUTPUT 2>> $TS_ERRLOG
80 ts_run
$TESTPROG --kernel-cmdline ro
= >> $TS_OUTPUT 2>> $TS_ERRLOG
81 ts_run
$TESTPROG --kernel-cmdline root
= >> $TS_OUTPUT 2>> $TS_ERRLOG