[LTP] [PATCH] [COMMITTED] userns06_capcheck: Fix build on some distros

Cyril Hrubis chrubis@suse.cz
Tue Apr 26 17:57:09 CEST 2022


The build fails on some distros because they compile with -Werror=return-type

Fixes: f57e28cfb19 ("Rewrite userns06.c using new LTP API")
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 testcases/kernel/containers/userns/userns06_capcheck.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testcases/kernel/containers/userns/userns06_capcheck.c b/testcases/kernel/containers/userns/userns06_capcheck.c
index bae4e4e33..c048ef63f 100644
--- a/testcases/kernel/containers/userns/userns06_capcheck.c
+++ b/testcases/kernel/containers/userns/userns06_capcheck.c
@@ -53,6 +53,8 @@ int main(int argc, char *argv[])
 		tst_res(TFAIL, "unexpected effective/permitted caps at %d", i);
 	else
 		tst_res(TPASS, "expected caps at %d", i);
+
+	return 0;
 }
 
 #else
@@ -61,5 +63,7 @@ int main(void)
 	tst_reinit();
 
 	tst_brk(TCONF, "System is missing libcap");
+
+	return 0;
 }
 #endif
-- 
2.35.1



More information about the ltp mailing list