diff -Nru libreswan-3.32/debian/changelog libreswan-3.32/debian/changelog --- libreswan-3.32/debian/changelog 2020-08-21 15:00:11.000000000 +0000 +++ libreswan-3.32/debian/changelog 2020-08-24 19:37:54.000000000 +0000 @@ -1,3 +1,10 @@ +libreswan (3.32-3ubuntu2) groovy; urgency=medium + + * d/tests/opportunistic and d/tests/cavp: fix how it exit 77 to skip + the test in case of ping, wget, dig failures. + + -- Eduardo Barretto Mon, 24 Aug 2020 16:37:54 -0300 + libreswan (3.32-3ubuntu1) groovy; urgency=medium * d/tests/control: make opportunistic and cavp skippable if builder diff -Nru libreswan-3.32/debian/tests/cavp libreswan-3.32/debian/tests/cavp --- libreswan-3.32/debian/tests/cavp 2020-08-21 14:59:31.000000000 +0000 +++ libreswan-3.32/debian/tests/cavp 2020-08-24 19:37:54.000000000 +0000 @@ -15,11 +15,8 @@ workdir=$(mktemp -d) cd "$workdir" -wget --quiet https://download.libreswan.org/cavs/{ikev1_dsa,ikev1_psk,ikev2}.fax.bz2 +wget --quiet https://download.libreswan.org/cavs/{ikev1_dsa,ikev1_psk,ikev2}.fax.bz2 || exit 77 bunzip2 *.fax.bz2 -if [ $? -ne 0 ]; then - exit 77 -fi "$cavp" -v2 ikev2.fax | diff -u ikev2.fax - > /dev/null "$cavp" -v1dsa ikev1_dsa.fax | diff -u ikev1_dsa.fax - > /dev/null diff -Nru libreswan-3.32/debian/tests/opportunistic libreswan-3.32/debian/tests/opportunistic --- libreswan-3.32/debian/tests/opportunistic 2020-08-21 14:59:17.000000000 +0000 +++ libreswan-3.32/debian/tests/opportunistic 2020-08-24 19:37:54.000000000 +0000 @@ -5,11 +5,11 @@ badstring='OH noooooos!!' -ping -c 5 oe.libreswan.org 2>&1 +ping -c 5 oe.libreswan.org 2>&1 || exit 77 -dig +short -x `dig +short oe.libreswan.org` ipseckey +trusted-key=/usr/share/dns/root.key +sigchase +dig +short -x `dig +short oe.libreswan.org` ipseckey +trusted-key=/usr/share/dns/root.key +sigchase || exit 77 -wget -q --tries=2 --timeout=5 -O "${AUTOPKGTEST_ARTIFACTS}/before.html" http://oe.libreswan.org/ +wget -q --tries=2 --timeout=5 -O "${AUTOPKGTEST_ARTIFACTS}/before.html" http://oe.libreswan.org/ || exit 77 grep -F "$badstring" "${AUTOPKGTEST_ARTIFACTS}/before.html" @@ -30,18 +30,12 @@ # TODO: better details? ipsec whack --trafficstatus -ping -c 5 oe.libreswan.org 2>&1 -if [ $? -ne 0 ]; then - exit 77 -fi +ping -c 5 oe.libreswan.org 2>&1 || exit 77 systemctl --no-pager status ipsec # now fetch some stuff from oe.libreswan.org, make sure it's good! -wget -q --tries=2 --timeout=5 -O "${AUTOPKGTEST_ARTIFACTS}/after.html" http://oe.libreswan.org/ -if [ $? -ne 0 ]; then - exit 77 -fi +wget -q --tries=2 --timeout=5 -O "${AUTOPKGTEST_ARTIFACTS}/after.html" http://oe.libreswan.org/ || exit 77 if grep -F "$badstring" "${AUTOPKGTEST_ARTIFACTS}/after.html"; then printf "we got 'oh nooooooos' from http://oe.libreswan.org after bringing up opportunistic ipsec\n"