public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: lib/portage/tests/glsa/
@ 2023-06-16  2:27 John Helmert III
  0 siblings, 0 replies; 3+ messages in thread
From: John Helmert III @ 2023-06-16  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     bc9342d07f5a46f9ef5a220144decb9553342669
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 16 02:26:57 2023 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Fri Jun 16 02:26:57 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=bc9342d0

tests/glsa/test_security_set: test glsa with invalid range attribute

Bug: https://bugs.gentoo.org/905660
Closes: https://github.com/gentoo/portage/pull/1056
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 lib/portage/tests/glsa/test_security_set.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/portage/tests/glsa/test_security_set.py b/lib/portage/tests/glsa/test_security_set.py
index 35f7aa5ab..867a7cd4f 100644
--- a/lib/portage/tests/glsa/test_security_set.py
+++ b/lib/portage/tests/glsa/test_security_set.py
@@ -209,6 +209,16 @@ class SecuritySetTestCase(TestCase):
                 # Two valid arches followed by an invalid one
                 "arch": "amd64 sparc $$$$",
             },
+            {
+                "glsa_id": "201301-07",
+                "pkgname": "A-vulnerable",
+                "cp": "cat/A-vulnerable",
+                "unaffected_range": "None",
+                "affected_range": "lt",
+                "unaffected_version": "2.2",
+                "affected_version": "2.2",
+                "arch": "*",
+            },
         )
 
         world = ["cat/A"]


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/tests/glsa/
@ 2023-06-16  2:27 John Helmert III
  0 siblings, 0 replies; 3+ messages in thread
From: John Helmert III @ 2023-06-16  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     924c9655c71622315fb8f9fbb5167e4a2e5650b8
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 16 02:26:53 2023 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Fri Jun 16 02:26:54 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=924c9655

tests/glsa/test_security_set: support manipulation of glsa range attributes

Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 lib/portage/tests/glsa/test_security_set.py | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/lib/portage/tests/glsa/test_security_set.py b/lib/portage/tests/glsa/test_security_set.py
index 968e2bf2b..35f7aa5ab 100644
--- a/lib/portage/tests/glsa/test_security_set.py
+++ b/lib/portage/tests/glsa/test_security_set.py
@@ -30,8 +30,8 @@ class SecuritySetTestCase(TestCase):
   <access>remote</access>
   <affected>
     <package name="%(cp)s" auto="yes" arch="%(arch)s">
-      <unaffected range="ge">%(unaffected_version)s</unaffected>
-      <vulnerable range="lt">%(unaffected_version)s</vulnerable>
+      <unaffected range="%(unaffected_range)s">%(unaffected_version)s</unaffected>
+      <vulnerable range="%(affected_range)s">%(affected_version)s</vulnerable>
     </package>
   </affected>
   <background>
@@ -96,21 +96,30 @@ class SecuritySetTestCase(TestCase):
                 "glsa_id": "201301-01",
                 "pkgname": "A-vulnerable",
                 "cp": "cat/A-vulnerable",
+                "unaffected_range": "ge",
+                "affected_range": "lt",
                 "unaffected_version": "2.2",
+                "affected_version": "2.2",
                 "arch": "*",
             },
             {
                 "glsa_id": "201301-02",
                 "pkgname": "B-not-vulnerable",
                 "cp": "cat/B-not-vulnerable",
+                "unaffected_range": "ge",
+                "affected_range": "lt",
                 "unaffected_version": "4.4",
+                "affected_version": "4.4",
                 "arch": "*",
             },
             {
                 "glsa_id": "201301-03",
                 "pkgname": "NotInstalled",
                 "cp": "cat/NotInstalled",
+                "unaffected_range": "ge",
+                "affected_range": "lt",
                 "unaffected_version": "3.5",
+                "affected_version": "3.5",
                 "arch": "*",
             },
         )
@@ -171,7 +180,10 @@ class SecuritySetTestCase(TestCase):
                 "glsa_id": "201301-04",
                 "pkgname": "A-vulnerable",
                 "cp": "cat/A-vulnerable",
+                "unaffected_range": "ge",
+                "affected_range": "lt",
                 "unaffected_version": "2.2",
+                "affected_version": "2.2",
                 # Use an invalid delimiter (comma)
                 "arch": "amd64,sparc",
             },
@@ -179,7 +191,10 @@ class SecuritySetTestCase(TestCase):
                 "glsa_id": "201301-05",
                 "pkgname": "A-vulnerable",
                 "cp": "cat/A-vulnerable",
+                "unaffected_range": "ge",
+                "affected_range": "lt",
                 "unaffected_version": "2.2",
+                "affected_version": "2.2",
                 # Use an invalid arch (~arch)
                 "arch": "~amd64",
             },
@@ -187,7 +202,10 @@ class SecuritySetTestCase(TestCase):
                 "glsa_id": "201301-06",
                 "pkgname": "A-vulnerable",
                 "cp": "cat/A-vulnerable",
+                "unaffected_range": "ge",
+                "affected_range": "lt",
                 "unaffected_version": "2.2",
+                "affected_version": "2.2",
                 # Two valid arches followed by an invalid one
                 "arch": "amd64 sparc $$$$",
             },


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/tests/glsa/
@ 2024-02-09 21:40 Zac Medico
  0 siblings, 0 replies; 3+ messages in thread
From: Zac Medico @ 2024-02-09 21:40 UTC (permalink / raw
  To: gentoo-commits

commit:     9cbc53ad6c483500c949c1acd70c6cbb2d7cee86
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  9 21:38:22 2024 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Feb  9 21:38:39 2024 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=9cbc53ad

SecuritySetTestCase: Disable playground debug so tempdir is cleaned up

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/tests/glsa/test_security_set.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/portage/tests/glsa/test_security_set.py b/lib/portage/tests/glsa/test_security_set.py
index a0ba1e5b45..1206d9f80f 100644
--- a/lib/portage/tests/glsa/test_security_set.py
+++ b/lib/portage/tests/glsa/test_security_set.py
@@ -1,4 +1,4 @@
-# Copyright 2013-2023 Gentoo Authors
+# Copyright 2013-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 
@@ -226,7 +226,7 @@ class SecuritySetTestCase(TestCase):
         # Give each GLSA a clean slate
         for glsa in glsas:
             playground = ResolverPlayground(
-                ebuilds=ebuilds, installed=installed, world=world, debug=True
+                ebuilds=ebuilds, installed=installed, world=world, debug=False
             )
 
             try:


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

end of thread, other threads:[~2024-02-09 21:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-16  2:27 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/glsa/ John Helmert III
  -- strict thread matches above, loose matches on Subject: below --
2023-06-16  2:27 John Helmert III
2024-02-09 21:40 Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox