[test suite] use killall to ensure fwknopd is stopped between tests
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user