All of lore.kernel.org
 help / color / mirror / Atom feed
From: Armin Kuster <akuster808@gmail.com>
To: yocto@lists.yoctoproject.org
Subject: [meta-security][PATCH 1/3] oeqa/clamav drop depricated --list-mirror test
Date: Sun, 19 Jun 2022 20:35:02 -0700	[thread overview]
Message-ID: <20220620033504.994851-1-akuster808@gmail.com> (raw)

Fix download test

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 lib/oeqa/runtime/cases/clamav.py | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/lib/oeqa/runtime/cases/clamav.py b/lib/oeqa/runtime/cases/clamav.py
index cf83937..e0cad8f 100644
--- a/lib/oeqa/runtime/cases/clamav.py
+++ b/lib/oeqa/runtime/cases/clamav.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 Armin Kuster <akuster808@gmail.com>
+# Copyright (C) 2019 - 2022 Armin Kuster <akuster808@gmail.com>
 #
 import re
 from tempfile import mkstemp
@@ -48,21 +48,8 @@ class ClamavTest(OERuntimeTestCase):
         self.assertEqual(status, 0, msg = msg)
 
     @OETestDepends(['clamav.ClamavTest.test_ping_clamav_net'])
-    def test_freshclam_check_mirrors(self):
-        status, output = self.target.run('freshclam --list-mirrors')
-        match = re.search('Failures: 0', output)
-        if not match:
-            msg = ('freshclam --list-mirrors: failed. '
-               'Status and output:%s and %s' % (status, output))
-            self.assertEqual(status, 1, msg = msg)
-
-    @OETestDepends(['clamav.ClamavTest.test_freshclam_check_mirrors'])
     def test_freshclam_download(self):
         status, output = self.target.run('freshclam --show-progress')
-        match = re.search('Database updated', output)
-        #match = re.search('main.cvd is up to date', output)
-        if not match:
-            msg = ('freshclam : DB dowbload failed. '
-               'Status and output:%s and %s' % (status, output))
-            self.assertEqual(status, 1, msg = msg)
-
+        msg = ('freshclam : DB dowbload failed. '
+            'Status and output:%s and %s' % (status, output))
+        self.assertEqual(status, 0, msg = msg)
-- 
2.25.1



             reply	other threads:[~2022-06-20  3:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20  3:35 Armin Kuster [this message]
2022-06-20  3:35 ` [meta-security][PATCH 2/3] oeqa: meta-tpm shut swtpm down before and after testing Armin Kuster
2022-06-20  3:35 ` [meta-security][PATCH 3/3] oeqa: shut done swtpm " Armin Kuster
     [not found] ` <16FA36F348A4E548.32537@lists.yoctoproject.org>
2022-06-20  5:36   ` [yocto] " akuster808

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220620033504.994851-1-akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.