test-umount: add a simple test for swap_list_get()

The implementation seems buggy:
/* test_swap_list("/home/zbyszek/src/systemd/test/test-umount/example.swaps") */
path=0 o= f=0x0 try-ro=no dev=0:0
path=/some/swapfile2 o= f=0x0 try-ro=no dev=0:0
path=/some/swapfile o= f=0x0 try-ro=no dev=0:0
path=/dev/dm-2 o= f=0x0 try-ro=no dev=0:0
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-03-16 10:12:50 +01:00
parent a6dcd22976
commit 1fd8edb53a
5 changed files with 30 additions and 3 deletions
+1
View File
@@ -177,6 +177,7 @@ test_data_files = '''
test-umount/empty.mountinfo
test-umount/garbled.mountinfo
test-umount/rhbug-1554943.mountinfo
test-umount/example.swaps
'''.split()
if conf.get('ENABLE_RESOLVE') == 1
+4
View File
@@ -0,0 +1,4 @@
Filename Type Size Used Priority
/dev/dm-2 partition 8151036 2283436 -2
/some/swapfile file 111 111 0
/some/swapfile2 (deleted) file 111 111 0