This patch fixes some issues during code review. One is that there
would be a potential failure if path /sys/devices/system/node does not
exist, which might cause oom02/04 fail. The other one is moving
tst_exit() from cleanup() to main(), this should make us get rid of a
compile warning.
Signed-off-by: Caspar Zhang <[email protected]>
---
testcases/kernel/mem/oom/oom02.c | 2 +-
testcases/kernel/mem/oom/oom04.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/mem/oom/oom02.c b/testcases/kernel/mem/oom/oom02.c
index 252e4c6..d867dcb 100644
--- a/testcases/kernel/mem/oom/oom02.c
+++ b/testcases/kernel/mem/oom/oom02.c
@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
#endif
nnodes = count_numa();
- if (count_numa() == 1)
+ if (count_numa() <= 1)
tst_brkm(TCONF, NULL, "required a NUMA system.");
setup();
diff --git a/testcases/kernel/mem/oom/oom04.c b/testcases/kernel/mem/oom/oom04.c
index 1646aba..724b55b 100644
--- a/testcases/kernel/mem/oom/oom04.c
+++ b/testcases/kernel/mem/oom/oom04.c
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
#endif
nnodes = count_numa();
- if (count_numa() == 1)
+ if (count_numa() <= 1)
tst_brkm(TCONF, NULL, "required a NUMA system.");
setup();
@@ -122,6 +122,7 @@ int main(int argc, char *argv[])
testoom(0, 1, 1);
}
cleanup();
+ tst_exit();
}
void setup(void)
@@ -159,7 +160,6 @@ void cleanup(void)
umount_mem(MEMCG_PATH, MEMCG_PATH_NEW);
TEST_CLEANUP;
- tst_exit();
}
#else /* no NUMA */
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops? How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list