[test suite] use killall to ensure fwknopd is stopped between tests

This commit is contained in:
Michael Rash
2015-12-10 14:33:51 -08:00
parent 4cab37acf9
commit 75b059af76
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -7920,6 +7920,8 @@ sub stop_fwknopd() {
} else {
&write_test_file("[-] stop_fwknopd() fwknopd is not running.\n",
$curr_test_file);
### make certain there is no running fwknopd process
system "$killall_path fwknopd 2> /dev/null" if $killall_path;
return;
}
@@ -7976,6 +7978,11 @@ sub stop_fwknopd() {
}
}
### make certain fwknopd is stopped. Test suite interactions with fwknop
### are complex, and having a running fwknopd process that may be been
### "lost" can interfere with test results
system "$killall_path fwknopd 2> /dev/null" if $killall_path;
return;
}
+4
View File
@@ -119,6 +119,10 @@
'fwknopd_cmdline' => "$fwknopdCmd -c $cf{'def'} -a $sudo_access_conf " .
"-d $default_digest_file -p $default_pid_file $intf_str",
'sudo_test' => $YES,
### write_sudo_access_conf() swaps out 'TOUCH' with the path to
### the touch binary, which might change from system to system. Also
### 'USER' is swapped out with the owner of the test suite files
### (not necessarily root).
'sudo_conf' => 'USER localhost = NOPASSWD: /usr/bin/cat, TOUCH',
'cmd_exec_file_owner' => 'root',
'fw_rule_created' => $REQUIRE_NO_NEW_RULE,