mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sumit Semwal <sumit.semwal@linaro.org>
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 <sumit.semwal@linaro.org>
Subject: [PATCH 2/2] selftests: lib: prime_numbers: update presence check
Date: Mon, 19 Jun 2017 19:14:32 +0530	[thread overview]
Message-ID: <1497879872-11137-1-git-send-email-sumit.semwal@linaro.org> (raw)

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 <sumit.semwal@linaro.org>
---
 tools/testing/selftests/lib/prime_numbers.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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
 
-- 
2.7.4

             reply	other threads:[~2017-06-19 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 13:44 Sumit Semwal [this message]
2017-06-19 13:51 ` Chris Wilson
2017-06-19 14:46   ` Sumit Semwal
     [not found]     ` <149788426772.14237.4686476703933342760@mail.alporthouse.com>
2017-06-19 15:11       ` Sumit Semwal
     [not found]         ` <149795925290.25956.17215228674567137983@mail.alporthouse.com>
2017-06-20 13:08           ` Sumit Semwal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1497879872-11137-1-git-send-email-sumit.semwal@linaro.org \
    --to=sumit.semwal@linaro.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®