summaryrefslogtreecommitdiff
path: root/tests/ts/libmount/tabfiles
blob: e1fbc6d68f33c42443630cb22211fcffb4121ca5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash

# Copyright (C) 2010 Karel Zak <kzak@redhat.com>

TS_TOPDIR="$(dirname $0)/../.."
TS_DESC="tab files"

. $TS_TOPDIR/functions.sh
ts_init "$*"

TESTPROG="$TS_HELPER_TABFILES"

ts_init_subtest "parse-fstab"
$TESTPROG --parse "$TS_SELF/files/fstab" &> $TS_OUTPUT
sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "parse-fstab-broken"
$TESTPROG --parse "$TS_SELF/files/fstab.broken" &> $TS_OUTPUT
sed -i -e 's/.*fstab.broken:[[:digit:]]*: parse error//g; s/fs: 0x.*/fs:/g' $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "parse-mountinfo"
$TESTPROG --parse "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "copy"
$TESTPROG --copy-fs "$TS_SELF/files/fstab" &> $TS_OUTPUT
sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "find-source"
$TESTPROG --find-forward "$TS_SELF/files/fstab" source UUID=fef7ccb3-821c-4de8-88dc-71472be5946f &> $TS_OUTPUT
sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "find-target"
$TESTPROG --find-forward "$TS_SELF/files/fstab" target /home/foo &> $TS_OUTPUT
sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
ts_finalize_subtest

ts_finalize