Message ID | 20240112071245.669-1-hu.yadi@h3c.com |
---|---|
State | New |
Headers | show |
Series | [v3] selftests/landlock:Fix two build issues | expand |
diff --git a/tools/testing/selftests/landlock/fs_test.c b/tools/testing/selftests/landlock/fs_test.c index 18e1f86a6234..a992cf7c0ad1 100644 --- a/tools/testing/selftests/landlock/fs_test.c +++ b/tools/testing/selftests/landlock/fs_test.c @@ -4572,7 +4572,10 @@ FIXTURE_VARIANT(layout3_fs) /* clang-format off */ FIXTURE_VARIANT_ADD(layout3_fs, tmpfs) { /* clang-format on */ - .mnt = mnt_tmp, + .mnt = { + .type = "tmpfs", + .data = "size=4m,mode=700", + }, .file_path = file1_s1d1, }; diff --git a/tools/testing/selftests/landlock/net_test.c b/tools/testing/selftests/landlock/net_test.c index 929e21c4db05..12a6744568e2 100644 --- a/tools/testing/selftests/landlock/net_test.c +++ b/tools/testing/selftests/landlock/net_test.c @@ -21,6 +21,15 @@ #include "common.h" +#ifndef gettid +static pid_t gettid(void) +{ + return syscall(__NR_gettid); +} + +#endif + + const short sock_port_start = (1 << 10); static const char loopback_ipv4[] = "127.0.0.1";