[LTP] [PATCH 1/6] memcontrol02: Remove O_TMPFILE TCONF check
Richard Palethorpe
rpalethorpe@suse.com
Thu Jan 27 07:12:20 CET 2022
We don't use O_TMPFILE anymore because the whole FS is temporary.
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
testcases/kernel/controllers/memcg/memcontrol02.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/testcases/kernel/controllers/memcg/memcontrol02.c b/testcases/kernel/controllers/memcg/memcontrol02.c
index 9fa4ff811..548f36829 100644
--- a/testcases/kernel/controllers/memcg/memcontrol02.c
+++ b/testcases/kernel/controllers/memcg/memcontrol02.c
@@ -94,16 +94,7 @@ static void alloc_pagecache_50M_check(void)
const char *const file_key_fmt =
TST_CGROUP_VER_IS_V1(cg_test, "memory") ? "cache %zd" : "file %zd";
- TEST(open(TMPDIR"/tmpfile", O_RDWR | O_CREAT, 0600));
-
- if (TST_RET < 0) {
- if (TST_ERR == EOPNOTSUPP)
- tst_brk(TCONF, "O_TMPFILE not supported by FS");
-
- tst_brk(TBROK | TTERRNO,
- "open(%s, O_TMPFILE | O_RDWR | O_EXCL", TMPDIR"/.");
- }
- fd = TST_RET;
+ fd = SAFE_OPEN(TMPDIR"/tmpfile", O_RDWR | O_CREAT, 0600);
SAFE_CGROUP_SCANF(cg_child, "memory.current", "%zu", ¤t);
tst_res(TINFO, "Created temp file: memory.current=%zu", current);
--
2.34.1
More information about the ltp
mailing list