From patchwork Fri Jun 16 05:29:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Semwal X-Patchwork-Id: 105693 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp1136515qgd; Thu, 15 Jun 2017 22:29:50 -0700 (PDT) X-Received: by 10.99.105.74 with SMTP id e71mr9115773pgc.51.1497590989904; Thu, 15 Jun 2017 22:29:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497590989; cv=none; d=google.com; s=arc-20160816; b=TTUs+ABeSbFgHLv1Wih0nOpPFU1cyoxc/PIPvpsmVypsuPn+nuPwJWTVNoLODK9kS1 OjnUtDTB2Ni1SfhhEEdhaj1m4ERGepk3zqbzW6RR/9CkudKAzpRFm0O7e1QEK1ZKtv1j OxFzTOGMbCMQuJEwQE9Bi8X8JtdhTm6+nWCz0wHUSb/N4+kcQcA630mRHaC2WjtMqAfg yPAui9tmYTX2ltPdOaGSuLqLERErcCbHeBaemZsvOC+jP033XAMkZE+TB4hX0RuTXZ1p 6v+U/zNSfPX4aeT24dJaZa0b/k/mI3vhGXsFnS2Qofng4LEYF8itdZoFOnR1QKUJg32w Cprg== 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=uui6jBqPP7Ub1LFAuZMlAt5w4W3ITs+3IDcFcN9BkpA=; b=bDy7avUJT/03koU5pwPtGE0u1iMY1mBQmm6cUGuN0w6milpqHg+ia/ENlALDD9yBmb rg9A5Aufz6cP3dj2GSMQwT3vSFNgV2tL8tc+bnscig5yY4vQQA1yBcc4CDy1oDQf8UjF OPgx9DT2AdwciSHEpUn3wJG7fYOo2vgUTYsrBzlAcFrsjaDYWOoMqeXrrFOPJSZOvSPY Rl7Y5ZD7vQor9u5Bv+/KvnaOsYJ4skEcBxwGGhsjRAX/BUgyJ8OcXTdaX54Vk1rQwAmJ Gu03tLtv8ThLHfjuOy4b03CoHQRvi38BE2UhP7S9xWvX1dNvotu/bZuLBhRIL35onqTm Z/Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=Camo4jik; 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 71si1041640plb.635.2017.06.15.22.29.49; Thu, 15 Jun 2017 22:29:49 -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=Camo4jik; 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 S1751836AbdFPF3h (ORCPT + 25 others); Fri, 16 Jun 2017 01:29:37 -0400 Received: from mail-pg0-f51.google.com ([74.125.83.51]:34193 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750921AbdFPF3g (ORCPT ); Fri, 16 Jun 2017 01:29:36 -0400 Received: by mail-pg0-f51.google.com with SMTP id v18so16275185pgb.1 for ; Thu, 15 Jun 2017 22:29:35 -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=uui6jBqPP7Ub1LFAuZMlAt5w4W3ITs+3IDcFcN9BkpA=; b=Camo4jikT8M/6pGo7FL0y4v/up2bkJ3qgsuaY84ZegPsMQzWy4WLLoHfmas9p2b05E GlgvSWaZpHYTJGWc7XjkQWE4s6gaKkDXqAZ6D/k13MndseYhbJactsyTwHyxYTp/D4ck pRAdk9NgeUQAqDwaankFyoYAr6kOIgya3mGOk= 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=uui6jBqPP7Ub1LFAuZMlAt5w4W3ITs+3IDcFcN9BkpA=; b=dhU9+8yHCyk74goeyEtMayaDXxN3UYj2p8oBHtOGKibAn28y8AXqQmGhhzLwPpS/da omWwOnLwn3Q8RzgasjkthUw7Cm4yTb3x/Cn3VWMlsKAuy8ZKVJSF9QG3776Qb0OApIze aZYpRz/KKCTR/R+iZQy5ro1kR2ZxCDQ1bB4JU6J/da51/FtkDE+JtR5YMW/7mW7Bml21 zTiiDcAZTFCs/J0n8zQMXF6oa4E8Un6dDwcI83dU7l88BJzLt4o+sj5PrlkhATAExddG 1m/u5o3o+SIy5nupUvhOb7OhH3Z3H+DfKlcjCi05EFeKXYsSk4j+0pMTB6vKLdBtD8Jw iRFg== X-Gm-Message-State: AKS2vOzKsgzZR+1fc1XsjPJ+KND1GohWcGtBrnhMhQPtZ1kdTmyiSwvm J131yanWJf7BupB7 X-Received: by 10.84.130.2 with SMTP id 2mr10514712plc.242.1497590975366; Thu, 15 Jun 2017 22:29:35 -0700 (PDT) Received: from localhost.localdomain ([106.51.225.38]) by smtp.gmail.com with ESMTPSA id p23sm1784415pfi.52.2017.06.15.22.29.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Jun 2017 22:29:34 -0700 (PDT) From: Sumit Semwal To: shuah@kernel.org, linux-kselftest@vger.kernel.org Cc: keescook@chromium.org, decot@googlers.com, linux-kernel@vger.kernel.org, Sumit Semwal Subject: [PATCH] selftests: lib: Skip tests on missing test modules Date: Fri, 16 Jun 2017 10:59:25 +0530 Message-Id: <1497590965-12310-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 With older kernels, printf.sh and bitmap.sh fail because they can't find the respective test modules they are looking for. Add the skip portion on missing the respective test_XXX module. Error out the same way as prime_numbers.sh. Signed-off-by: Sumit Semwal --- tools/testing/selftests/lib/bitmap.sh | 5 +++++ tools/testing/selftests/lib/printf.sh | 5 +++++ 2 files changed, 10 insertions(+) -- 2.7.4 diff --git a/tools/testing/selftests/lib/bitmap.sh b/tools/testing/selftests/lib/bitmap.sh index 2da187b6ddad..85294b4a0861 100755 --- a/tools/testing/selftests/lib/bitmap.sh +++ b/tools/testing/selftests/lib/bitmap.sh @@ -1,6 +1,11 @@ #!/bin/sh # Runs bitmap infrastructure tests using test_bitmap kernel module +if ! /sbin/modprobe -q test_bitmap; then + echo "bitmap: [SKIP]" + exit 77 +fi + if /sbin/modprobe -q test_bitmap; then /sbin/modprobe -q -r test_bitmap echo "bitmap: ok" diff --git a/tools/testing/selftests/lib/printf.sh b/tools/testing/selftests/lib/printf.sh index 4fdc70fe6980..024e749a83d4 100755 --- a/tools/testing/selftests/lib/printf.sh +++ b/tools/testing/selftests/lib/printf.sh @@ -1,6 +1,11 @@ #!/bin/sh # Runs printf infrastructure using test_printf kernel module +if ! /sbin/modprobe -q test_printf; then + echo "printf: [SKIP]" + exit 77 +fi + if /sbin/modprobe -q test_printf; then /sbin/modprobe -q -r test_printf echo "printf: ok"