lib/test-fork-safe-execvpe.sh: cope with Alpine Linux / BusyBox limitations
commitf4b8a2fac73068b03f697c84daaa79dfa61a4080
authorLaszlo Ersek <lersek@redhat.com>
Wed, 22 Mar 2023 16:21:40 +0000 (22 17:21 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 22 Mar 2023 16:28:50 +0000 (22 17:28 +0100)
tree45cec7214c8afebd52e9559adcfb66fdf8b09d45
parent0a083bc835a26476d563c91b970c217cdb976ed6
lib/test-fork-safe-execvpe.sh: cope with Alpine Linux / BusyBox limitations

Whenever we expect our "bin/f" and "sh/f" files to execute (and to
succeed), provide "expr" and "sh" as argv[0], respectively. This is to
work around BusyBox, where the central busybox binary selects its behavior
based on argv[0]. See e.g.
<https://bugs.busybox.net/show_bug.cgi?id=15481>.

Also cope with "realpath" (from BusyBox) not accepting the "--"
end-of-options argument separator. See
<https://bugs.busybox.net/show_bug.cgi?id=15466>.

This patch is worth viewing with "git show --color-words" as well.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
lib/test-fork-safe-execvpe.sh