All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-security][PATCH 1/3] python3-suricata-update: update to 1.1.1
@ 2019-12-17  4:48 Armpit
  2019-12-17  4:48 ` [meta-security][PATCH 2/3] libhtp: bugfix only update 0.5.32 Armpit
  2019-12-17  4:48 ` [meta-security][PATCH 3/3] lib/oeqa/runtime: suricata add tests Armpit
  0 siblings, 2 replies; 3+ messages in thread
From: Armpit @ 2019-12-17  4:48 UTC (permalink / raw)
  To: yocto

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 ...icata-update_1.0.5.bb => python3-suricata-update_1.1.1.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename recipes-ids/suricata/{python3-suricata-update_1.0.5.bb => python3-suricata-update_1.1.1.bb} (86%)

diff --git a/recipes-ids/suricata/python3-suricata-update_1.0.5.bb b/recipes-ids/suricata/python3-suricata-update_1.1.1.bb
similarity index 86%
rename from recipes-ids/suricata/python3-suricata-update_1.0.5.bb
rename to recipes-ids/suricata/python3-suricata-update_1.1.1.bb
index 63f75e0..0070b5b 100644
--- a/recipes-ids/suricata/python3-suricata-update_1.0.5.bb
+++ b/recipes-ids/suricata/python3-suricata-update_1.1.1.bb
@@ -5,8 +5,8 @@ LICENSE = "GPLv2"
 
 LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548"
 
-SRCREV = "dcd0f630e13463750efb1593ad3ccae1ae6c27d4"
-SRC_URI = "git://github.com/OISF/suricata-update;branch='master-1.0.x'"
+SRCREV = "9630630ffc493ca26299d174ee2066aa1405b2d4"
+SRC_URI = "git://github.com/OISF/suricata-update;branch='master-1.1.x'"
 
 S = "${WORKDIR}/git"
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [meta-security][PATCH 2/3] libhtp: bugfix only update 0.5.32
  2019-12-17  4:48 [meta-security][PATCH 1/3] python3-suricata-update: update to 1.1.1 Armpit
@ 2019-12-17  4:48 ` Armpit
  2019-12-17  4:48 ` [meta-security][PATCH 3/3] lib/oeqa/runtime: suricata add tests Armpit
  1 sibling, 0 replies; 3+ messages in thread
From: Armpit @ 2019-12-17  4:48 UTC (permalink / raw)
  To: yocto

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 recipes-ids/suricata/{libhtp_0.5.31.bb => libhtp_0.5.32.bb} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename recipes-ids/suricata/{libhtp_0.5.31.bb => libhtp_0.5.32.bb} (100%)

diff --git a/recipes-ids/suricata/libhtp_0.5.31.bb b/recipes-ids/suricata/libhtp_0.5.32.bb
similarity index 100%
rename from recipes-ids/suricata/libhtp_0.5.31.bb
rename to recipes-ids/suricata/libhtp_0.5.32.bb
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [meta-security][PATCH 3/3] lib/oeqa/runtime: suricata add tests
  2019-12-17  4:48 [meta-security][PATCH 1/3] python3-suricata-update: update to 1.1.1 Armpit
  2019-12-17  4:48 ` [meta-security][PATCH 2/3] libhtp: bugfix only update 0.5.32 Armpit
@ 2019-12-17  4:48 ` Armpit
  1 sibling, 0 replies; 3+ messages in thread
From: Armpit @ 2019-12-17  4:48 UTC (permalink / raw)
  To: yocto

drop the unit test as it should be run via ptest
add more tests for python3-suricata-update

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 lib/oeqa/runtime/cases/suricata.py | 63 ++++++++++++++++++++++++++----
 1 file changed, 56 insertions(+), 7 deletions(-)

diff --git a/lib/oeqa/runtime/cases/suricata.py b/lib/oeqa/runtime/cases/suricata.py
index 17fc8c5..7f052ec 100644
--- a/lib/oeqa/runtime/cases/suricata.py
+++ b/lib/oeqa/runtime/cases/suricata.py
@@ -1,6 +1,7 @@
 # Copyright (C) 2019 Armin Kuster <akuster808@gmail.com>
 #
 import re
+from tempfile import mkstemp
 
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
@@ -9,6 +10,22 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 class SuricataTest(OERuntimeTestCase):
 
+    @classmethod
+    def setUpClass(cls):
+        cls.tmp_fd, cls.tmp_path = mkstemp()
+        with os.fdopen(cls.tmp_fd, 'w') as f:
+            # use google public dns
+            f.write("nameserver 8.8.8.8")
+            f.write(os.linesep)
+            f.write("nameserver 8.8.4.4")
+            f.write(os.linesep)
+            f.write("nameserver 127.0.0.1")
+            f.write(os.linesep)
+
+    @classmethod
+    def tearDownClass(cls):
+        os.remove(cls.tmp_path)
+
     @OEHasPackage(['suricata'])
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     def test_suricata_help(self):
@@ -18,10 +35,42 @@ class SuricataTest(OERuntimeTestCase):
         self.assertEqual(status, 1, msg = msg)
 
     @OETestDepends(['suricata.SuricataTest.test_suricata_help'])
-    def test_suricata_unittest(self):
-        status, output = self.target.run('suricata -u')
-        match = re.search('FAILED: 0 ', output)
-        if not match:
-            msg = ('suricata unittest had an unexpected failure. '
-               'Status and output:%s and %s' % (status, output))
-            self.assertEqual(status, 0, msg = msg)
+    def test_ping_openinfosecfoundation_org(self):
+        dst = '/etc/resolv.conf'
+        self.tc.target.run('rm -f %s' % dst)
+        (status, output) = self.tc.target.copyTo(self.tmp_path, dst)
+        msg = 'File could not be copied. Output: %s' % output
+        self.assertEqual(status, 0, msg=msg)
+
+        status, output = self.target.run('ping -c 1 openinfosecfoundation.org')
+        msg = ('ping openinfosecfoundation.org failed: output is:\n%s' % output)
+        self.assertEqual(status, 0, msg = msg)
+
+    @OEHasPackage(['python3-suricata-update'])
+    @OETestDepends(['suricata.SuricataTest.test_ping_openinfosecfoundation_org'])
+    def test_suricata_update(self):
+        status, output = self.tc.target.run('suricata-update')
+        msg = ('suricata-update had an unexpected failure. '
+           'Status and output:%s and %s' % (status, output))
+        self.assertEqual(status, 0, msg = msg)
+
+    @OETestDepends(['suricata.SuricataTest.test_suricata_update'])
+    def test_suricata_update_sources_list(self):
+        status, output = self.tc.target.run('suricata-update list-sources')
+        msg = ('suricata-update list-sources had an unexpected failure. '
+           'Status and output:%s and %s' % (status, output))
+        self.assertEqual(status, 0, msg = msg)
+
+    @OETestDepends(['suricata.SuricataTest.test_suricata_update_sources_list'])
+    def test_suricata_update_sources(self):
+        status, output = self.tc.target.run('suricata-update update-sources')
+        msg = ('suricata-update update-sources had an unexpected failure. '
+           'Status and output:%s and %s' % (status, output))
+        self.assertEqual(status, 0, msg = msg)
+
+    @OETestDepends(['suricata.SuricataTest.test_suricata_update_sources'])
+    def test_suricata_update_enable_source(self):
+        status, output = self.tc.target.run('suricata-update enable-source oisf/trafficid')
+        msg = ('suricata-update enable-source oisf/trafficid  had an unexpected failure. '
+           'Status and output:%s and %s' % (status, output))
+        self.assertEqual(status, 0, msg = msg)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-17  4:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17  4:48 [meta-security][PATCH 1/3] python3-suricata-update: update to 1.1.1 Armpit
2019-12-17  4:48 ` [meta-security][PATCH 2/3] libhtp: bugfix only update 0.5.32 Armpit
2019-12-17  4:48 ` [meta-security][PATCH 3/3] lib/oeqa/runtime: suricata add tests Armpit

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.