linux-stable/tools/testing/selftests/landlock
Hu Yadi 854357db2f selftests/landlock: Fix fs_test build with old libc
[ Upstream commit 40b7835e74 ]

One issue comes up while building selftest/landlock/fs_test on my side
(gcc 7.3/glibc-2.28/kernel-4.19).

gcc -Wall -O2 -isystem   fs_test.c -lcap -o selftests/landlock/fs_test
fs_test.c:4575:9: error: initializer element is not constant
  .mnt = mnt_tmp,
         ^~~~~~~

Signed-off-by: Hu Yadi <hu.yadi@h3c.com>
Suggested-by: Jiao <jiaoxupo@h3c.com>
Reviewed-by: Berlin <berlin@h3c.com>
Link: https://lore.kernel.org/r/20240124022908.42100-1-hu.yadi@h3c.com
Fixes: 04f9070e99 ("selftests/landlock: Add tests for pseudo filesystems")
[mic: Factor out mount's data string and make mnt_tmp static]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-23 09:24:48 +01:00
..
.gitignore
base_test.c selftests/landlock: Test FD passing from restricted to unrestricted processes 2022-10-19 09:01:46 +02:00
common.h selftests/landlock: Test FD passing from restricted to unrestricted processes 2022-10-19 09:01:46 +02:00
config selftests/landlock: Add tests for pseudo filesystems 2023-06-12 21:26:23 +02:00
config.um selftests/landlock: Add hostfs tests 2023-06-12 21:26:23 +02:00
fs_test.c selftests/landlock: Fix fs_test build with old libc 2024-02-23 09:24:48 +01:00
Makefile selftests/landlock: Build without static libraries 2022-10-19 22:10:56 +02:00
ptrace_test.c selftests/landlock: Test ptrace as much as possible with Yama 2023-01-27 18:53:55 +01:00
true.c