public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "John Helmert III" <ajak@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/glsa/
Date: Fri, 16 Jun 2023 02:27:18 +0000 (UTC)	[thread overview]
Message-ID: <1686882414.924c9655c71622315fb8f9fbb5167e4a2e5650b8.ajak@gentoo> (raw)

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 $$$$",
             },


             reply	other threads:[~2023-06-16  2:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16  2:27 John Helmert III [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-06-16  2:27 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/glsa/ John Helmert III
2024-02-09 21:40 Zac Medico

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=1686882414.924c9655c71622315fb8f9fbb5167e4a2e5650b8.ajak@gentoo \
    --to=ajak@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox