* [LTP] [PATCH] open: clean up make check findings
@ 2026-02-26 15:59 Jinseok Kim
2026-02-27 3:09 ` Li Wang via ltp
2026-03-04 6:28 ` Li Wang via ltp
0 siblings, 2 replies; 3+ messages in thread
From: Jinseok Kim @ 2026-02-26 15:59 UTC (permalink / raw)
To: ltp
Fix various issues reported by `make check` in open syscall tests:
- Replace space indentation with tabs
- Remove extra blank lines
- Mark setup/cleanup helpers as static
- Add missing SPDX-License-Identifier
- Fix typo in error message
- Fix documentation comments
Signed-off-by: Jinseok Kim <always.starving0@gmail.com>
---
testcases/kernel/syscalls/open/open01.c | 2 +-
testcases/kernel/syscalls/open/open02.c | 6 +++---
testcases/kernel/syscalls/open/open03.c | 2 --
testcases/kernel/syscalls/open/open11.c | 4 ++--
testcases/kernel/syscalls/open/open12_child.c | 1 +
testcases/kernel/syscalls/open/open14.c | 2 +-
6 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/testcases/kernel/syscalls/open/open01.c b/testcases/kernel/syscalls/open/open01.c
index 3ae1b269b..e5e598e56 100644
--- a/testcases/kernel/syscalls/open/open01.c
+++ b/testcases/kernel/syscalls/open/open01.c
@@ -5,7 +5,7 @@
* 06/2017 Modified by Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
*/
-/*
+/*\
* DESCRIPTION
* Open a file with oflag = O_CREAT set, does it set the sticky bit off?
*
diff --git a/testcases/kernel/syscalls/open/open02.c b/testcases/kernel/syscalls/open/open02.c
index e1c5cc5dc..30b129019 100644
--- a/testcases/kernel/syscalls/open/open02.c
+++ b/testcases/kernel/syscalls/open/open02.c
@@ -29,7 +29,7 @@ static struct tcase {
{TEST_FILE2, O_RDONLY | O_NOATIME, EPERM, "unprivileged O_RDONLY | O_NOATIME"},
};
-void setup(void)
+static void setup(void)
{
struct passwd *ltpuser;
@@ -45,10 +45,10 @@ static void verify_open(unsigned int n)
struct tcase *tc = &tcases[n];
TST_EXP_FAIL2(open(tc->filename, tc->flag, 0444),
- tc->exp_errno, "open() %s", tc->desc);
+ tc->exp_errno, "open() %s", tc->desc);
}
-void cleanup(void)
+static void cleanup(void)
{
SAFE_SETEUID(0);
}
diff --git a/testcases/kernel/syscalls/open/open03.c b/testcases/kernel/syscalls/open/open03.c
index 275ca84f0..53baf1028 100644
--- a/testcases/kernel/syscalls/open/open03.c
+++ b/testcases/kernel/syscalls/open/open03.c
@@ -19,8 +19,6 @@ static void verify_open(void)
SAFE_UNLINK(TEST_FILE);
}
-
-
static struct tst_test test = {
.needs_tmpdir = 1,
.test_all = verify_open,
diff --git a/testcases/kernel/syscalls/open/open11.c b/testcases/kernel/syscalls/open/open11.c
index 6f89d558d..2d4b4e821 100644
--- a/testcases/kernel/syscalls/open/open11.c
+++ b/testcases/kernel/syscalls/open/open11.c
@@ -269,10 +269,10 @@ static void verify_open(unsigned int n)
{
if (tc[n].err > 0) {
TST_EXP_FAIL2(open(tc[n].path, tc[n].flags, tc[n].mode),
- tc[n].err, "%s", tc[n].desc);
+ tc[n].err, "%s", tc[n].desc);
} else if (tc[n].err == 0) {
TST_EXP_FD(open(tc[n].path, tc[n].flags, tc[n].mode),
- "%s", tc[n].desc);
+ "%s", tc[n].desc);
} else {
TEST(open(tc[n].path, tc[n].flags, tc[n].mode));
tst_res(TPASS, "%s", tc[n].desc);
diff --git a/testcases/kernel/syscalls/open/open12_child.c b/testcases/kernel/syscalls/open/open12_child.c
index a6dabd5d2..2c3411426 100644
--- a/testcases/kernel/syscalls/open/open12_child.c
+++ b/testcases/kernel/syscalls/open/open12_child.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2014 Fujitsu Ltd.
* Author: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
diff --git a/testcases/kernel/syscalls/open/open14.c b/testcases/kernel/syscalls/open/open14.c
index a3c7d38a2..7f3babda3 100644
--- a/testcases/kernel/syscalls/open/open14.c
+++ b/testcases/kernel/syscalls/open/open14.c
@@ -108,7 +108,7 @@ static int read_file(int fd)
SAFE_READ(0, fd, tmp, size);
if (memcmp(buf, tmp, size)) {
- tst_res(TFAIL, "got unexepected data");
+ tst_res(TFAIL, "got unexpected data");
return 1;
}
}
--
2.43.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] open: clean up make check findings
2026-02-26 15:59 [LTP] [PATCH] open: clean up make check findings Jinseok Kim
@ 2026-02-27 3:09 ` Li Wang via ltp
2026-03-04 6:28 ` Li Wang via ltp
1 sibling, 0 replies; 3+ messages in thread
From: Li Wang via ltp @ 2026-02-27 3:09 UTC (permalink / raw)
To: Jinseok Kim; +Cc: ltp
Reviewed-by: Li Wang <liwang@redhat.com>
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] open: clean up make check findings
2026-02-26 15:59 [LTP] [PATCH] open: clean up make check findings Jinseok Kim
2026-02-27 3:09 ` Li Wang via ltp
@ 2026-03-04 6:28 ` Li Wang via ltp
1 sibling, 0 replies; 3+ messages in thread
From: Li Wang via ltp @ 2026-03-04 6:28 UTC (permalink / raw)
To: Jinseok Kim; +Cc: ltp
Patch merged, thanks!
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-04 6:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-26 15:59 [LTP] [PATCH] open: clean up make check findings Jinseok Kim
2026-02-27 3:09 ` Li Wang via ltp
2026-03-04 6:28 ` Li Wang via ltp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox