mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
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:
parent
ad2f86232e
commit
0eb6b6654a
@ -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;
|
||||
}
|
||||
|
||||
@ -1,2 +1 @@
|
||||
my pid is non-zero
|
||||
my pid is zero
|
||||
XXX
|
||||
Loading…
x
Reference in New Issue
Block a user