MPT driver incorrectly reporting a waitpid error
The multi-process test driver program waits until all its children have stopped (or timeout) by calling ddsrt_proc_waitpids in a loop. The way the loop is written, it can try once more when all children have already been waited for, in which case it reports a spurious error. This fixes that problem by checking whether the error code was to be expected. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
		
							parent
							
								
									7fbe49c267
								
							
						
					
					
						commit
						4fc56c5cbe
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -355,8 +355,14 @@ mpt_run_test(const char *exe, mpt_suite_t *suite, mpt_test_t *test)
 | 
			
		|||
        result = EXIT_FAILURE;
 | 
			
		||||
      }
 | 
			
		||||
    } else if (retcode != DDS_RETCODE_NOT_FOUND) {
 | 
			
		||||
      printf("Wait for processes of %s::%s failed (%d)\n", suite->name, test->name, (int)retcode);
 | 
			
		||||
      result = EXIT_FAILURE;
 | 
			
		||||
      for (proc = test->procs; proc; proc = proc->next) {
 | 
			
		||||
        if (proc->pid != 0)
 | 
			
		||||
          break;
 | 
			
		||||
      }
 | 
			
		||||
      if (proc != NULL) {
 | 
			
		||||
        printf("Wait for processes of %s::%s failed (%d)\n", suite->name, test->name, (int)retcode);
 | 
			
		||||
        result = EXIT_FAILURE;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue