From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7DADCD98ED for ; Thu, 18 Jun 2026 12:50:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 92C17413E5; Thu, 18 Jun 2026 12:50:07 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id yJZjbsusrzBI; Thu, 18 Jun 2026 12:50:06 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 15812413E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=buildroot.org; s=default; t=1781787006; bh=6j+DkIlHQM0FwFKbGqIGJrK0Vjo5CIu3cMCkVKIqOAU=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=Y6whnzG+7y1iIC1tWE2sV13xAiN/acDtmb2Dk6BdJqVoCU4DO5/uI0PS1IAODCF2o X/Dlgwcejppu7W5cysDizV9Rt58LUwQfLpN82sWg5mLse9fgA30BKiTlg/p4M2zhy6 vw/eAkKS+MMbd/YIB8434VtIbWf9r01jw29ZxALWc8t4FOsrF/LB0kZN2InCezElOQ hgQKEO/cLag0MKV86pVa6SkHkurOe59zyhJoSOBBnml/hWztB2Ri/oephFrcLuSyxP jKqLaxRnxtLueD7WfOvF6txEaaaGaPFOdckassS8rK3IHRtKlkEiS5cP3yIeyb3hIx /WVZgbtQcMduA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 15812413E3; Thu, 18 Jun 2026 12:50:06 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 70AB91F3 for ; Thu, 18 Jun 2026 12:50:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6315B83C4F for ; Thu, 18 Jun 2026 12:50:04 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 7vrNIQb9J0tM for ; Thu, 18 Jun 2026 12:50:03 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=34.202.193.197; helo=sendmail.purelymail.com; envelope-from=peko@korsgaard.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org A89C383C3D DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A89C383C3D Received: from sendmail.purelymail.com (sendmail.purelymail.com [34.202.193.197]) by smtp1.osuosl.org (Postfix) with ESMTPS id A89C383C3D for ; Thu, 18 Jun 2026 12:50:03 +0000 (UTC) Feedback-ID: 21632:4007:null:purelymail X-Pm-Original-To: buildroot@buildroot.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 276823161; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 18 Jun 2026 12:49:45 +0000 (UTC) Received: from peko by dell.be.48ers.dk with local (Exim 4.98.2) (envelope-from ) id 1waCBk-0000000CJtd-2qFC; Thu, 18 Jun 2026 14:49:44 +0200 From: Peter Korsgaard To: buildroot@buildroot.org Date: Thu, 18 Jun 2026 14:47:54 +0200 Message-ID: <20260618124835.2935850-3-peter@korsgaard.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260618124835.2935850-1-peter@korsgaard.com> References: <20260618124835.2935850-1-peter@korsgaard.com> MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail X-Mailman-Original-DKIM-Signature: a=rsa-sha256; b=UJcqOKuNY0Ug0vM+zYmRMRMG5wF6s6/ncehn/tpxc8mYQY8RidGB/hC+OxiBdqaE83iDi3Lz2XO9NrsmmTVXLBPkyNPt2X38eWwEm54fBkTET6h2RQT88/55pgPEB/n8diXb27LiEIonwJ3HerPpa4O+kOdIEAekabWBtqtSJx/BaDrb6F1ohbqo/HS/8F8HvONoUwsBkZhWvwv7bmHh9YedcwAg4gqp49jD4ZtNkFbLbI5BnpcgeUeMBot0jHE34s49ewCVoJ74HR+7LDe1DtA3ex7p88WfvxpR3tmhyZhoIFDr0p2aWKvWNMWET58kgmvlOJGUtk2nn51SE79ktA==; s=purelymail1; d=purelymail.com; v=1; bh=MzR08MAY3LEVTfaNaNF0Rou6CTsikyh2RNVtRlJX2G8=; h=Feedback-ID:Received:Received:From:To:Subject:Date; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=none (p=none dis=none) header.from=korsgaard.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=purelymail.com header.i=@purelymail.com header.a=rsa-sha256 header.s=purelymail1 header.b=UJcqOKuN X-Mailman-Original-Authentication-Results: purelymail.com; auth=pass Subject: [Buildroot] [PATCH 03/29] support/testing: test_acl.py: use assertRunNotOk() X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julien Olivain Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Use the helper to simplify the test. Signed-off-by: Peter Korsgaard --- support/testing/tests/package/test_acl.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/support/testing/tests/package/test_acl.py b/support/testing/tests/package/test_acl.py index e4827c7bec..4511c6db5b 100644 --- a/support/testing/tests/package/test_acl.py +++ b/support/testing/tests/package/test_acl.py @@ -52,8 +52,7 @@ class TestAcl(infra.basetest.BRTest): # Reading the file as the test user is expected to fail. test_read_cmd = f"su - {test_user} -c 'cat {test_file}'" - _, ret = self.emulator.run(test_read_cmd) - self.assertNotEqual(ret, 0) + self.assertRunNotOk(test_read_cmd) # We add a special read ACL for the test user. cmd = f"setfacl -m u:{test_user}:r {test_file}" @@ -73,8 +72,7 @@ class TestAcl(infra.basetest.BRTest): # Attempting to write to the file as the test user is expected # to fail (since we put an ACL only for reading). cmd = f"su - {test_user} -c 'echo WriteTest > {test_file}'" - _, ret = self.emulator.run(cmd) - self.assertNotEqual(ret, 0) + self.assertRunNotOk(cmd) # Remove all ACLs. This could have been done with the command # "setfacl -b". Instead, we use the "chacl -B" command which @@ -83,5 +81,4 @@ class TestAcl(infra.basetest.BRTest): self.assertRunOk(f"chacl -B {test_file}") # Reading the file as the test user is expected to fail again. - _, ret = self.emulator.run(test_read_cmd) - self.assertNotEqual(ret, 0) + self.assertRunNotOk(test_read_cmd) -- 2.47.3 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot