[PATCH v2 2/3] memcg/memcontrol03: fix typos, redundant define and format specifiers
Disha Goel <[email protected]>
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <[email protected]> |
Fix typos in doc comment ('tempfs' -> 'tmpfs', 'becaue' -> 'because'),
remove '#define TMPDIR \"mntdir\"' which duplicates the definition already
in memcontrol_common.h, replace PRIdPTR with %zu for size_t arguments
(PRIdPTR is for signed intptr_t, not unsigned size_t), fix continuation
line indentation in tst_res() calls, and remove now-unused <inttypes.h>
include.
Signed-off-by: Disha Goel <[email protected]>
---
v1 -> v2:
- Remove now-unused <inttypes.h> include (PRIdPTR was its only user)
- Split from combined memcontrol03+04 patch into separate patch per file
testcases/kernel/controllers/memcg/memcontrol03.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/testcases/kernel/controllers/memcg/memcontrol03.c b/testcases/kernel/controllers/memcg/memcontrol03.c
index 493e970ab..96224c4ee 100644
--- a/testcases/kernel/controllers/memcg/memcontrol03.c
+++ b/testcases/kernel/controllers/memcg/memcontrol03.c
@@ -27,8 +27,8 @@
* pagecache even in this case."
*
* memory.min doesn't appear to exist on V1 so we only test on V2 like
- * the selftest. We do test on more file systems, but not tempfs
- * becaue it can't evict the page cache without swap. Also we avoid
+ * the selftest. We do test on more file systems, but not tmpfs
+ * because it can't evict the page cache without swap. Also we avoid
* filesystems which allocate extra memory for buffer heads.
*
* The tolerances have been increased from the self tests.
@@ -36,12 +36,8 @@
#define _GNU_SOURCE
-#include <inttypes.h>
-
#include "memcontrol_common.h"
-#define TMPDIR "mntdir"
-
static struct tst_cg_group *trunk_cg[3];
static struct tst_cg_group *leaf_cg[4];
static int fd = -1;
@@ -105,8 +101,8 @@ static void alloc_anon_in_child(const struct tst_cg_group *const cg,
SAFE_CG_SCANF(cg, "memory.current", "%zu", &cgmem);
size = size > cgmem ? size - cgmem : 0;
- tst_res(TINFO, "Child %d in %s: Allocating anon: %"PRIdPTR,
- getpid(), tst_cg_group_name(cg), size);
+ tst_res(TINFO, "Child %d in %s: Allocating anon: %zu",
+ getpid(), tst_cg_group_name(cg), size);
if (size)
alloc_anon(size);
@@ -148,7 +144,7 @@ static void alloc_pagecache_in_child(const struct tst_cg_group *const cg,
SAFE_CG_SCANF(cg, "memory.current", "%zu", &cgmem);
size = size > cgmem ? size - cgmem : 0;
- tst_res(TINFO, "Child %d in %s: Allocating pagecache: %"PRIdPTR,
+ tst_res(TINFO, "Child %d in %s: Allocating pagecache: %zu",
getpid(), tst_cg_group_name(cg), size);
if (size)
--
2.45.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp