tests: fix tests for nm_utils_kill_child() by using "bash"

Seems that "dash" has issues with trap EXIT. This causes
test failures on systems where the default shell is not "bash".

[thaller@redhat.com: patch extracted from BZ and modified to
 use bash everywhere]
https://bugzilla.gnome.org/show_bug.cgi?id=761146
This commit is contained in:
Michael Biebl 2016-01-28 10:06:40 +01:00 committed by Thomas Haller
parent fc7c333d84
commit 06dbbb899c

View file

@ -225,33 +225,33 @@ test_nm_utils_kill_child (void)
int err;
GLogLevelFlags fatal_mask;
char *argv_watchdog[] = {
"sh",
"bash",
"-c",
"sleep 4; "
"kill -KILL 0; #watchdog for #" TEST_TOKEN,
NULL,
};
char *argv1[] = {
"sh",
"bash",
"-c",
"trap \"sleep 0.3; exit 10\" EXIT; "
"sleep 100000; exit $? #" TEST_TOKEN,
NULL,
};
char *argv2[] = {
"sh",
"bash",
"-c",
"exit 47; #" TEST_TOKEN,
NULL,
};
char *argv3[] = {
"sh",
"bash",
"-c",
"trap \"exit 47\" TERM; while true; do :; done; #" TEST_TOKEN,
NULL,
};
char *argv4[] = {
"sh",
"bash",
"-c",
"trap \"while true; do :; done\" TERM; while true; do :; done; #" TEST_TOKEN,
NULL,