Changed test so the output doesn't depend on the order in which the parent and

child run;  this was random so the test was failing spuriously sometimes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1123
This commit is contained in:
Nicholas Nethercote 2002-09-27 10:38:20 +00:00
parent ad2f86232e
commit 0eb6b6654a
2 changed files with 7 additions and 3 deletions

View File

@ -9,7 +9,12 @@ int main(void)
pid = fork ();
printf("my pid is %s\n", pid==0 ? "zero" : "non-zero");
/* Sometimes child goes first (non-zero), sometimes parent (zero). This
printing means we can detect if we correctly get a zero result and a
non-zero result (--> three 'X's printed), but the output doesn't depend
on the order. */
printf("%s", pid==0 ? "X" : "XX");
return 0;
}

View File

@ -1,2 +1 @@
my pid is non-zero
my pid is zero
XXX