All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] mem/min_free_kbytes: fix comment typo and whitespace alignment
@ 2026-07-10  9:14 Sachin Sant
  2026-07-10  9:14 ` [LTP] [PATCH v3 2/2] mem/min_free_kbytes: refactor to use SAFE_FORK and simplify tune logic Sachin Sant
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sachin Sant @ 2026-07-10  9:14 UTC (permalink / raw)
  To: ltp

Fix the typo '%2 MemTotal' -> '2% MemTotal' in the file header comment.
Remove spurious leading spaces from continuation lines in tst_res()
calls and remove unnecessary braces around a single-statement if body,
bringing the file in line with LTP coding style.

Signed-off-by: Sachin Sant <sachinp@linux.ibm.com>
---
 testcases/kernel/mem/tunable/min_free_kbytes.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/testcases/kernel/mem/tunable/min_free_kbytes.c b/testcases/kernel/mem/tunable/min_free_kbytes.c
index bdc9126c2..b1d00e453 100644
--- a/testcases/kernel/mem/tunable/min_free_kbytes.c
+++ b/testcases/kernel/mem/tunable/min_free_kbytes.c
@@ -17,7 +17,7 @@
  *
  * 1. default min_free_kbytes with all ``overcommit_memory`` policy
  * 2. 2x default value with all ``overcommit_memory`` policy
- * 3. 5% of MemFree or %2 MemTotal with all ``overcommit_memory`` policy
+ * 3. 5% of MemFree or 2% MemTotal with all ``overcommit_memory`` policy
  *
  * [References]
  *
@@ -114,7 +114,7 @@ static void test_tune(unsigned long overcommit_policy)
 		if (overcommit_policy == 2) {
 			if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 				tst_res(TFAIL, "child unexpectedly failed: %s",
-					 tst_strstatus(status));
+					tst_strstatus(status));
 		} else if (overcommit_policy == 1) {
 			if (!WIFSIGNALED(status) || WTERMSIG(status) != SIGKILL)
 #ifdef TST_ABI32
@@ -122,20 +122,19 @@ static void test_tune(unsigned long overcommit_policy)
 				if (total_mem < 3145728UL)
 #endif
 					tst_res(TFAIL, "child unexpectedly failed: %s",
-						 tst_strstatus(status));
+						tst_strstatus(status));
 #ifdef TST_ABI32
 				/* in 32-bit system, a process allocate about 3Gb memory at most */
 				else
 					tst_res(TINFO, "Child can't allocate "
-						 ">3Gb memory in 32bit system");
+						">3Gb memory in 32bit system");
 			}
 #endif
 		} else {
 			if (WIFEXITED(status)) {
-				if (WEXITSTATUS(status) != 0) {
+				if (WEXITSTATUS(status) != 0)
 					tst_res(TFAIL, "child unexpectedly failed: %s",
 						tst_strstatus(status));
-				}
 			} else if (!WIFSIGNALED(status) ||
 				   WTERMSIG(status) != SIGKILL) {
 				tst_res(TFAIL, "child unexpectedly failed: %s",
@@ -182,7 +181,7 @@ static void check_monitor(void)
 
 		if (memfree < tune) {
 			tst_res(TINFO, "MemFree is %lu kB, "
-				 "min_free_kbytes is %lu kB", memfree, tune);
+				"min_free_kbytes is %lu kB", memfree, tune);
 			tst_res(TFAIL, "MemFree < min_free_kbytes");
 		}
 
-- 
2.39.1


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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-13 11:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10  9:14 [LTP] [PATCH 1/2] mem/min_free_kbytes: fix comment typo and whitespace alignment Sachin Sant
2026-07-10  9:14 ` [LTP] [PATCH v3 2/2] mem/min_free_kbytes: refactor to use SAFE_FORK and simplify tune logic Sachin Sant
2026-07-13 11:37   ` Andrea Cervesato via ltp
2026-07-10 11:58 ` [LTP] mem/min_free_kbytes: fix comment typo and whitespace alignment linuxtestproject.agent
2026-07-13 11:26 ` [LTP] [PATCH 1/2] " Andrea Cervesato via ltp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.