[LTP] [PATCH v5 1/6] Get ABI version from landlock common library

Andrea Cervesato andrea.cervesato@suse.de
Thu Aug 1 14:08:38 CEST 2024


From: Andrea Cervesato <andrea.cervesato@suse.com>

Return the ABI version when verify_landlock_is_enabled() is called.

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
 testcases/kernel/syscalls/landlock/landlock_common.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/landlock/landlock_common.h b/testcases/kernel/syscalls/landlock/landlock_common.h
index 66f8fd19a..1d3864934 100644
--- a/testcases/kernel/syscalls/landlock/landlock_common.h
+++ b/testcases/kernel/syscalls/landlock/landlock_common.h
@@ -10,7 +10,7 @@
 #include "lapi/fcntl.h"
 #include "lapi/landlock.h"
 
-static inline void verify_landlock_is_enabled(void)
+static inline int verify_landlock_is_enabled(void)
 {
 	int abi;
 
@@ -28,6 +28,8 @@ static inline void verify_landlock_is_enabled(void)
 	}
 
 	tst_res(TINFO, "Landlock ABI v%d", abi);
+
+	return abi;
 }
 
 static inline void apply_landlock_rule(

-- 
2.43.0



More information about the ltp mailing list