]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: test non-canonical paths in fstab
authorKarel Zak <kzak@redhat.com>
Fri, 24 Feb 2012 20:05:09 +0000 (21:05 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 24 Feb 2012 20:13:44 +0000 (21:13 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/libmount/tabfiles-find-target2 [new file with mode: 0644]
tests/expected/libmount/tabfiles-find-target3 [new file with mode: 0644]
tests/expected/libmount/tabfiles-parse-fstab
tests/ts/libmount/files/fstab
tests/ts/libmount/tabfiles

diff --git a/tests/expected/libmount/tabfiles-find-target2 b/tests/expected/libmount/tabfiles-find-target2
new file mode 100644 (file)
index 0000000..8a6c57b
--- /dev/null
@@ -0,0 +1,5 @@
+------ fs:
+source: /dev/foo
+target: /any/foo/
+fstype: auto
+optstr: defaults
diff --git a/tests/expected/libmount/tabfiles-find-target3 b/tests/expected/libmount/tabfiles-find-target3
new file mode 100644 (file)
index 0000000..8a6c57b
--- /dev/null
@@ -0,0 +1,5 @@
+------ fs:
+source: /dev/foo
+target: /any/foo/
+fstype: auto
+optstr: defaults
index 14bdfb451df7c586534fad84e651cb8403271e43..d6615267603bd9681f477455546bff53e3422b56 100644 (file)
@@ -58,3 +58,8 @@ target: /mnt/gogogo
 fstype: cifs
 optstr: user=SRGROUP/baby,noauto
 user-optstr: user=SRGROUP/baby,noauto
+------ fs:
+source: /dev/foo
+target: /any/foo/
+fstype: auto
+optstr: defaults
index 2503065e428ca9cd4fc993ad81edbef9a3238bce..a8f73bcd9311eb2b8ab7fd7a5dac186577d990a9 100644 (file)
@@ -10,3 +10,5 @@ proc                    /proc                   proc    defaults        0 0
 
 foo.com:/mnt/share     /mnt/remote             nfs     noauto
 //bar.com/gogogo        /mnt/gogogo             cifs    user=SRGROUP/baby,noauto
+
+/dev/foo               /any/foo/               auto    defaults 0 0
index 7f4913e4d841c3b0bc80efa2ec2cffb8e62f2707..671c649bbece55f569d6421c160c8619f01f2fa0 100755 (executable)
@@ -47,6 +47,16 @@ ts_valgrind $TESTPROG --find-forward "$TS_SELF/files/fstab" target /home/foo &>
 sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
 ts_finalize_subtest
 
+ts_init_subtest "find-target2"
+ts_valgrind $TESTPROG --find-forward "$TS_SELF/files/fstab" target /any/foo &> $TS_OUTPUT
+sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "find-target3"
+ts_valgrind $TESTPROG --find-forward "$TS_SELF/files/fstab" target /any/foo/ &> $TS_OUTPUT
+sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
+ts_finalize_subtest
+
 ts_init_subtest "find-pair"
 ts_valgrind $TESTPROG --find-pair "$TS_SELF/files/mtab" /dev/mapper/kzak-home /home/kzak &> $TS_OUTPUT
 sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT