Fix BZ 339789. /bin/true does not exist on Darwin.

Patch by rhyskidd@gmail.com.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14645
This commit is contained in:
Florian Krohm 2014-10-20 21:29:26 +00:00
parent 2884129bc1
commit dc3f09be77
2 changed files with 5 additions and 0 deletions

1
NEWS
View File

@ -43,6 +43,7 @@ where XXXXXX is the bug number as listed below.
tronical and pushfpopf tests)
339721 assertion 'check_sibling == sibling' failed in readdwarf3.c ...
339789 Fix none/tests/execve test on Mac OS X 10.9
339808 Fix none/tests/rlimit64_nofile test on Mac OS X 10.9
339853 arm64 times syscall unknown
339855 arm64 unhandled getsid/setsid syscalls

View File

@ -8,7 +8,11 @@ int main(int argc, char **argv)
{
// This tests the case where argv and envp are NULL, which is easy to
// get wrong because it's an unusual case.
# if !defined(VGO_darwin)
if (execve("/bin/true", NULL, NULL) < 0)
# else
if (execve("/usr/bin/true", NULL, NULL) < 0)
# endif
{
perror("execve");
exit(1);