tests: add /proc/swaps libmount parser test
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
83212eb3df
commit
6ffdfda846
|
@ -0,0 +1,22 @@
|
|||
------ fs:
|
||||
source: /dev/dm-2
|
||||
target: (null)
|
||||
fstype: swap
|
||||
swaptype: partition
|
||||
size: 8151036
|
||||
usedsize: 2283436
|
||||
priority: -2
|
||||
------ fs:
|
||||
source: /some/swapfile
|
||||
target: (null)
|
||||
fstype: swap
|
||||
swaptype: file
|
||||
size: 111
|
||||
usedsize: 111
|
||||
------ fs:
|
||||
source: /some/swapfile2
|
||||
target: (null)
|
||||
fstype: swap
|
||||
swaptype: file
|
||||
size: 111
|
||||
usedsize: 111
|
|
@ -0,0 +1,4 @@
|
|||
Filename Type Size Used Priority
|
||||
/dev/dm-2 partition 8151036 2283436 -2
|
||||
/some/swapfile file 111 111 0
|
||||
/some/swapfile2\040(deleted) file 111 111 0
|
|
@ -37,6 +37,11 @@ ts_run $TESTPROG --parse "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
|
|||
sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
|
||||
ts_finalize_subtest
|
||||
|
||||
ts_init_subtest "parse-swaps"
|
||||
ts_run $TESTPROG --parse "$TS_SELF/files/swaps" &> $TS_OUTPUT
|
||||
sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
|
||||
ts_finalize_subtest
|
||||
|
||||
ts_init_subtest "copy"
|
||||
ts_run $TESTPROG --copy-fs "$TS_SELF/files/fstab" &> $TS_OUTPUT
|
||||
sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
|
||||
|
|
Loading…
Reference in New Issue