]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - tests/ts/libmount/update
3 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
5 TS_TOPDIR
="${0%/*}/../.."
8 .
"$TS_TOPDIR"/functions.sh
11 TESTPROG
="$TS_HELPER_LIBMOUNT_UPDATE"
13 [ -x $TESTPROG ] || ts_skip
"test not compiled"
17 # - the $TS_OUTPUT variable is between ts_init_subtest and ts_finalize_subtest
18 # redefined to subtest specific namespace -- it means that $TS_OUTPUT is a
19 # different file within a subtest.
21 # - all this test uses global $TS_OUTPUT.mountinfo
26 export LIBMOUNT_UTAB
=$TS_OUTPUT.utab
30 ts_init_subtest
"utab-mount"
31 ts_run
$TESTPROG --add /dev
/sda1
/mnt
/foo ext3
"rw,bbb,ccc,fff=FFF,ddd,noexec"
32 ts_run
$TESTPROG --add /dev
/sdb1
/mnt
/bar ext3
"ro,user"
33 ts_run
$TESTPROG --add /dev
/sda2
/mnt
/xyz ext3
"rw,loop=/dev/loop0,uhelper=hal"
34 ts_run
$TESTPROG --add none
/proc proc
"rw,user"
35 cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
36 ts_finalize_subtest
# checks the utab
38 ts_init_subtest
"utab-move"
39 ts_run
$TESTPROG --move /mnt
/bar
/mnt
/newbar
40 ts_run
$TESTPROG --move /mnt
/xyz
/mnt
/newxyz
41 cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
42 ts_finalize_subtest
# checks the utab
44 ts_init_subtest
"utab-remount"
45 ts_run
$TESTPROG --remount /mnt
/newbar
"ro,noatime"
46 ts_run
$TESTPROG --remount /mnt
/newxyz
"rw,user"
47 cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
48 ts_finalize_subtest
# checks the utab
50 ts_init_subtest
"utab-umount"
51 ts_run
$TESTPROG --remove /mnt
/newbar
52 ts_run
$TESTPROG --remove /proc
53 cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
54 ts_finalize_subtest
# checks the utab
59 export LIBMOUNT_FSTAB
=$TS_OUTPUT.fstab
61 cp "$TS_SELF/files/fstab.comment" $LIBMOUNT_FSTAB
63 ts_init_subtest
"fstab-replace"
64 ts_run
$TESTPROG --replace "LABEL=foo" "/mnt/foo"
65 cp $LIBMOUNT_FSTAB $TS_OUTPUT # save the fstab aside
66 ts_finalize_subtest
#checks the fstab