From patchwork Mon Apr 23 09:46:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 902848 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40V1nv60Rkz9s06 for ; Mon, 23 Apr 2018 19:46:59 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 044BA3E75A1 for ; Mon, 23 Apr 2018 11:46:54 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [IPv6:2001:4b78:1:20::5]) by picard.linux.it (Postfix) with ESMTP id B209D3E68DA for ; Mon, 23 Apr 2018 11:46:48 +0200 (CEST) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by in-5.smtp.seeweb.it (Postfix) with ESMTP id BA824600A6C for ; Mon, 23 Apr 2018 11:46:47 +0200 (CEST) Received: by mail.bootlin.com (Postfix, from userid 110) id C0285207A8; Mon, 23 Apr 2018 11:46:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it X-Spam-Level: X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 9542620703; Mon, 23 Apr 2018 11:46:46 +0200 (CEST) From: =?utf-8?q?Myl=C3=A8ne_Josserand?= To: ltp@lists.linux.it Date: Mon, 23 Apr 2018 11:46:31 +0200 Message-Id: <20180423094639.14612-2-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180423094639.14612-1-mylene.josserand@bootlin.com> References: <20180423094639.14612-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.smtp.seeweb.it X-Virus-Status: Clean Cc: thomas.petazzoni@bootlin.com Subject: [LTP] [RFC PATCH 1/9] testcases: su: Fix userdel use X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" In case "getent" command is not available in the system, the userdel command will never be executed and for the second use, the test will fail with: useradd: user 'su_usr1' already exists Fix that by moving "userdel" command in a new line. Signed-off-by: Mylène Josserand --- testcases/commands/su/su01 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testcases/commands/su/su01 b/testcases/commands/su/su01 index 34386d937..1eedcb636 100755 --- a/testcases/commands/su/su01 +++ b/testcases/commands/su/su01 @@ -86,7 +86,8 @@ rm -f $TEST_ENV_FILE > /dev/null 2>&1 #Create 1st test user #erase user if he may exist , so we can have a clean en rm -rf /home/$TEST_USER1 - getent passwd $TEST_USER1 > /dev/null 2>&1 && userdel $TEST_USER1 + getent passwd $TEST_USER1 > /dev/null 2>&1 + userdel $TEST_USER1 sleep 1 useradd -m -g users $TEST_USER1 @@ -121,7 +122,8 @@ rm -f $TEST_ENV_FILE > /dev/null 2>&1 #Create 2nd test user #erase user if he may exist , so we can have a clean en rm -rf /home/$TEST_USER2 - getent passwd $TEST_USER2 > /dev/null 2>&1 && userdel $TEST_USER2 + getent passwd $TEST_USER2 > /dev/null 2>&1 + userdel $TEST_USER2 sleep 1 useradd -m -g users $TEST_USER2 From patchwork Mon Apr 23 09:46:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 902849 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40V1nx4G3Mz9s06 for ; Mon, 23 Apr 2018 19:47:01 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id D00943E763E for ; Mon, 23 Apr 2018 11:46:58 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) by picard.linux.it (Postfix) with ESMTP id 2CBEB3E68D9 for ; Mon, 23 Apr 2018 11:46:49 +0200 (CEST) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by in-7.smtp.seeweb.it (Postfix) with ESMTP id B52D2200CFE for ; Mon, 23 Apr 2018 11:46:48 +0200 (CEST) Received: by mail.bootlin.com (Postfix, from userid 110) id B81D42073C; Mon, 23 Apr 2018 11:46:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it X-Spam-Level: X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 8DBEE20703; Mon, 23 Apr 2018 11:46:47 +0200 (CEST) From: =?utf-8?q?Myl=C3=A8ne_Josserand?= To: ltp@lists.linux.it Date: Mon, 23 Apr 2018 11:46:32 +0200 Message-Id: <20180423094639.14612-3-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180423094639.14612-1-mylene.josserand@bootlin.com> References: <20180423094639.14612-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean Cc: thomas.petazzoni@bootlin.com Subject: [LTP] [RFC PATCH 2/9] testcases: ar: Add TST_NEEDS_CMDS on "ar" X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" In case "ar" binary is not available, the test will fail. It should return a TCONF as we just do not have the binary. This commit adds TST_NEEDS_CMDS macro on "ar". Thanks to that, it will return "TCONF" and not "FAIL" when "ar" is not available. Signed-off-by: Mylène Josserand --- testcases/commands/ar/ar01 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01 index ddab2e0f0..edaa24657 100644 --- a/testcases/commands/ar/ar01 +++ b/testcases/commands/ar/ar01 @@ -22,9 +22,12 @@ # # This is a basic ar command test. # +AR=${AR:=ar} TST_CNT=17 TST_TESTFUNC=test TST_NEEDS_TMPDIR=1 +TST_NEEDS_CMDS="$AR" + . tst_test.sh test1() From patchwork Mon Apr 23 09:46:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 902850 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40V1p230xxz9s06 for ; Mon, 23 Apr 2018 19:47:06 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 98EF73E7562 for ; Mon, 23 Apr 2018 11:47:03 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) by picard.linux.it (Postfix) with ESMTP id 6A14E3E7563 for ; Mon, 23 Apr 2018 11:46:49 +0200 (CEST) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by in-2.smtp.seeweb.it (Postfix) with ESMTP id 9DB116000E7 for ; Mon, 23 Apr 2018 11:46:49 +0200 (CEST) Received: by mail.bootlin.com (Postfix, from userid 110) id 999BF2073C; Mon, 23 Apr 2018 11:46:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it X-Spam-Level: X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 6BF2520703; Mon, 23 Apr 2018 11:46:48 +0200 (CEST) From: =?utf-8?q?Myl=C3=A8ne_Josserand?= To: ltp@lists.linux.it Date: Mon, 23 Apr 2018 11:46:33 +0200 Message-Id: <20180423094639.14612-4-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180423094639.14612-1-mylene.josserand@bootlin.com> References: <20180423094639.14612-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean Cc: thomas.petazzoni@bootlin.com Subject: [LTP] [RFC PATCH 3/9] testcases: file: Add TST_NEEDS_CMDS on readelf X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" This test is using "readelf" binary that can be unavailable on the system. Instead of failing, it should return a TCONF. This is what this commit is doing by adding "readelf" in TST_NEEDS_CMDS macro. Signed-off-by: Mylène Josserand --- testcases/commands/file/file01.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/commands/file/file01.sh b/testcases/commands/file/file01.sh index e04b32e86..b72760e9f 100755 --- a/testcases/commands/file/file01.sh +++ b/testcases/commands/file/file01.sh @@ -28,6 +28,8 @@ TST_CNT=20 TST_SETUP=setup TST_TESTFUNC=do_test TST_NEEDS_TMPDIR=1 +TST_NEEDS_CMDS="readelf" + . tst_test.sh setup() From patchwork Mon Apr 23 09:46:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 902853 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40V1pF6bPFz9s06 for ; Mon, 23 Apr 2018 19:47:17 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id E1C783E7552 for ; Mon, 23 Apr 2018 11:47:13 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) by picard.linux.it (Postfix) with ESMTP id EAE873E6936 for ; Mon, 23 Apr 2018 11:46:52 +0200 (CEST) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by in-3.smtp.seeweb.it (Postfix) with ESMTP id 7622C1A0112A for ; Mon, 23 Apr 2018 11:46:50 +0200 (CEST) Received: by mail.bootlin.com (Postfix, from userid 110) id 4F7692073C; Mon, 23 Apr 2018 11:46:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it X-Spam-Level: X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 1C27320703; Mon, 23 Apr 2018 11:46:49 +0200 (CEST) From: =?utf-8?q?Myl=C3=A8ne_Josserand?= To: ltp@lists.linux.it Date: Mon, 23 Apr 2018 11:46:34 +0200 Message-Id: <20180423094639.14612-5-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180423094639.14612-1-mylene.josserand@bootlin.com> References: <20180423094639.14612-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean Cc: thomas.petazzoni@bootlin.com Subject: [LTP] [RFC PATCH 4/9] testcases: tar: Add TST_NEEDS_CMDS on gzip and bzip X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Add TST_NEEDS_CMDS to return a TCONF in case "gzip" and "bzip2" binaries are not available on the system. Signed-off-by: Mylène Josserand --- testcases/commands/tar/tar_tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/commands/tar/tar_tests.sh b/testcases/commands/tar/tar_tests.sh index 7ac18a4e5..946e9c7b1 100755 --- a/testcases/commands/tar/tar_tests.sh +++ b/testcases/commands/tar/tar_tests.sh @@ -27,6 +27,8 @@ TST_CNT=6 TST_TESTFUNC=do_test TST_NEEDS_TMPDIR=1 +TST_NEEDS_CMDS="gzip bzip2" + . tst_test.sh TAR_FILES="file1 file2 file3" From patchwork Mon Apr 23 09:46:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 902856 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40V1pV41nHz9s08 for ; Mon, 23 Apr 2018 19:47:30 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id CC3583E78F2 for ; Mon, 23 Apr 2018 11:47:21 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) by picard.linux.it (Postfix) with ESMTP id EFE103E7562 for ; Mon, 23 Apr 2018 11:46:53 +0200 (CEST) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by in-3.smtp.seeweb.it (Postfix) with ESMTP id DE4541A01135 for ; Mon, 23 Apr 2018 11:46:50 +0200 (CEST) Received: by mail.bootlin.com (Postfix, from userid 110) id DF8FC207A8; Mon, 23 Apr 2018 11:46:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it X-Spam-Level: X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id B2B9620703; Mon, 23 Apr 2018 11:46:49 +0200 (CEST) From: =?utf-8?q?Myl=C3=A8ne_Josserand?= To: ltp@lists.linux.it Date: Mon, 23 Apr 2018 11:46:35 +0200 Message-Id: <20180423094639.14612-6-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180423094639.14612-1-mylene.josserand@bootlin.com> References: <20180423094639.14612-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean Cc: thomas.petazzoni@bootlin.com Subject: [LTP] [RFC PATCH 5/9] testcases: logrotate: Check if "file" command exists X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Add "file" binary in the list of commands to check if they exist or not. Signed-off-by: Mylène Josserand --- testcases/commands/logrotate/logrotate_tests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testcases/commands/logrotate/logrotate_tests.sh b/testcases/commands/logrotate/logrotate_tests.sh index f5a22ddde..021972294 100755 --- a/testcases/commands/logrotate/logrotate_tests.sh +++ b/testcases/commands/logrotate/logrotate_tests.sh @@ -97,10 +97,11 @@ init() return $RC fi - # check if commands tst_*, logrotate, awk exists. + # check if commands tst_*, logrotate, awk and file exists. chk_ifexists INIT tst_resm || return $RC chk_ifexists INIT logrotate || return $RC chk_ifexists INIT awk || return $RC + chk_ifexists INIT file || return $RC return $RC } From patchwork Mon Apr 23 09:46:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 902851 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40V1p56WK8z9s06 for ; Mon, 23 Apr 2018 19:47:09 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 2149B3E77FC for ; Mon, 23 Apr 2018 11:47:07 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) by picard.linux.it (Postfix) with ESMTP id 51EA33E7557 for ; Mon, 23 Apr 2018 11:46:52 +0200 (CEST) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by in-7.smtp.seeweb.it (Postfix) with ESMTP id AB786200D00 for ; Mon, 23 Apr 2018 11:46:51 +0200 (CEST) Received: by mail.bootlin.com (Postfix, from userid 110) id 9317E207BE; Mon, 23 Apr 2018 11:46:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it X-Spam-Level: X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 6698720703; Mon, 23 Apr 2018 11:46:50 +0200 (CEST) From: =?utf-8?q?Myl=C3=A8ne_Josserand?= To: ltp@lists.linux.it Date: Mon, 23 Apr 2018 11:46:36 +0200 Message-Id: <20180423094639.14612-7-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180423094639.14612-1-mylene.josserand@bootlin.com> References: <20180423094639.14612-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean Cc: thomas.petazzoni@bootlin.com Subject: [LTP] [RFC PATCH 6/9] testcases: wc: Add "unrecognized option" as TCONF X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" In case we are using Busybox, for example, some options may not available and leads to a test failure. This commit adds "unrecognized option" parsing to return the test as a TCONF and not FAIL anymore. Signed-off-by: Mylène Josserand Acked-by: Petr Vorel --- testcases/commands/wc/wc01.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/commands/wc/wc01.sh b/testcases/commands/wc/wc01.sh index e72819c51..74d69e254 100755 --- a/testcases/commands/wc/wc01.sh +++ b/testcases/commands/wc/wc01.sh @@ -40,7 +40,7 @@ wc_test() eval $wc_cmd > temp 2>&1 if [ $? -ne 0 ]; then - grep -q -E "unknown option|invalid option" temp + grep -q -E "unknown option|invalid option|unrecognized option" temp if [ $? -eq 0 ]; then tst_res TCONF "$wc_cmd not supported." else From patchwork Mon Apr 23 09:46:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 902852 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40V1pB2BPVz9s06 for ; Mon, 23 Apr 2018 19:47:14 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 978AF3E7800 for ; Mon, 23 Apr 2018 11:47:10 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) by picard.linux.it (Postfix) with ESMTP id 775383E75C6 for ; Mon, 23 Apr 2018 11:46:52 +0200 (CEST) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by in-7.smtp.seeweb.it (Postfix) with ESMTP id 31BD2200CE4 for ; Mon, 23 Apr 2018 11:46:52 +0200 (CEST) Received: by mail.bootlin.com (Postfix, from userid 110) id 3C0D3207BE; Mon, 23 Apr 2018 11:46:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it X-Spam-Level: X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 0E77F20703; Mon, 23 Apr 2018 11:46:51 +0200 (CEST) From: =?utf-8?q?Myl=C3=A8ne_Josserand?= To: ltp@lists.linux.it Date: Mon, 23 Apr 2018 11:46:37 +0200 Message-Id: <20180423094639.14612-8-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180423094639.14612-1-mylene.josserand@bootlin.com> References: <20180423094639.14612-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean Cc: thomas.petazzoni@bootlin.com Subject: [LTP] [RFC PATCH 7/9] testcases: df: Add "--printf" option as needed commands X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" In case Busybox is used with minimal configuration, the option "--printf" is not available so the test is failing. Add this option in the needed commands to return a TCONF if it is not available. Signed-off-by: Mylène Josserand --- testcases/commands/df/df01.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh index fbf1e2f2a..147620020 100755 --- a/testcases/commands/df/df01.sh +++ b/testcases/commands/df/df01.sh @@ -26,6 +26,8 @@ TST_PARSE_ARGS=parse_args TST_NEEDS_ROOT=1 TST_NEEDS_TMPDIR=1 TST_NEEDS_DEVICE=1 +TST_NEEDS_CMDS="stat --printf=%f" + . tst_test.sh usage() From patchwork Mon Apr 23 09:46:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 902854 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40V1pL2cqTz9s08 for ; Mon, 23 Apr 2018 19:47:22 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 5D8183E7946 for ; Mon, 23 Apr 2018 11:47:16 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) by picard.linux.it (Postfix) with ESMTP id 2B2593E75D6 for ; Mon, 23 Apr 2018 11:46:53 +0200 (CEST) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by in-7.smtp.seeweb.it (Postfix) with ESMTP id A82C3200CE4 for ; Mon, 23 Apr 2018 11:46:52 +0200 (CEST) Received: by mail.bootlin.com (Postfix, from userid 110) id C939F207BE; Mon, 23 Apr 2018 11:46:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it X-Spam-Level: X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 9C8F720703; Mon, 23 Apr 2018 11:46:51 +0200 (CEST) From: =?utf-8?q?Myl=C3=A8ne_Josserand?= To: ltp@lists.linux.it Date: Mon, 23 Apr 2018 11:46:38 +0200 Message-Id: <20180423094639.14612-9-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180423094639.14612-1-mylene.josserand@bootlin.com> References: <20180423094639.14612-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean Cc: thomas.petazzoni@bootlin.com Subject: [LTP] [RFC PATCH 8/9] testcases: test.sh: Check if "getconf" is available X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" In case TST_NEEDS_CHECKPOINTS is set to 1, the "getconf" binary is used. This binary may not be installed in the system and it will return a FAIL. Instead, add a check on this binary to return "TCONF" in that case. Signed-off-by: Mylène Josserand --- testcases/lib/test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/lib/test.sh b/testcases/lib/test.sh index bce9893a9..b27dbf4ab 100644 --- a/testcases/lib/test.sh +++ b/testcases/lib/test.sh @@ -421,6 +421,8 @@ fi if [ "$TST_NEEDS_CHECKPOINTS" = "1" ]; then LTP_IPC_PATH="/dev/shm/ltp_${TCID}_$$" + tst_check_cmds "getconf" + LTP_IPC_SIZE=$(getconf PAGESIZE) if [ $? -ne 0 ]; then tst_brkm TBROK "getconf PAGESIZE failed" From patchwork Mon Apr 23 09:46:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 902855 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40V1pQ38nsz9s06 for ; Mon, 23 Apr 2018 19:47:26 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 076853E7819 for ; Mon, 23 Apr 2018 11:47:19 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) by picard.linux.it (Postfix) with ESMTP id DA6F23E7629 for ; Mon, 23 Apr 2018 11:46:53 +0200 (CEST) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by in-7.smtp.seeweb.it (Postfix) with ESMTP id 430FC200D0E for ; Mon, 23 Apr 2018 11:46:53 +0200 (CEST) Received: by mail.bootlin.com (Postfix, from userid 110) id 6421B2073C; Mon, 23 Apr 2018 11:46:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it X-Spam-Level: X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 3976420703; Mon, 23 Apr 2018 11:46:52 +0200 (CEST) From: =?utf-8?q?Myl=C3=A8ne_Josserand?= To: ltp@lists.linux.it Date: Mon, 23 Apr 2018 11:46:39 +0200 Message-Id: <20180423094639.14612-10-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180423094639.14612-1-mylene.josserand@bootlin.com> References: <20180423094639.14612-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean Cc: thomas.petazzoni@bootlin.com Subject: [LTP] [RFC PATCH 9/9] testcases: cpuset: Check if "getconf" is available X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" The "getconf" binary is used by cpuset_regression_test.sh and may not be installed in the system. The test will fail but it is a misconfiguration so let's use "tst_check_cmds" to check if this binary is available and return a TCONF error if not. Signed-off-by: Mylène Josserand --- testcases/kernel/controllers/cpuset/cpuset_regression_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/kernel/controllers/cpuset/cpuset_regression_test.sh b/testcases/kernel/controllers/cpuset/cpuset_regression_test.sh index 4a104a3ad..96a57955c 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_regression_test.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_regression_test.sh @@ -34,6 +34,8 @@ setup() tst_brkm TCONF "Test must be run with kernel 3.18.0 or newer" fi + tst_check_cmds "getconf" + local cpu_num=$(getconf _NPROCESSORS_ONLN) if [ $cpu_num -lt 2 ]; then tst_brkm TCONF "We need 2 cpus at least to have test"