Change quark-test to use /bin/true instead of itself #207
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Basically our tests fork and exec itself with a -N (nop) option, we then look at process events and check if it's what we wanted.
This all worked great before as we used to figure out who we were by readlink(/proc/self/exe), but then I introduced the valgrind tests, where /proc/self/exe is some valgrind binary, not "us" (documented in bbf265b), so I changed the way we figure "us" by doing realpath(argv0), which is also bad.
The problem with realpath(argv0) is that it's not sufficient if quark-test was executed via some PATH directory, just copy quark-test into $HOME/bin, and then cd /tmp && quark-test and it will fail, as binpath() won't find it.
So stop this madness, use /bin/true for nop, instead of execing ourselves, which involves us also adding a /bin/true to the initramfs, so one is provided.