From patchwork Thu Sep 7 08:19:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naresh Kamboju X-Patchwork-Id: 111866 Delivered-To: patch@linaro.org Received: by 10.140.94.239 with SMTP id g102csp475926qge; Thu, 7 Sep 2017 01:19:23 -0700 (PDT) X-Received: by 10.99.3.74 with SMTP id 71mr1842509pgd.401.1504772363185; Thu, 07 Sep 2017 01:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504772363; cv=none; d=google.com; s=arc-20160816; b=jSh3ZrAC8JDMahWjd0nOjM7L0JEiEoDWuxy1qMPZOCcR5F4DvCoZS50C5V62m94Ug9 hAMbWW9tm0hDmIrG1nnoIAK6ZHFtcwEe2ig9LOkgdnZEOgNpumz/anWhkVEmd3pAqrGM S2T0mz7FpN+sMoAup8YHdBUIiCK3txV5dWMOqihLXVmrIu5zXzlerSAxUi2j2uV7ui8W sZZF9EII0sQ3CsAqt9kGpKIFHZ7dfS3fAfZE+aAdF8fwkDBD1yeETIr1uCrAnp0ljL+i mZFKqh+yyaLCkgDmEkyq3gMMPadgRWfsBUKF+jCArACcNLOqki2XMBysGI86PXpP17Tv RFkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=b5+OLp8ylfli132jo7SJofVU536YsR3/8FUSLMIOl+8=; b=DQ7on1DGCpr6FMD6RqjghD/FDDiGkdV1n6HElsFn1eQHRuUef80UGJ6TZJWZrVWohA k2/c3n/5DEQwhLwxjHRuKZ7JngIcFNW3iwwHzura8K1r4h218gGln8yEYkyIz83JBMXW CTA+LwEvxZJox8hyMzB4lY5qqcADxEt/MGgBDirbDEXYjVJWRu6JIUtL5XdS40LeNzmn CuXOLGh2FiBUXdqWEyuLC7lFrW1utMzpMznw2PM3yuHCtCxiklO7HGrEQbglM/L/CFyw L49tQwJ9meOSRulU5BmFVHSdlsHdwPMOBcfy8aHk4X8EZdKjhBm8Xv5O6M9WHKiOT2IX w9qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KjqkXAFG; 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 43si1587258plb.617.2017.09.07.01.19.22; Thu, 07 Sep 2017 01:19:23 -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.s=google header.b=KjqkXAFG; 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 S1754597AbdIGITT (ORCPT + 26 others); Thu, 7 Sep 2017 04:19:19 -0400 Received: from mail-pg0-f53.google.com ([74.125.83.53]:34404 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754477AbdIGITN (ORCPT ); Thu, 7 Sep 2017 04:19:13 -0400 Received: by mail-pg0-f53.google.com with SMTP id q68so3822254pgq.1 for ; Thu, 07 Sep 2017 01:19:13 -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:in-reply-to:references; bh=b5+OLp8ylfli132jo7SJofVU536YsR3/8FUSLMIOl+8=; b=KjqkXAFGmza9hY0H4Cf9VFk65w1QZj8zTvmNb0CxXoFCYEi10V0lp4Es4cDjhqkjgD LspL53J3EPzbiWr/pKSUykHoQmorYSs5Pn/L7Mx0R2uW7zkgG0aQ/pzKSjCun+acse1D SrwHoM9k5pIOf9k5HP9q7nQwNx7aDFi3Z/gNg= 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:in-reply-to :references; bh=b5+OLp8ylfli132jo7SJofVU536YsR3/8FUSLMIOl+8=; b=uDDcmEIiHjUL9ri5n+ZRBmkwTpAmANJ8RzpC7Xrk1crSl7hLevn948cl00+lwLNIMT rPLQAiobTHmqaGUfWYwycdjrsaAMh/Tuy1gKlfeAV1Ei5XqBGNDfsqRo/UghSVUvCtiB kkM1KoYxmEDvwp65P1///r11/wFW+qhl+InzIEsWS0oLOVLyiSccxVNy0OOyJ9mvkCvY oO9vGqSOoG9LrNBjTCRP5O3jHeyTrQq5vw83grwYWMaSL9zixTTFNeYNu4kghUN0UgAg oTQdmjGUPTPa1BkPbJKNamXP2JrFeH2P9iLEw0levrSFWoKUjIyf7inL/1xtEdc0y7t9 KTfQ== X-Gm-Message-State: AHPjjUhXcjVJxB3n0jtqY7r1aDGkGymkZUvvNOlt/0XMPvs3qoCqrVyS 9odz3LUf9NqDhY6wBW8rXw== X-Google-Smtp-Source: ADKCNb7EHrlUavcF/6hJbzBozrUU6EYOCQzIn/Xgs9p/0jUPTf4wFrmY8QodcwNDMSqYCX4eL/IfVQ== X-Received: by 10.99.125.25 with SMTP id y25mr1899146pgc.45.1504772352787; Thu, 07 Sep 2017 01:19:12 -0700 (PDT) Received: from localhost.localdomain ([122.175.18.215]) by smtp.gmail.com with ESMTPSA id i63sm2580522pge.12.2017.09.07.01.19.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Sep 2017 01:19:12 -0700 (PDT) From: naresh.kamboju@linaro.org To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org, daniel@iogearbox.net Cc: linux-kernel@vger.kernel.org, davem@davemloft.net Subject: [PATCH v2 2/2] selftests: bpf: test_kmod.sh: use modprobe on target device Date: Thu, 7 Sep 2017 13:49:02 +0530 Message-Id: <1504772342-21878-2-git-send-email-naresh.kamboju@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504772342-21878-1-git-send-email-naresh.kamboju@linaro.org> References: <1504772342-21878-1-git-send-email-naresh.kamboju@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Naresh Kamboju on ARM and ARM64 devices kernel source tree is not available so insmod "$SRC_TREE/lib/test_bpf.ko" is not working. on these target devices the test_bpf.ko is installed under /lib/modules/`uname -r`/kernel/lib/ so use modprobe dry run to check for missing test_bpf.ko module and insert for testing. Signed-off-by: Naresh Kamboju --- tools/testing/selftests/bpf/test_kmod.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.13.0 Acked-by: Daniel Borkmann diff --git a/tools/testing/selftests/bpf/test_kmod.sh b/tools/testing/selftests/bpf/test_kmod.sh index a53eb1cb54ef..eab9a970d742 100755 --- a/tools/testing/selftests/bpf/test_kmod.sh +++ b/tools/testing/selftests/bpf/test_kmod.sh @@ -14,6 +14,16 @@ test_run() if [ $? -ne 0 ]; then rc=1 fi + else + # Use modprobe dry run to check for missing test_bpf module + if ! /sbin/modprobe -q -n test_bpf; then + echo "test_bpf: [SKIP]" + elif /sbin/modprobe -q test_bpf; then + echo "test_bpf: ok" + else + echo "test_bpf: [FAIL]" + rc=1 + fi fi rmmod test_bpf 2> /dev/null dmesg | grep FAIL