[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7606] shell builtin "test" not invoked if appears alone
From: |
kabe |
Subject: |
[7606] shell builtin "test" not invoked if appears alone |
Date: |
Fri, 6 Feb 2004 23:25:26 JST |
(Also submitted as BugID 7606)
(Platform: QNX 6.2.0)
* When a "test" command is a shell builtin, and
* no /bin/test as a file is provided in the system,
all:
test
will fail with "make: test: Command not found" .
You could easily reproduce this by setting PATH to bogus path, as
$ PATH=/nosuchdir /usr/gnu/bin/make
POSIX says the line should be processed like system("test")
which will be execvp("/bin/sh","-c","test") which will succeed,
but GNU make tries to optimize avoiding /bin/sh,
which tries execvp("test") and fails.
GNU automake uses this bare "test" in several testsuite.
Suggested patch:
Just add "test" to the shell builtin table in job.c .
This shouldn't hurt platforms which has/needs explicit /bin/test.
================================================
--- job.c.dist Sat Aug 10 01:27:17 2002
+++ job.c Fri Feb 6 14:04:54 2004
@@ -2484,7 +2484,7 @@
"logout", "set", "umask", "wait", "while", "for",
"case", "if", ":", ".", "break", "continue",
"export", "read", "readonly", "shift", "times",
- "trap", "switch", 0 };
+ "trap", "switch", "test", 0 };
#endif /* WINDOWS32 */
#endif /* Amiga */
#endif /* __MSDOS__ */
================================================
- [7606] shell builtin "test" not invoked if appears alone,
kabe <=