diff mbox series

[meta-security,05/18] oeqa runtime clamav.py: use curl if ping fails

Message ID 20241220140441.271395-6-mikko.rapeli@linaro.org
State New
Headers show
Series various updates | expand

Commit Message

Mikko Rapeli Dec. 20, 2024, 2:04 p.m. UTC
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>
---
 lib/oeqa/runtime/cases/clamav.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/oeqa/runtime/cases/clamav.py b/lib/oeqa/runtime/cases/clamav.py
index e0cad8f..bcafc84 100644
--- a/lib/oeqa/runtime/cases/clamav.py
+++ b/lib/oeqa/runtime/cases/clamav.py
@@ -43,7 +43,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)