From: Jinseok Kim <always.starving0@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] open: clean up make check findings
Date: Fri, 27 Feb 2026 00:59:27 +0900 [thread overview]
Message-ID: <20260226155929.3500-1-always.starving0@gmail.com> (raw)
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
next reply other threads:[~2026-02-26 16:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 15:59 Jinseok Kim [this message]
2026-02-27 3:09 ` [LTP] [PATCH] open: clean up make check findings Li Wang via ltp
2026-03-04 6:28 ` Li Wang via ltp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260226155929.3500-1-always.starving0@gmail.com \
--to=always.starving0@gmail.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox