[test suite] added command cycle close NONE test
This commit is contained in:
parent
0bf4993071
commit
f6829fe527
@ -196,6 +196,7 @@ EXTRA_DIST = \
|
|||||||
test/conf/hmac_cmd_open_close_cycle_access3.conf \
|
test/conf/hmac_cmd_open_close_cycle_access3.conf \
|
||||||
test/conf/hmac_cmd_open_close_cycle_access4.conf \
|
test/conf/hmac_cmd_open_close_cycle_access4.conf \
|
||||||
test/conf/hmac_cmd_open_close_cycle_access5.conf \
|
test/conf/hmac_cmd_open_close_cycle_access5.conf \
|
||||||
|
test/conf/hmac_cmd_open_close_cycle_access6.conf \
|
||||||
test/conf/hmac_cmd_open_close_multi_cycle_access.conf \
|
test/conf/hmac_cmd_open_close_multi_cycle_access.conf \
|
||||||
test/conf/hmac_get_key_access.conf \
|
test/conf/hmac_get_key_access.conf \
|
||||||
test/conf/hmac_no_b64_access.conf \
|
test/conf/hmac_no_b64_access.conf \
|
||||||
|
|||||||
5
test/conf/hmac_cmd_open_close_cycle_access6.conf
Normal file
5
test/conf/hmac_cmd_open_close_cycle_access6.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
SOURCE ANY
|
||||||
|
KEY_BASE64 wzNP62oPPgEc+kXDPQLHPOayQBuNbYUTPP+QrErNDmg=
|
||||||
|
HMAC_KEY_BASE64 Yh+xizBnl6FotC5ec7FanVGClRMlsOAPh2u6eovnerfBVKwaVKzjGoblFMHMc593TNyi0dWn4opLoTIV9q/ttg==
|
||||||
|
CMD_CYCLE_OPEN /usr/bin/touch /tmp/$SRC
|
||||||
|
CMD_CYCLE_CLOSE NONE
|
||||||
@ -443,6 +443,7 @@ our %cf = (
|
|||||||
'hmac_cmd_open_close_cycle_access3' => "$conf_dir/hmac_cmd_open_close_cycle_access3.conf",
|
'hmac_cmd_open_close_cycle_access3' => "$conf_dir/hmac_cmd_open_close_cycle_access3.conf",
|
||||||
'hmac_cmd_open_close_cycle_access4' => "$conf_dir/hmac_cmd_open_close_cycle_access4.conf",
|
'hmac_cmd_open_close_cycle_access4' => "$conf_dir/hmac_cmd_open_close_cycle_access4.conf",
|
||||||
'hmac_cmd_open_close_cycle_access5' => "$conf_dir/hmac_cmd_open_close_cycle_access5.conf",
|
'hmac_cmd_open_close_cycle_access5' => "$conf_dir/hmac_cmd_open_close_cycle_access5.conf",
|
||||||
|
'hmac_cmd_open_close_cycle_access6' => "$conf_dir/hmac_cmd_open_close_cycle_access6.conf",
|
||||||
'hmac_cmd_open_close_multi_cycle_access' => "$conf_dir/hmac_cmd_open_close_multi_cycle_access.conf",
|
'hmac_cmd_open_close_multi_cycle_access' => "$conf_dir/hmac_cmd_open_close_multi_cycle_access.conf",
|
||||||
'spa_destination' => "$conf_dir/destination_rule_fwknopd.conf",
|
'spa_destination' => "$conf_dir/destination_rule_fwknopd.conf",
|
||||||
"${fw_conf_prefix}_spa_dst_snat" => "$conf_dir/${fw_conf_prefix}_spa_dst_snat_fwknopd.conf",
|
"${fw_conf_prefix}_spa_dst_snat" => "$conf_dir/${fw_conf_prefix}_spa_dst_snat_fwknopd.conf",
|
||||||
@ -4862,6 +4863,7 @@ sub spa_cmd_open_close_exec_cycle() {
|
|||||||
unlink $file if -e $file;
|
unlink $file if -e $file;
|
||||||
}
|
}
|
||||||
for my $file (@{$test_hr->{'cmd_cycle_close_file'}}) {
|
for my $file (@{$test_hr->{'cmd_cycle_close_file'}}) {
|
||||||
|
next if $file eq 'NONE';
|
||||||
unlink $file if -e $file;
|
unlink $file if -e $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4872,9 +4874,11 @@ sub spa_cmd_open_close_exec_cycle() {
|
|||||||
$rv = 0;
|
$rv = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unless (&file_check_and_remove('cycle close file',
|
unless ($test_hr->{'cmd_cycle_close_file'} eq 'NONE') {
|
||||||
$test_hr->{'cmd_cycle_close_file'})) {
|
unless (&file_check_and_remove('cycle close file',
|
||||||
$rv = 0;
|
$test_hr->{'cmd_cycle_close_file'})) {
|
||||||
|
$rv = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rv;
|
return $rv;
|
||||||
@ -4885,6 +4889,7 @@ sub file_check_and_remove() {
|
|||||||
my $rv = 1;
|
my $rv = 1;
|
||||||
|
|
||||||
for my $file (@$files_ar) {
|
for my $file (@$files_ar) {
|
||||||
|
next if $file eq 'NONE';
|
||||||
if (-e $file) {
|
if (-e $file) {
|
||||||
&write_test_file(
|
&write_test_file(
|
||||||
"[+] $log_str $file exists after SPA cycle.\n",
|
"[+] $log_str $file exists after SPA cycle.\n",
|
||||||
|
|||||||
@ -87,6 +87,22 @@
|
|||||||
qr/Running.*CLOSE.*in 2 seconds/,
|
qr/Running.*CLOSE.*in 2 seconds/,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'category' => 'Rijndael+HMAC',
|
||||||
|
'subcategory' => 'client+server',
|
||||||
|
'detail' => 'cmd open/close cycle close=NONE',
|
||||||
|
'function' => \&spa_cmd_open_close_exec_cycle,
|
||||||
|
'cmdline' => $default_client_hmac_args,
|
||||||
|
'fwknopd_cmdline' => "$fwknopdCmd -c $cf{'def'} -a $cf{'hmac_cmd_open_close_cycle_access6'} " .
|
||||||
|
"-d $default_digest_file -p $default_pid_file $intf_str",
|
||||||
|
'fw_rule_created' => $REQUIRE_NO_NEW_RULE,
|
||||||
|
'cmd_cycle_open_file' => ['/tmp/127.0.0.2'],
|
||||||
|
'cmd_cycle_close_file' => ['NONE'],
|
||||||
|
'key_file' => $cf{'rc_hmac_b64_key'},
|
||||||
|
'server_negative_output_matches' => [
|
||||||
|
qr/Timer expired/,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
'category' => 'Rijndael+HMAC',
|
'category' => 'Rijndael+HMAC',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user