oeqa runtime clamav.py: use curl if ping fails

TEST_RUNQEMUPARAMS = "slirp" does not pass ping through
but UDP and TCP will work. Thus curl the http website
even if the response is DoS blocker and not the real
website.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Mikko Rapeli authored and Armin Kuster committed 2024-12-27 11:28:23 -05:00
1 parent 5c98ff10a6
commit 1851ec38b7
1 file changed
+1 -1
+1 -1
View File
@@ -44,7 +44,7 @@ class ClamavTest(OERuntimeTestCase):
msg = 'File could not be copied. Output: %s' % output
self.assertEqual(status, 0, msg=msg)
status, output = self.target.run('ping -c 1 database.clamav.net')
status, output = self.target.run('ping -c 1 database.clamav.net || curl http://database.clamav.net')
msg = ('ping database.clamav.net failed: output is:\n%s' % output)
self.assertEqual(status, 0, msg = msg)