From patchwork Thu Jan 17 21:02:58 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: 10769069 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 02E161390 for ; Thu, 17 Jan 2019 21:04:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E833029EA2 for ; Thu, 17 Jan 2019 21:04:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC8982A0A2; Thu, 17 Jan 2019 21:04:15 +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 D0F442A4AD for ; Thu, 17 Jan 2019 21:04:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729627AbfAQVEO (ORCPT ); Thu, 17 Jan 2019 16:04:14 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:37919 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729299AbfAQVEO (ORCPT ); Thu, 17 Jan 2019 16:04:14 -0500 Received: by mail-pf1-f195.google.com with SMTP id q1so5419442pfi.5 for ; Thu, 17 Jan 2019 13:04:13 -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=lvbXIMcbH2/R4T1SUidbudtoMRAWFJRmwFg/TDHuXmk=; b=VGGZN7mPjhJMFcmnVD0NlPoBpJH62wKwRTZElRozBsKge7MCsDoeMCZ3Y8vQ27F3CE YPJ6vfgDUVU2MmpL9i6kvlTbKhphsGF4tsEoxol+bLZdHNidnxKY6JiUFTVkfZOoH/Bi A0P54kfhx5IbRuLz4/EjKCotVGyctdVe8X1liELSTK1uFrfCj/hKWVrGFJV24Of6m2kQ qOXdR61FlvRoCBJhVvKZdl8dhIaCCyrWsI8E13D9Pis+Ugtzcs/ppzbJzw8xeoSik4Jl YmKOEAZuQLmIXka6fA0EFefEAAAtGDYsJM1fh36D1hxhlDc6olUb3/uUrNtLPMpu8ug4 5IlA== 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=lvbXIMcbH2/R4T1SUidbudtoMRAWFJRmwFg/TDHuXmk=; b=K3kqCwwQrWIKm6qS/d9jzpfHfnhXIu3p+ZVDKETnnPhi5/P/vX+QMlWgJjz1rhEetc lL4hWYJVaraGzoG7/Oocy26yPyM9vXYuhgW0tfZjMNfn+WwQDEd3FevGuKZIAPQKW0Eb vkv6D/AtNNeLaIMGKQSb9NKwIq5wPZgkmOaR9AxIp5Uw6FW5i0j9jBFWOkOgG0LD7FcO 8Uot+6l/GP+U6QHi2vtrQmh8/+tnD/Xr1/X07BRyXEa1fJHUMkMaiM8MxShFEi1CvEwp x0tvCdSenhWlPInOxIe8tlD6dI6xarB6rK3DLPYEowCiXQpSaPmMqwA8N6fXS4QONjqz AW4g== X-Gm-Message-State: AJcUukfFoQh1XHOYGtUy6CNHktRhTi8LsowHpJFKkSZi3C37foabifnj 1XextJRC4kqrKDs9RG4OQp3iKA== X-Google-Smtp-Source: ALg8bN4n8vbyaC72R4ALnknVo2KliHsjwcPhNQGMZJDh3k6ioVSlYeockalCHJxw+3fShr1Y9Ys0kQ== X-Received: by 2002:a63:ff16:: with SMTP id k22mr15020529pgi.244.1547759053363; Thu, 17 Jan 2019 13:04:13 -0800 (PST) Received: from localhost.localdomain ([122.164.30.252]) by smtp.gmail.com with ESMTPSA id s2sm4916114pfa.167.2019.01.17.13.04.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 13:04:12 -0800 (PST) From: Jeffrin Jose T To: mcgrof@kernel.org, shuah@kernel.org Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Jeffrin Jose T Subject: [PATCH] selftests: kmod: worked on errors which breaks the overall execution of the test script Date: Fri, 18 Jan 2019 02:32:58 +0530 Message-Id: <20190117210258.7871-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. 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 }