From patchwork Fri Aug 19 03:45:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Zaman X-Patchwork-Id: 9289297 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F1B286077B for ; Fri, 19 Aug 2016 03:48:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E26FB28A5B for ; Fri, 19 Aug 2016 03:48:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D767628A81; Fri, 19 Aug 2016 03:48:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from emsm-gh1-uea10.nsa.gov (smtp.nsa.gov [8.44.101.8]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E48028A5B for ; Fri, 19 Aug 2016 03:48:11 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.28,543,1464652800"; d="scan'208";a="16746175" IronPort-PHdr: =?us-ascii?q?9a23=3Ax/9klBArp0WkihsxZAbfUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSP78psbcNUDSrc9gkEXOFd2CrakV0qyM7uu/CSRAuc/H6yFaNsQUFlcsso?= =?us-ascii?q?Y/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVIm?= =?us-ascii?q?btr8FoOatcmrzef6o8SVOFQRwmDgKuwiZFXu9EOK55FQ2dMjYo8KiTLx6kNSfO?= =?us-ascii?q?pXwW46bXmypD3bovmKwZh47i5LsOgg/cMTGY/zfqA/UKAKRG9+azN92dfv/SXn?= =?us-ascii?q?YUPPoyJEEzZerh0dGAXB7RfnTr/toyD6sax7wyDcMsroHp4uXjH3za5wTxmgui?= =?us-ascii?q?4CPjhxpGPekct2pLpWuhygoR14xcjfZ4TDZ6k2Rb/UYd5PHTkJZc1WTSEUR9rk?= =?us-ascii?q?Yg=3D=3D?= X-IPAS-Result: =?us-ascii?q?A2FXCQARgbZX/wHyM5BeHAEBgnktVnylYgGTeyMHgXKFd0w?= =?us-ascii?q?BAQEBAQEBAgECWyeCMgQDEX1bPQIBAwECDygGAQEMIAwCAwkBARcpCAgDAS0DA?= =?us-ascii?q?QUBCxEOCwUYBAGIDwGeWYEyPjKKVYUrAQEFi3QIEIQPimoRAWiFD48YijSGIIk?= =?us-ascii?q?AZYhhJYVfjnUxgQ9UggWCAmMBhXaBNgEBAQ?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea10.nsa.gov with ESMTP; 19 Aug 2016 03:48:12 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u7J3m9Je022682; Thu, 18 Aug 2016 23:48:10 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id u7J3jhNI009827 for ; Thu, 18 Aug 2016 23:45:43 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u7J3jhXl022472 for ; Thu, 18 Aug 2016 23:45:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1DDAACMgLZXhsLAVdFeHQGCeYEDfLVchAwghX0CgWpMAQEBAQEBAQITAQEBCAsLCRmFDgIBAxIuAQE3AQ9RNAEFARwZIogPAZ5VgTI+MopVhSsBAQWLSwEBAQEBBQIBHAgQhA+LZIF9C4MHjxiKNIYgiQBliGGGBI51MYEPglkegWRjAYcsAQEB X-IPAS-Result: A1DDAACMgLZXhsLAVdFeHQGCeYEDfLVchAwghX0CgWpMAQEBAQEBAQITAQEBCAsLCRmFDgIBAxIuAQE3AQ9RNAEFARwZIogPAZ5VgTI+MopVhSsBAQWLSwEBAQEBBQIBHAgQhA+LZIF9C4MHjxiKNIYgiQBliGGGBI51MYEPglkegWRjAYcsAQEB X-IronPort-AV: E=Sophos;i="5.28,543,1464667200"; d="scan'208";a="5653736" Received: from emsm-gh1-uea11.corp.nsa.gov (HELO emsm-gh1-uea11.nsa.gov) ([10.208.41.37]) by goalie.tycho.ncsc.mil with ESMTP; 18 Aug 2016 23:45:43 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3AGfz6ARJy126crF7YE9mcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgUL/rxwZ3uMQTl6Ol3ixeRBMOAuqsC0bed7PCoGTRZp83Q6DZaKN0EfiRGoP?= =?us-ascii?q?1epxYnDs+BBB+zB9/RRAt+Iv5/UkR49WqwK0lfFZW2TVTTpnqv8WxaQU2nZkJL?= =?us-ascii?q?L+j4UrTfk96wn7jrvcaCOkMS2XHiMfsydEzw9lSJ8JFOwMNLEeUY8lPxuHxGeu?= =?us-ascii?q?BblytDBGm4uFLC3Pq254Np6C9KuvgspIZqWKT+eLkkH/QDVGx1ezN92Mq+rhTH?= =?us-ascii?q?TA2S9lMAQ24WlVxOGAGD4xbkDbnrtS6vlONm3y/SD8TzRLZ8DTar9KBtYAflki?= =?us-ascii?q?kGMT8+9ifcjckm3/ETmw6ouxEqm92cW4qSLvcrJq4=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0GIAgDof7ZXhsLAVdFeHQGCeYEDfKVjj?= =?us-ascii?q?3mEDCCBcoQLAoFqTAEBAQEBAQECAQIQAQEBCAsLCRkvgjIWf1s9AgEDEi4BATc?= =?us-ascii?q?BD1E0AQUBHBkiiA8Bnk+BMj4yilWFKwEBBYtLAQEBAQEFAgEcCBCED4tkgX0Lg?= =?us-ascii?q?wePGIo0hiCJAGWIYYYEjnUxgQ+CWR6BZGMBhywBAQE?= X-IPAS-Result: =?us-ascii?q?A0GIAgDof7ZXhsLAVdFeHQGCeYEDfKVjj3mEDCCBcoQLAoF?= =?us-ascii?q?qTAEBAQEBAQECAQIQAQEBCAsLCRkvgjIWf1s9AgEDEi4BATcBD1E0AQUBHBkii?= =?us-ascii?q?A8Bnk+BMj4yilWFKwEBBYtLAQEBAQEFAgEcCBCED4tkgX0LgwePGIo0hiCJAGW?= =?us-ascii?q?IYYYEjnUxgQ+CWR6BZGMBhywBAQE?= X-IronPort-AV: E=Sophos;i="5.28,543,1464652800"; d="scan'208";a="18594971" Received: from mail-pf0-f194.google.com ([209.85.192.194]) by emsm-gh1-uea11.nsa.gov with ESMTP/TLS/AES128-GCM-SHA256; 19 Aug 2016 03:45:39 +0000 Received: by mail-pf0-f194.google.com with SMTP id i6so750856pfe.0 for ; Thu, 18 Aug 2016 20:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perfinion-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WiuOc26g0EB2cHAA8xGLO2NpXxPotFB99O9b1MkHDV8=; b=g8FVHKzbZ4jpacNX0765ub3VdNtaurMchsSDNv5pD9dcCR5MM4cxc9XeuTiOiU+weE ZskcLrX8eF6mxCdVm5TMsiWCGqJrNv9jy2tfnGm3mslHBrPnR/hVTFncq0/g90BpKWcU Ixl75fOqbaIdQFsRC5dA9JD02KKWeKX+5mw0wVYs1yruRafb1hxQp9iv6gxpdlZc8SsR cUMQ77yG72V/uKFrj3hVtlTS8H55qFYRQ1SNZ5PPMpTd5hsTe9RnrlZLORq3+SGKZvkk 4XKr7Vv8m9BxsI1wAI31Go8YYPNuSyOamcFhH+3h+HSpKrIoUznPxkNtYhhOnr3XgFb6 cyYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WiuOc26g0EB2cHAA8xGLO2NpXxPotFB99O9b1MkHDV8=; b=KEOc6Zoaw+txT3KN7+GpgwpRmsBTeq3OeJgRwMZ+R4MyPWSvVwuGN2RrdKVIULDC2n vRLxj4pjXbyxWebDUmFWb9aq3Clrgy1otDzmWeBZAZmXHWQ2sfVLA4vgNihUL2F90tmb SOrZQqUoEH7S+6SDg6MqbGysy0NgJNjG7/6N2QgUUjSJKpRb23bcO16htfV+Mk7VL3b/ nqPSVon1ZxBJdPelpJp5arkBH8MrHozuYOmLr9GTfytC25IGayIMXpgzYV9B5oc7iSOo EGBx9ka6GvpoTk46VkZ4xjp6BMxgdNBS1A0OynGWCsBEccfs4NVyQ68UD6mVM5u/KvMS LlpA== X-Gm-Message-State: AEkoouvCOEHW/3cKuz0B22vvYv8tBvQq8C4VajfWM56UVIBL36CfTXrEqv6PIvtytjX5jA== X-Received: by 10.98.89.210 with SMTP id k79mr10333303pfj.43.1471578333064; Thu, 18 Aug 2016 20:45:33 -0700 (PDT) Received: from localhost ([2404:e800:e600:57b:88c4:1498:f95a:1537]) by smtp.gmail.com with ESMTPSA id xv9sm6998170pab.36.2016.08.18.20.45.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Aug 2016 20:45:32 -0700 (PDT) From: Jason Zaman To: selinux@tycho.nsa.gov Subject: [PATCH 3/3] audit2allow: tests should use local copy not system Date: Fri, 19 Aug 2016 11:45:17 +0800 Message-Id: <1471578317-22785-3-git-send-email-jason@perfinion.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1471578317-22785-1-git-send-email-jason@perfinion.com> References: <1471578317-22785-1-git-send-email-jason@perfinion.com> X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP The tests currently just executed "audit2allow" which meant search in $PATH. They should instead test the one in the pwd. The files in the repo are not executable so prefix with "python" also. Signed-off-by: Jason Zaman --- policycoreutils/audit2allow/test_audit2allow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policycoreutils/audit2allow/test_audit2allow.py b/policycoreutils/audit2allow/test_audit2allow.py index 765c9ea..a826a9f 100644 --- a/policycoreutils/audit2allow/test_audit2allow.py +++ b/policycoreutils/audit2allow/test_audit2allow.py @@ -33,7 +33,7 @@ class Audit2allowTests(unittest.TestCase): def test_audit2allow(self): "Verify audit2allow works" - p = Popen(['audit2allow', "-i", "test.log"], stdout=PIPE) + p = Popen(['python', './audit2allow', "-i", "test.log"], stdout=PIPE) out, err = p.communicate() if err: print(out, err) @@ -41,7 +41,7 @@ class Audit2allowTests(unittest.TestCase): def test_audit2why(self): "Verify audit2why works" - p = Popen(['audit2why', "-i", "test.log"], stdout=PIPE) + p = Popen(['python', './audit2why', "-i", "test.log"], stdout=PIPE) out, err = p.communicate() if err: print(out, err)