diff mbox series

[v2,1/2] lapi: move pkey.h declarations inside the lapi/ folder

Message ID 20240805065247.13791-1-liwang@redhat.com
State Accepted
Headers show
Series [v2,1/2] lapi: move pkey.h declarations inside the lapi/ folder | expand

Commit Message

Li Wang Aug. 5, 2024, 6:52 a.m. UTC
Signed-off-by: Li Wang <liwang@redhat.com>
---
 .../kernel/syscalls/pkeys => include/lapi}/pkey.h      | 10 +++++-----
 testcases/kernel/syscalls/pkeys/pkey01.c               |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
 rename {testcases/kernel/syscalls/pkeys => include/lapi}/pkey.h (88%)

Comments

Petr Vorel Aug. 5, 2024, 1:55 p.m. UTC | #1
Hi Li,

obviously correct, thanks!
Reviewed-by: Petr Vorel <pvorel@suse.cz>

BTW wouldn't be worth to rewrite mseal01.c to support both raw syscall and libc
wrapper via .test_variants?

Kind regards,
Petr
Li Wang Aug. 6, 2024, 12:58 a.m. UTC | #2
Hi Petr,

On Mon, Aug 5, 2024 at 9:55 PM Petr Vorel <pvorel@suse.cz> wrote:

> Hi Li,
>
> obviously correct, thanks!
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> BTW wouldn't be worth to rewrite mseal01.c to support both raw syscall and
> libc
> wrapper via .test_variants?
>

Yes, we could do that, but as mseal is too new, I haven't seen a wrapper
created in Glibc so far.
Probably we just record this in code comments as TODO?
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/pkeys/pkey.h b/include/lapi/pkey.h
similarity index 88%
rename from testcases/kernel/syscalls/pkeys/pkey.h
rename to include/lapi/pkey.h
index 6e32326b6..e0dc20dce 100644
--- a/testcases/kernel/syscalls/pkeys/pkey.h
+++ b/include/lapi/pkey.h
@@ -1,11 +1,11 @@ 
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
- * Copyright (c) 2019 Red Hat, Inc.
- * Copyright (c) Linux Test Project, 2019
+ * Copyright (c) 2019-2024 Red Hat, Inc.
+ * Copyright (c) Linux Test Project, 2019-2024
  */
 
-#ifndef PKEYS_H
-#define PKEYS_H
+#ifndef PKEYS_H__
+#define PKEYS_H__
 
 #include "tst_test.h"
 #include "lapi/syscalls.h"
@@ -53,4 +53,4 @@  static inline void check_pkey_support(void)
 	ltp_pkey_free(pkey);
 }
 
-#endif /* PKEYS_H */
+#endif /* PKEYS_H__ */
diff --git a/testcases/kernel/syscalls/pkeys/pkey01.c b/testcases/kernel/syscalls/pkeys/pkey01.c
index 0159822e1..a6a739668 100644
--- a/testcases/kernel/syscalls/pkeys/pkey01.c
+++ b/testcases/kernel/syscalls/pkeys/pkey01.c
@@ -29,7 +29,7 @@ 
 #include <sys/mman.h>
 #include <sys/wait.h>
 
-#include "pkey.h"
+#include "lapi/pkey.h"
 
 #define TEST_FILE "pkey_testfile"
 #define STR "abcdefghijklmnopqrstuvwxyz12345\n"