diff mbox series

[v1] Avoid swapon01 failing with EPERM

Message ID 20231011152900.4274-1-mkittler@suse.de
State Accepted
Headers show
Series [v1] Avoid swapon01 failing with EPERM | expand

Commit Message

Marius Kittler Oct. 11, 2023, 3:29 p.m. UTC
* 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(+)

Comments

Petr Vorel Oct. 11, 2023, 3:43 p.m. UTC | #1
> * Simply require root permissions like the other swapon tests do
> * Fixes #1091

Reported-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Fixes: 23fa0e045 ("syscalls/swapon/swapon01: Convert swapon01 to the new API")
Fixes: https://github.com/linux-test-project/ltp/issues/1091

Thanks!

Kind regards,
Petr
Cyril Hrubis Oct. 12, 2023, 7:15 a.m. UTC | #2
Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Petr Vorel Oct. 12, 2023, 7:34 a.m. UTC | #3
Hi all,

thanks, merged!

very very nit: better to mark as this:
> * Fixes #1091
Fixes: #1091

Kind regards,
Petr
diff mbox series

Patch

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