From patchwork Mon Jun 19 13:44:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Semwal X-Patchwork-Id: 105834 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp861771obh; Mon, 19 Jun 2017 06:45:01 -0700 (PDT) X-Received: by 10.99.168.5 with SMTP id o5mr23916325pgf.33.1497879901092; Mon, 19 Jun 2017 06:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497879901; cv=none; d=google.com; s=arc-20160816; b=XoCQfJvDpHFTv33EM2tm6HpWtQOaHY9kW5PCaobrr3V+oupND5ehv9WR8/5kkRKBtB iWSVYBevLWh+GROAzlN8b6BbdZXAWD9TThYywaiU5TENMgx1jjpLGXIB4ZXF7/13idL8 /5kSPA7N3Dabufd2P6zcysRQrfnDgTQJnJJauQx38pdNFb3u2RcVwg21lbN16kLD7xKt caq1rl+cTHKqR12laXW2AMXmFGWRkF99laNPpQYed7Br5NXrU7h2UZZL2jEmRW2q8o/E /TZ3GIPesimiy2YECuGgqa3JKKT8Rf/sQs3crHMzmoJevHUe/2bvKAYhjRbxtGjta6AZ Wxcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=jRe7FnoBKDU5Kvl9D9oaijetkRHdtNi0yTPS80kYU0M=; b=fZQhv4Ou475RS14Vsaz48QvXpj1rWGk0smwGd4TiBdnzMbuMk83QFmvEYZnre8vg5w h4CrcI/iRe4+rYOvgr3Sjkcb3cdM7wbITNf8rP2KJVKVdS0UHto8qvHyDdxmT0cfMF9z 6w76/szWl9YSWbUoe02ZyyIFuWIv47ZUa/RlDd8ZxpaS1TvSnggGViqweSyZdUt5IEf9 2ZCzBCfP87iKTsbxDivXk2rtRdLXs9Tj++Jx98cfcQAqxnwBlrt2IIJvwPKnP8o1ngrw 6v92ESlG+mNpCmic/WPaw2Tm2TRG12EobiD5D7H6O+jAd4tkLCKLEbZ3Hg/UXTzC4gxr sziw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=hzrZ/nXP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si8261422pge.256.2017.06.19.06.45.00; Mon, 19 Jun 2017 06:45:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=hzrZ/nXP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751038AbdFSNon (ORCPT + 25 others); Mon, 19 Jun 2017 09:44:43 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:36322 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750988AbdFSNok (ORCPT ); Mon, 19 Jun 2017 09:44:40 -0400 Received: by mail-pf0-f170.google.com with SMTP id x63so53889931pff.3 for ; Mon, 19 Jun 2017 06:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jRe7FnoBKDU5Kvl9D9oaijetkRHdtNi0yTPS80kYU0M=; b=hzrZ/nXP0cTCbckT5tJWdmKy1qplg4URnOCQweZdkgt5laRrFyyQQ/iGoBmoDe+Cin tQJNOevVQfzMrSRReMS5iaBNUCxTWj//N8LBld4KBBFj9jPhh3WKp+nzJIugb/cnwUwO tpviDNCC940f+K/7hof38epeIB895DVAX5LkM= 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; bh=jRe7FnoBKDU5Kvl9D9oaijetkRHdtNi0yTPS80kYU0M=; b=hRq/ESM3bdKhIjN1lbrETUE1P1JP+AjDU8xOcEo2+KLCX7VVrj/4fJ9iwWolFLUy1X f/bDbuYzeNPPy2CVV+eyefT5qULOR6oJe8neJY9KD/IxEbEy1rcKFwX5m9iDPS0C+pNc vb25Rb2ZbLOOHG7h7xxP5y+LFZYfkOBkupCoQJNMHZ4LgCqn8K2gC00xcRENyHYP8znW W5owziv4fTO40h5s96Rnl3nwCikRHJFPn3x0nUHxoOuZp3EiDtfrdmhPsKIivJtfLrmY ocPrtsUYuNuZqABWmZVcvZfy0f5sNkUmU/UXj30jJrtByAcE0URuEMn+fNSjIUFkZxMB NR8A== X-Gm-Message-State: AKS2vOw2XQ17xHQib4pIQ+Ha+VCgtLm9GsjrP8huLiqOfxDc69GBJx81 DarZB5vnuaLUfTz/stFOOg== X-Received: by 10.84.224.77 with SMTP id a13mr24040240plt.25.1497879879680; Mon, 19 Jun 2017 06:44:39 -0700 (PDT) Received: from localhost.localdomain ([106.51.225.38]) by smtp.gmail.com with ESMTPSA id v17sm19685671pgn.4.2017.06.19.06.44.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jun 2017 06:44:38 -0700 (PDT) From: Sumit Semwal To: shuah@kernel.org, linux-kselftest@vger.kernel.org Cc: chris@chris-wilson.co.uk, lukas@wunner.de, linux-kernel@vger.kernel.org, daniel.vetter@ffwll.ch, joonas.lahtinen@linux.intel.com, Sumit Semwal Subject: [PATCH 2/2] selftests: lib: prime_numbers: update presence check Date: Mon, 19 Jun 2017 19:14:32 +0530 Message-Id: <1497879872-11137-1-git-send-email-sumit.semwal@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The test for prime numbers doesn't differentiate between missing prime_numbers.ko and failure in prime_numbers.ko. Update it to check for presence of the file itself to skip, therefore correctly exercising the test failure case. Signed-off-by: Sumit Semwal --- tools/testing/selftests/lib/prime_numbers.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/tools/testing/selftests/lib/prime_numbers.sh b/tools/testing/selftests/lib/prime_numbers.sh index da4cbcd766f5..492f0dcdf088 100755 --- a/tools/testing/selftests/lib/prime_numbers.sh +++ b/tools/testing/selftests/lib/prime_numbers.sh @@ -1,8 +1,9 @@ #!/bin/sh # Checks fast/slow prime_number generation for inconsistencies -if ! /sbin/modprobe -q -r prime_numbers; then - echo "prime_numbers: [SKIP]" +if ! find /lib/modules/$(uname -r) -type f -name prime_numbers.ko | grep -q .; +then + echo "prime_numbers: prime_numbers.ko not found: [SKIP]" exit 77 fi