Hi, The following patch fixes an execve02 bug.
Regards, Louis -- Dr Louis Rilling Kerlabs Skype: louis.rilling Batiment Germanium Phone: (+33|0) 6 80 89 08 23 80 avenue des Buttes de Coesmes http://www.kerlabs.com/ 35700 Rennes
Subject: execve02: make failure explicit
execve02 checks that execve() fails if the caller does not have executable
permission on the file. However, in case the test fails and execve() succeeds,
the default binary (test3) has return code 0, which is interpreted as test
success. We get output like that:
<output>
Hello World
</output>
with return code 0 (success)
instead of:
<output>
execve02 1 FAIL : Failures reported above
</output>
with return code matching FAIL.
This patch simply changes the success return code from 0 to 3, so that execve()
success, and thus test failure, can be properly reported.
Signed-off-by: Louis Rilling <[EMAIL PROTECTED]>
---
testcases/kernel/syscalls/execve/execve02.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: b/testcases/kernel/syscalls/execve/execve02.c
===================================================================
--- a/testcases/kernel/syscalls/execve/execve02.c 2008-05-20 14:20:03.000000000 +0200
+++ b/testcases/kernel/syscalls/execve/execve02.c 2008-05-22 14:05:02.000000000 +0200
@@ -84,7 +84,7 @@ main(int ac, char **av)
{
int lc; /* loop counter */
char *msg; /* message returned from parse_opts */
- int e_code, status, retval=0;
+ int e_code, status, retval=3;
pid_t pid;
/* parse standard options */
@@ -151,7 +151,7 @@ main(int ac, char **av)
wait(&status);
/* make sure the child returned a good exit status */
e_code = status >> 8;
- if ((e_code != 0) || (retval != 0)) {
+ if ((e_code != 3) || (retval != 3)) {
tst_resm(TFAIL, "Failures reported above");
}
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
