Skip to content

Commit

Permalink
Merge pull request #18019 from jknphy/netdev
Browse files Browse the repository at this point in the history
Get NETDEV from the SUT in certain s390x scenarios
  • Loading branch information
jknphy committed Oct 19, 2023
2 parents 387fb67 + b50cb16 commit 0d63182
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tests/security/cc/ipsec/ipsec_client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ use audit_test;
use atsec_test;
use Utils::Architectures;
use lockapi;
use network_utils 'iface';

sub run {
my ($self) = @_;
select_console 'root-console';

# We don't run setup_multimachine in s390x, but we need to know the server and client's
# ip address, so we add a known ip to NETDEV.
my $netdev = get_var('NETDEV', 'eth0');
my $netdev = iface;
assert_script_run("ip addr add $atsec_test::client_ip/24 dev $netdev") if (is_s390x);

assert_script_run("cd $audit_test::test_dir/ipsec_configuration/toe");
Expand Down
3 changes: 2 additions & 1 deletion tests/security/cc/ipsec/ipsec_server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ use atsec_test;
use Utils::Architectures;
use lockapi;
use mmapi 'get_children';
use network_utils 'iface';

sub run {
my ($self) = @_;
select_console 'root-console';

# We don't run setup_multimachine in s390x, but we need to know the server and client's
# ip address, so we add a known ip to NETDEV.
my $netdev = get_var('NETDEV', 'eth0');
my $netdev = iface;
assert_script_run("ip addr add $atsec_test::server_ip/24 dev $netdev") if (is_s390x);

assert_script_run("cd $audit_test::test_dir/ipsec_configuration/server");
Expand Down
3 changes: 2 additions & 1 deletion tests/security/mariadb/mariadb_ssl_client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use testapi;
use utils;
use Utils::Architectures;
use lockapi;
use network_utils 'iface';

sub run {
my ($self) = @_;
Expand All @@ -28,7 +29,7 @@ sub run {

# We don't run setup_multimachine in s390x, but we need to know the server and client's
# ip address, so we add a known ip to NETDEV.
my $netdev = get_var('NETDEV', 'eth0');
my $netdev = iface;
assert_script_run("ip addr add $client_ip/24 dev $netdev") if (is_s390x);

zypper_call('in mariadb');
Expand Down
3 changes: 2 additions & 1 deletion tests/security/mariadb/mariadb_ssl_server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use utils;
use Utils::Architectures;
use lockapi;
use mmapi 'wait_for_children';
use network_utils 'iface';

sub run {
my ($self) = @_;
Expand All @@ -27,7 +28,7 @@ sub run {

# We don't run setup_multimachine in s390x, but we need to know the server and client's
# ip address, so we add a known ip to NETDEV.
my $netdev = get_var('NETDEV', 'eth0');
my $netdev = iface;
assert_script_run("ip addr add $server_ip/24 dev $netdev") if (is_s390x);
systemctl("stop firewalld") if (is_s390x);

Expand Down
3 changes: 2 additions & 1 deletion tests/security/postgresql_ssl/postgresql_ssl_client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use testapi;
use utils;
use Utils::Architectures;
use lockapi;
use network_utils 'iface';

sub run {
my ($self) = @_;
Expand All @@ -27,7 +28,7 @@ sub run {

# We don't run setup_multimachine in s390x, but we need to know the server and client's
# ip address, so we add a known ip to NETDEV
my $netdev = get_var('NETDEV', 'eth0');
my $netdev = iface;
assert_script_run("ip addr add $client_ip/24 dev $netdev") if (is_s390x);
systemctl("stop firewalld");

Expand Down
3 changes: 2 additions & 1 deletion tests/security/postgresql_ssl/postgresql_ssl_server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use utils;
use Utils::Architectures;
use lockapi;
use mmapi 'wait_for_children';
use network_utils 'iface';

sub run {
my ($self) = @_;
Expand All @@ -28,7 +29,7 @@ sub run {

# We don't run setup_multimachine in s390x, but we need to know the server and client's
# ip address, so we add a known ip to NETDEV
my $netdev = get_var('NETDEV', 'eth0');
my $netdev = iface;
assert_script_run("ip addr add $server_ip/24 dev $netdev") if (is_s390x);
systemctl("stop firewalld");

Expand Down

0 comments on commit 0d63182

Please sign in to comment.