From patchwork Thu Jan 31 18:31:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrin Jose T X-Patchwork-Id: 10791157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C26391E for ; Thu, 31 Jan 2019 18:31:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E86A3168B for ; Thu, 31 Jan 2019 18:31:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B75D316C8; Thu, 31 Jan 2019 18:31:29 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 169E4316D5 for ; Thu, 31 Jan 2019 18:31:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbfAaSb1 (ORCPT ); Thu, 31 Jan 2019 13:31:27 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:40872 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726256AbfAaSb1 (ORCPT ); Thu, 31 Jan 2019 13:31:27 -0500 Received: by mail-pg1-f195.google.com with SMTP id z10so1708108pgp.7 for ; Thu, 31 Jan 2019 10:31:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rajagiritech-edu-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eMAlePFlsyIeDePU5MTDM6JWGUjU4fjTlKjCeUhFr5U=; b=xY12TOAuvAoWdCARxSirtz2vX8BQ0fh7HqT9AGBl5Xk2GkhYAkiU2oE2QO4XxqT8/i VqjZVz59Bua0bQf2lgtFNjl+tQsy2m9+2YiCsc+SQfhOKqHBDuNbxqvQGzRVJboEvihe NBLZ+zYNzB+p4XtvJclZtwnRhhjSfN/DfWfz59HKLrsSnQR5T6agqlVmwml3aDkbb9Lk FiV2iOPJABU4syBbUtShgEox2B3d8nOjpF+ZtKXnsFHtYoX/t+bJZawgaZZ1PXTvKbTl x74hv1+d/hpsN2FUEUz9TWIXw3DE94uuyF+dUhaHxMrkVhRyfD5vB4mg31R2LuF9ZOYA j/Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eMAlePFlsyIeDePU5MTDM6JWGUjU4fjTlKjCeUhFr5U=; b=ql42qesRtWERmDkbGnSKYYnZBZ9gmMfJkm8bUodq9YPYzw/0t29lluNkGCiHJsfRfJ Pm9srtCDO/Vy8Jg1E8XqO2naWqRCsVHNtIqobii+5TgHUUql1pcienELQvP0hzJmwReE zqSqNpKGzenC6hHW4A86iyhIu/miYRDqhy4lUadbmqKZIiGvTL1jZ/KLLnP3AFIF57gx yLzVQNv9hd2ErINgcrrH1FP/HwVnkDF7T3ejfe0G2Lji2ba/vNFQUMIkjwKRKN+JE4FD XCfoL3yolDdWR9mfk9xEJC3A3wglIOJwUpjoyvRz5C1anOB9GKXDL7fUsqut9ES+qkrp wb9w== X-Gm-Message-State: AHQUAuaMwqvNSM7z1ZwmzFA6VUnWKcnR7lRC7eTVlPagAZEs8sunK6JI vvZB8jpkON5oKgA+nef8vE5djA== X-Google-Smtp-Source: AHgI3IZ3zCC28PWd9Q0oz3mJVVjMre+9YCyG+nkPeRZ8MwxcVnHvRcD25RDvZbzAm/XUgPX4pi60Yg== X-Received: by 2002:a63:96:: with SMTP id 144mr19558616pga.315.1548959486700; Thu, 31 Jan 2019 10:31:26 -0800 (PST) Received: from localhost.localdomain ([122.164.226.184]) by smtp.gmail.com with ESMTPSA id h19sm6685576pfn.114.2019.01.31.10.31.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 10:31:26 -0800 (PST) From: Jeffrin Jose T To: mcgrof@kernel.org, shuah@kernel.org Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, akpm@linux-foundation.org, Jeffrin Jose T Subject: [PATCH v2] selftests: kmod: worked on errors which breaks the overall execution of the test script. i have manually edited for v2 of the patch by changing the date and also commit log. Date: Fri, 1 Feb 2019 00:01:09 +0530 Message-Id: <20190131183109.10919-1-jeffrin@rajagiritech.edu.in> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The kmod.sh script breaks because an array is passed as input instead of a single element input.This patch takes elements one at a time and passed as input to the condition statement which in turn fixes the error.There was an issue which had the need for passing a single digit to the condition statement which is fixed using regular expression. Distribution: Debian GNU/Linux buster/sid Bash Version: 5.0.0(1)-release Signed-off-by: Jeffrin Jose T --- tools/testing/selftests/kmod/kmod.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/kmod/kmod.sh b/tools/testing/selftests/kmod/kmod.sh index 0a76314b4414..49b273c3646e 100755 --- a/tools/testing/selftests/kmod/kmod.sh +++ b/tools/testing/selftests/kmod/kmod.sh @@ -526,9 +526,12 @@ function run_all_tests() TEST_ID=${i%:*:*} ENABLED=$(get_test_enabled $TEST_ID) TEST_COUNT=$(get_test_count $TEST_ID) - if [[ $ENABLED -eq "1" ]]; then - test_case $TEST_ID $TEST_COUNT - fi + for j in $ENABLED ; do + CHECK=${j#*:*:} + if [[ $CHECK -eq "1" ]]; then + test_case $TEST_ID $TEST_COUNT + fi + done done }