[qmtest] Wrong Exit Codes
Stefan Seefeld
seefeld at sympatico.ca
Sun Apr 23 01:45:21 UTC 2006
Kelly Lucas wrote:
> I recently moved my test suite for another platform, which is code named
> Breezy, the Ubuntu Linux release.
>
> I've previously been running my testsuite using QMTest on RedHat and
> Ubuntu Hoary. However, I was amazed to see that when I ran some negative
> tests, such as attempting to create a file or directory where I don't
> have permissions. On Redhat and Ubuntu Hoary [kernel 2.4x], I would
> always get non zero exit codes on such tests. However, now I'm getting
> exit codes of 0. I don't understand what happened. Code the version of
> python I'm using affect this? Here's an example of a test:
>
> A simple script that tries to touch a file in a directory where it does
> not have write permissions:
>
> touch /home/user/testfile
>
> If I try the same test from a shell script, and echo the exit code, it
> is non zero.
>
> I'm kind of baffled!
I have seen situations in which a non-zero exit code of a command was not
correctly reported back, though I don't remember whether that was a bug
in the script or a problem with a particular shell.
However, I fear I don't have enough details to be able to make meaningful
suggestions. Are you sure you use the same version of QMTest in both cases ?
What about the test class ? Is it any of QMTest's builtin classes ? If not,
could you post some code ? (Especially the one that evaluates the exit code.)
What does your command look like ?
Regards,
Stefan
More information about the qmtest
mailing list