-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: use custom wait for watching/helpers.sh #8201
test: use custom wait for watching/helpers.sh #8201
Conversation
#8201 (40242a5) changes the metrics as follows in comparison to Benchmark: defaultTest: dune monorepo benchmarks
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing if this will fix the ./helpers.sh: line 25: wait: pid 79252 is not a child of this shell
bug I get on every run.
I was implementing something similar (sleep in a loop) but maybe it would be useful to automatically abort after a certain amount of time/iterations have passed to prevent e.g. CI instances from busywaiting.
@Leonidas-from-XIV The issue with that is it will be very system dependent. Something that takes 1s on my machine may take a lot longer on another. I chose the .1s value on purpose so to not be too slow and not keep the OS busy. |
@Alizter The problem is that if there is no other cancellation it will busy-wait forever (and unlike |
2fbe0ae
to
8ca17e0
Compare
8ca17e0
to
f7cf0e8
Compare
@rgrinberg I didn't know that @Leonidas-from-XIV There is already a timeout with this command it seems, so I've changed it back to the regular wait. |
b330a92
to
563a4c3
Compare
563a4c3
to
285a1e7
Compare
I just opened #8303 to fix this same issue, but then closed it because this already exists. I don't have a preference either way, but in case it hasn't already been considered, switching from |
if [ "$(uname -s)" = "Linux" ] | ||
then | ||
# wait for all child processes | ||
wait $(jobs -p); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use phil's tail hack instead of this. it seems like it's a more faithful emulation of waiting for $pid
than waiting for all jobs.
It's not. But it's the better workaround on Linux |
This allows the fs-memo.t test to succeed on Nix. Before the pid of Dune was being thrown away by a bash bug causing wait to think it was not a child process and rejecting it. We therefore wait instead for all child processes. Signed-off-by: Ali Caglayan <alizter@gmail.com>
7011259
to
8fb2d30
Compare
@rgrinberg I've used |
This allows the fs-memo.t test to succeed on Nix. Before the pid of Dune was being thrown away by a bash bug causing wait to think it was not a child process and rejecting it. We therefore wait instead for all child processes.