public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/process/
Date: Fri, 26 May 2023 15:45:08 +0000 (UTC)	[thread overview]
Message-ID: <1685115876.3db3c517d7e7635f3507f1e7f921dcc9fdd33c9a.sam@gentoo> (raw)

commit:     3db3c517d7e7635f3507f1e7f921dcc9fdd33c9a
Author:     David Palao <david.palao <AT> gmail <DOT> com>
AuthorDate: Mon May  1 09:18:48 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 26 15:44:36 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=3db3c517

tests: process: order of skipif conditions changed

...to agree with the original, checking if:

1. system is not Linux
2. ping is missing
3. portage.process._unshare_validate returns error

Signed-off-by: David Palao <david.palao <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/tests/process/test_unshare_net.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/portage/tests/process/test_unshare_net.py b/lib/portage/tests/process/test_unshare_net.py
index 4c70465f8..7910e1553 100644
--- a/lib/portage/tests/process/test_unshare_net.py
+++ b/lib/portage/tests/process/test_unshare_net.py
@@ -13,7 +13,6 @@ from portage.tests import TestCase
 
 
 CLONE_NEWNET = 0x40000000
-
 UNSHARE_NET_TEST_SCRIPT = """
 ping -c 1 -W 1 127.0.0.1 || exit 1
 ping -c 1 -W 1 10.0.0.1 || exit 1
@@ -21,19 +20,18 @@ ping -c 1 -W 1 10.0.0.1 || exit 1
 ping -c 1 -W 1 ::1 || exit 1
 ping -c 1 -W 1 fd::1 || exit 1
 """
-
 ABILITY_TO_UNSHARE = portage.process._unshare_validate(CLONE_NEWNET)
 
 
 class UnshareNetTestCase(TestCase):
-    @pytest.mark.skipif(platform.system() != "Linux", reason="not Linux")
-    @pytest.mark.skipif(
-        portage.process.find_binary("ping") is None, reason="ping not found"
-    )
     @pytest.mark.skipif(
         ABILITY_TO_UNSHARE != 0,
         reason=f"Unable to unshare: {errno.errorcode.get(ABILITY_TO_UNSHARE, '?')}",
     )
+    @pytest.mark.skipif(
+        portage.process.find_binary("ping") is None, reason="ping not found"
+    )
+    @pytest.mark.skipif(platform.system() != "Linux", reason="not Linux")
     def testUnshareNet(self):
         env = os.environ.copy()
         env["IPV6"] = "1" if portage.process._has_ipv6() else ""


             reply	other threads:[~2023-05-26 15:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26 15:45 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-28  6:26 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/process/ Zac Medico
2024-02-25  0:45 Zac Medico
2024-02-09  7:08 Sam James
2024-02-03 22:54 Zac Medico
2023-11-02 14:57 Zac Medico
2023-05-26 15:45 Sam James
2023-05-26 15:45 Sam James
2023-05-26 15:45 Sam James
2021-01-18 12:20 Zac Medico
2021-01-18 12:20 Zac Medico
2019-08-31  3:10 Zac Medico
2019-04-14 19:45 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=1685115876.3db3c517d7e7635f3507f1e7f921dcc9fdd33c9a.sam@gentoo \
    --to=sam@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