diff --git a/tests/scripts/run-test.sh b/tests/scripts/run-test.sh index ef628aa..a68504d 100755 --- a/tests/scripts/run-test.sh +++ b/tests/scripts/run-test.sh @@ -94,7 +94,7 @@ for test_case in $testcases; do $(run_test_sync $script > $(get_test_console_file $script)) & - sleep 3 + sleep 5 done script="$main_script" diff --git a/tests/scripts/testcases/nfs-kdump/0-server.sh b/tests/scripts/testcases/nfs-kdump/0-server.sh index 04f102e..41a0212 100755 --- a/tests/scripts/testcases/nfs-kdump/0-server.sh +++ b/tests/scripts/testcases/nfs-kdump/0-server.sh @@ -8,6 +8,9 @@ on_build() { img_run_cmd "echo /srv/nfs 192.168.77.1/24\(rw,async,insecure,no_root_squash\) > /etc/exports" img_run_cmd "systemctl enable nfs-server" + img_run_cmd "touch /etc/systemd/resolved.conf" + img_run_cmd "echo DNSStubListener=no >> /etc/systemd/resolved.conf" + img_run_cmd "echo interface=eth0 > /etc/dnsmasq.conf" img_run_cmd "echo dhcp-authoritative >> /etc/dnsmasq.conf" img_run_cmd "echo dhcp-range=192.168.77.50,192.168.77.100,255.255.255.0,12h >> /etc/dnsmasq.conf" diff --git a/tests/scripts/testcases/nfs-kdump/1-client.sh b/tests/scripts/testcases/nfs-kdump/1-client.sh index 4122bb8..184c795 100755 --- a/tests/scripts/testcases/nfs-kdump/1-client.sh +++ b/tests/scripts/testcases/nfs-kdump/1-client.sh @@ -15,7 +15,7 @@ core_collector makedumpfile -l --message-level 7 -d 31 EOF while ! ping -c 1 $nfs_server -W 1; do - : + sleep 1 done kdumpctl start || test_failed "Failed to start kdump" diff --git a/tests/scripts/testcases/ssh-kdump/0-server.sh b/tests/scripts/testcases/ssh-kdump/0-server.sh index f1e5073..6dfcc91 100755 --- a/tests/scripts/testcases/ssh-kdump/0-server.sh +++ b/tests/scripts/testcases/ssh-kdump/0-server.sh @@ -9,6 +9,9 @@ on_build() { img_run_cmd 'sed -i "s/^.*PermitRootLogin .*\$/PermitRootLogin yes/" /etc/ssh/sshd_config' img_run_cmd "systemctl enable sshd" + img_run_cmd "touch /etc/systemd/resolved.conf" + img_run_cmd "echo DNSStubListener=no >> /etc/systemd/resolved.conf" + img_run_cmd "echo interface=eth0 > /etc/dnsmasq.conf" img_run_cmd "echo dhcp-authoritative >> /etc/dnsmasq.conf" img_run_cmd "echo dhcp-range=192.168.77.50,192.168.77.100,255.255.255.0,12h >> /etc/dnsmasq.conf" diff --git a/tests/scripts/testcases/ssh-kdump/1-client.sh b/tests/scripts/testcases/ssh-kdump/1-client.sh index bd03eff..be549c3 100755 --- a/tests/scripts/testcases/ssh-kdump/1-client.sh +++ b/tests/scripts/testcases/ssh-kdump/1-client.sh @@ -14,7 +14,7 @@ ssh root@192.168.77.1 core_collector makedumpfile -l --message-level 7 -d 31 -F EOF - ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa <<< y &>/dev/ttyS1 + ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa <<< y while ! ping -c 1 $ssh_server -W 1; do sleep 1 @@ -24,9 +24,11 @@ EOF ssh-keyscan -H 192.168.77.1 > /root/.ssh/known_hosts done - sshpass -p fedora ssh-copy-id root@$ssh_server -f &>/dev/ttyS1 + sshpass -p fedora ssh $ssh_server "mkdir /root/.ssh" + cat /root/.ssh/id_rsa.pub | sshpass -p fedora ssh $ssh_server "cat >> /root/.ssh/authorized_keys" - sshpass -p fedora kdumpctl propagate &>/dev/ttyS1 + sshpass -p fedora kdumpctl propagate + cat /root/.ssh/kdump_id_rsa.pub | sshpass -p fedora ssh $ssh_server "cat >> /root/.ssh/authorized_keys" kdumpctl start || test_failed "Failed to start kdump"