Fix sysinfo and env test case failure in stress test
This commit is contained in:
parent
b79adca20d
commit
16966c0b28
2
test/env/main.c
vendored
2
test/env/main.c
vendored
@ -209,7 +209,7 @@ int main(int argc, const char *argv[]) {
|
||||
g_argc = argc;
|
||||
g_argv = argv;
|
||||
// Test argc
|
||||
if (getpid() > 2) {
|
||||
if (g_argc == 2) {
|
||||
return test_suite_run(child_test_cases, ARRAY_SIZE(child_test_cases));
|
||||
} else {
|
||||
return test_suite_run(test_cases, ARRAY_SIZE(test_cases));
|
||||
|
@ -31,8 +31,8 @@ int test_sysinfo() {
|
||||
printf ("free RAM: %5.1f MB\n", info.freeram / MEGABYTE);
|
||||
printf ("process count: %d\n", info.procs);
|
||||
|
||||
// make sure update is in a valid range (1s ~ 5min)
|
||||
if (info.uptime < 1 || info.uptime / MIN > 5 ) {
|
||||
// make sure update is in a valid range ( > 1s)
|
||||
if (info.uptime < 1) {
|
||||
THROW_ERROR("system uptime error");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user