Wrong Exit Codes

Kelly Lucas lucaskeli at fastmail.fm
Sun Apr 23 00:06:13 UTC 2006


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!

kdl

-- 
Kelly D. Lucas
lucaskeli at fastmail.fm




More information about the qmtest mailing list