Fix utils unittest TestRunCmd.testTimeoutKill
authorIustin Pop <iustin@google.com>
Mon, 22 Nov 2010 20:42:52 +0000 (21:42 +0100)
committerIustin Pop <iustin@google.com>
Tue, 23 Nov 2010 10:01:08 +0000 (11:01 +0100)
commit815bf6d533526d833e83ff4a946f9d6af331edf3
tree98a62cc187c1c564a6afb306044fa7dd91dfc91f
parentfd25419501048f544acaf23e74a42a3d879ca050
Fix utils unittest TestRunCmd.testTimeoutKill

Currently the test executes "/bin/sh -c 'trap "" TERM …" via the shell,
which means we have two shells involved (the parent one and the child
one, which does the trap). For some weird reason, this works for older
OSes: the first shell exec's the second one, whereas on squeeze it forks
and only then exec. This might be due to changes in Python or bash or
whatever.

In any case, the point is that this is a hacky way to call a shell, so
we change this to simply execute the desired shell directly, without any
intermediate shells (I don't understand why it was written as such
originally).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
test/ganeti.utils_unittest.py