Skip to contentSkip to conversation

move_pages12: fix Warning on system which not support hugepage

PATCH New Li Wang 2 participants 2 messages May 8, 2017 – May 9, 2017

lore
Share & tools
lore

Li Wang

author
#0 lore raw

PATCH 1/1 move_pages12: fix Warning on system which not support hugepage

WARNING:
tst_test.c:847: INFO: Timeout per run is 0h 05m 00s
move_pages_support.c:407: CONF: at least 2 allowed NUMA nodes are required safe_file_ops.c:301: WARN: Failed to close FILE '/proc/sys/vm/nr_hugepages' at move_pages12.c:159: EOPNOTSUPP

---
 testcases/kernel/syscalls/move_pages/move_pages12.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/move_pages/move_pages12.c +2 -1
index de00346..f93311f 100644
@@ -158,7 +158,8 @@ static void setup(void)
 
 static void cleanup(void)
 {
-	SAFE_FILE_PRINTF(PATH_NR_HUGEPAGES, "%ld", orig_hugepages);
+	if (!access(PATH_HUGEPAGES, F_OK))
+		SAFE_FILE_PRINTF(PATH_NR_HUGEPAGES, "%ld", orig_hugepages);
 }
 
 static struct tst_test test = {
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/1 move_pages12: fix Warning on system which not support hugepage

----- Original Message -----

Quoted 8 lines

WARNING:
tst_test.c:847: INFO: Timeout per run is 0h 05m 00s move_pages_support.c:407: CONF: at least 2 allowed NUMA nodes are required safe_file_ops.c:301: WARN: Failed to close FILE '/proc/sys/vm/nr_hugepages' at move_pages12.c:159: EOPNOTSUPP

---

Pushed.

Thanks,
Jan