Skip to contentSkip to conversation

fix make check errors: replace space with tabs, remove unecessary spaces.

PATCH New lufei 1 participant 3 messages Aug 14, 2024

lore
Share & tools
lore

lufei

author
#0 lore raw

PATCH 1/3 fix make check errors: replace space with tabs, remove unecessary spaces.

replace space with tabs, remove unecessary spaces.

---
 testcases/kernel/syscalls/acct/acct01.c | 6 +++---
 testcases/kernel/syscalls/acct/acct02.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
testcases/kernel/syscalls/acct/acct01.c +3 -3
index 60cf4681e..b9b08ef67 100644
@@ -73,8 +73,8 @@ static struct test_case {
 	char **filename;
 	char *desc;
 	int exp_errno;
-	void (*setupfunc) ();
-	void (*cleanfunc) ();
+	void (*setupfunc)();
+	void (*cleanfunc)();
 } tcases[] = {
 	{&file_eisdir,  FILE_EISDIR,  EISDIR,  NULL,   NULL},
 	{&file_eaccess, FILE_EACCESS, EACCES,  NULL,   NULL},
@@ -126,7 +126,7 @@ static void verify_acct(unsigned int nr)
 		tcase->setupfunc();
 
 	TST_EXP_FAIL(acct(*tcase->filename), tcase->exp_errno,
-	             "acct(%s)", tcase->desc);
+		"acct(%s)", tcase->desc);
 
 	if (tcase->cleanfunc)
 		tcase->cleanfunc();
testcases/kernel/syscalls/acct/acct02.c +1 -1
index d3f3d9d04..74019f430 100644
@@ -186,7 +186,7 @@ static void run(void)
 
 		if (read_bytes != acct_size) {
 			tst_res(TFAIL, "incomplete read %i bytes, expected %i",
-			        read_bytes, acct_size);
+					read_bytes, acct_size);
 			goto exit;
 		}
 
Signature · 5 lines
2.39.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#1 lore raw

PATCH 2/3 fix make check warnings: use octal permission.

Replace symbolic permission with octal.

---
 testcases/kernel/syscalls/acct/acct01.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
testcases/kernel/syscalls/acct/acct01.c +1 -2
index b9b08ef67..de653d810 100644
@@ -25,8 +25,7 @@
 
 #include "tst_test.h"
 
-#define DIR_MODE	(S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP| \
-			 S_IXGRP|S_IROTH|S_IXOTH)
+#define DIR_MODE	0755
 #define FILE_EISDIR		"."
 #define FILE_EACCESS		"/dev/null"
 #define FILE_ENOENT		"/tmp/does/not/exist"
Signature · 5 lines
2.39.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#2 lore raw

PATCH 3/3 fix make check warning: using .needs_kconfigs instead of ENOSYS

In reply to lufei

Replace ENOSYS with .needs_kconfigs CONFIG_BSD_PROCESS_ACCT=y

---
 testcases/kernel/syscalls/acct/acct01.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
testcases/kernel/syscalls/acct/acct01.c +4 -3
index de653d810..455fd13a5 100644
@@ -92,8 +92,6 @@ static void setup(void)
 	int fd;
 
 	TEST(acct(NULL));
-	if (TST_RET == -1 && TST_ERR == ENOSYS)
-		tst_brk(TCONF, "acct() system call isn't configured in kernel");
 
 	ltpuser = SAFE_GETPWNAM("nobody");
 
@@ -125,7 +123,7 @@ static void verify_acct(unsigned int nr)
 		tcase->setupfunc();
 
 	TST_EXP_FAIL(acct(*tcase->filename), tcase->exp_errno,
-		"acct(%s)", tcase->desc);
+			"acct(%s)", tcase->desc);
 
 	if (tcase->cleanfunc)
 		tcase->cleanfunc();
@@ -148,5 +146,8 @@ static struct tst_test test = {
 		{&file_enametoolong, .size = PATH_MAX+2},
 		{&file_erofs, .str = FILE_EROFS},
 		{}
+	},
+	.needs_kconfigs = (const char *[]) {
+		"CONFIG_BSD_PROCESS_ACCT=y",
 	}
 };
Signature · 5 lines
2.39.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp