syscalls/swapon03: do not fail if /proc/swaps is absent
PATCH 1/1 syscalls/swapon03: do not fail if /proc/swaps is absent
If the /proc/swaps file is absent the test should be skipped due to incompatible configuration.
Signed-off-by Steve Muckle <[email protected]>
--- testcases/kernel/syscalls/swapon/swapon03.c | 3 +++ 1 file changed, 3 insertions(+)
testcases/kernel/syscalls/swapon/swapon03.c +3 -0
@@ -328,6 +328,9 @@ static void setup(void)tst_require_root (); +if (access ("/proc/swaps" ,F_OK )) +tst_brkm (TCONF ,NULL ,"swap not supported by kernel" ); +tst_tmpdir ();switch ((fs_type =tst_fs_type (cleanup,"." ))) {
Signature · 1 line
2.16.1