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_argc = argc; | ||||||
|     g_argv = argv; |     g_argv = argv; | ||||||
|     // Test argc
 |     // Test argc
 | ||||||
|     if (getpid() > 2) { |     if (g_argc == 2) { | ||||||
|         return test_suite_run(child_test_cases, ARRAY_SIZE(child_test_cases)); |         return test_suite_run(child_test_cases, ARRAY_SIZE(child_test_cases)); | ||||||
|     } else  { |     } else  { | ||||||
|         return test_suite_run(test_cases, ARRAY_SIZE(test_cases)); |         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 ("free RAM: %5.1f MB\n", info.freeram / MEGABYTE); | ||||||
|     printf ("process count: %d\n", info.procs); |     printf ("process count: %d\n", info.procs); | ||||||
| 
 | 
 | ||||||
|     // make sure update is in a valid range (1s ~ 5min)
 |     // make sure update is in a valid range ( > 1s)
 | ||||||
|     if (info.uptime < 1 || info.uptime / MIN > 5 ) { |     if (info.uptime < 1) { | ||||||
|         THROW_ERROR("system uptime error"); |         THROW_ERROR("system uptime error"); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user