[LTP] [PATCH v1] Avoid swapon01 failing with EPERM
Marius Kittler
mkittler@suse.de
Wed Oct 11 17:29:00 CEST 2023
* Simply require root permissions like the other swapon tests do
* Fixes #1091
Signed-off-by: Marius Kittler <mkittler@suse.de>
---
testcases/kernel/syscalls/swapon/swapon01.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/swapon/swapon01.c b/testcases/kernel/syscalls/swapon/swapon01.c
index c334ae246..b5c3f359c 100644
--- a/testcases/kernel/syscalls/swapon/swapon01.c
+++ b/testcases/kernel/syscalls/swapon/swapon01.c
@@ -40,6 +40,7 @@ static void setup(void)
}
static struct tst_test test = {
+ .needs_root = 1,
.needs_tmpdir = 1,
.test_all = verify_swapon,
.setup = setup
--
2.42.0
More information about the ltp
mailing list