Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5384264ybi; Wed, 12 Jun 2019 01:25:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPHBhoMoiehY43EJHNcox+yWZopSqMWvPYkAPIgSbbAziu9Rd5KAhX51tIfpkF6EKW/PGF X-Received: by 2002:aa7:8d50:: with SMTP id s16mr84119770pfe.96.1560327929833; Wed, 12 Jun 2019 01:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560327929; cv=none; d=google.com; s=arc-20160816; b=Nwf8gELHOHlJ4RsVbJu55hRvuzliigOareHDIfWh7tsgMEcCWpswHCYmnI2juKBpGH 8LDqCIZzpfCNgD9peUpPgymLzi9Zg9Pe2Lf+AfxEKZcKMEnt7oVR0H92xdaALPKUroec 6ri97IHz0uJMIApvdNwRfLGcDgxob5qK4tn4LGHjh/Tc0QQD8DRxxXJnUxh41B4QRCR7 2cGEyhqrTf9ZFQ9a2mOEDjNdzHnA6daupiWn7IeJpYYM3NiqN5F6y7KAc3zodZibqyhL 9mur8xPD+2unXS/0NGZzmuGwWbTux0qLdLQZLWXTLMOQIs2Xpq4a16r8DOddtRy6HqQw Aopg== 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; bh=iQGtsCBn1c5Cv/4lGqwB4bSu8wIK/ZdJUuePfHlu3Os=; b=MgQBgGeuXudWVuqOnmtNJDMRnM6Eoj1hb7s9cKyAGncTEbnXnAf4RyCJifwt0Y1nJV f9upgm/9aX2m+mlTJSOgu3uTtwv7/xbsnauhIn3EWhbo/sfic2HcDw1TTgZEXZnagkHS DLDGESibI9s9UsQ0efS3J53dbkffNwW478mpawQdGAXWbazANwfh28orR92ZQcHGSrQi zSzh3OM1HYhLdUabEjMR39s/1SJuwGabJhuFin2HZnO6lnP9Gq5zG/D/V8YUXsU12Hkr /8fp3UNxFYmLIzAtJj0R0r+feRwc5UypVxlQlcASZ95gj+QnPFILurjA988jrpVJj9ds i7Pg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si14717908pgp.326.2019.06.12.01.25.13; Wed, 12 Jun 2019 01:25:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726685AbfFLGsE (ORCPT + 99 others); Wed, 12 Jun 2019 02:48:04 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:39925 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726726AbfFLGsE (ORCPT ); Wed, 12 Jun 2019 02:48:04 -0400 Received: from mail-pf1-f197.google.com ([209.85.210.197]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hax3C-0000VR-0E for linux-kernel@vger.kernel.org; Wed, 12 Jun 2019 06:48:02 +0000 Received: by mail-pf1-f197.google.com with SMTP id 5so11359778pff.11 for ; Tue, 11 Jun 2019 23:48:01 -0700 (PDT) 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=iQGtsCBn1c5Cv/4lGqwB4bSu8wIK/ZdJUuePfHlu3Os=; b=Yoi3nQIS7324HUGA4I9RhuAsW9pbWhWT+yNB/zNqilMzDkfRIF2T5G+puZNum8Sw5k rr9tVEHrXbQxdsPqZyO2ztyg6T6lXCznmf8rnSbwQotCoW5vUeXZq3ml4UrJD1nPMgEr DGYwMiOuQfYDfSRlMTXdLXg8K0UB76dXb2coSXOPDdkkrxlIkoIQe7IOJY+LC7VdZDQV +gn4Qr3HmHm0n7OLnw1bgRDJbO8n0/9L3SlXlM4U7qBdsPCbkpgFcrmvtJrF+v6z/G2u heA+jHAbuAX/TBCv49GQeOkNyWxg9Ul6QrZskSvGEHzO8qQ3GR5GYnA8VtB9dZBN+0aa SRqw== X-Gm-Message-State: APjAAAWzV5kMmNozjM9RieELQ/M22w2QyGtwQDl9flF1q81zHL2/8Pho XfFLpNz0lIWKmB1gzS+gASRRT2v1DGMDoE4GMOJTngYzOn1hXXcO7KyDSjjd6yjpEA7QyqXevqv EN0x9C5ajyTun4knbG4Jl88PBLdyjyDTLgER2uHLk X-Received: by 2002:a17:902:2926:: with SMTP id g35mr34534392plb.269.1560322080598; Tue, 11 Jun 2019 23:48:00 -0700 (PDT) X-Received: by 2002:a17:902:2926:: with SMTP id g35mr34534368plb.269.1560322080271; Tue, 11 Jun 2019 23:48:00 -0700 (PDT) Received: from Leggiero.taipei.internal (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id p68sm9888878pfb.80.2019.06.11.23.47.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 11 Jun 2019 23:47:59 -0700 (PDT) From: Po-Hsu Lin To: davem@davemloft.net, shuah@kernel.org Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selftests/net: skip psock_tpacket test if KALLSYMS was not enabled Date: Wed, 12 Jun 2019 14:47:52 +0800 Message-Id: <20190612064752.6701-1-po-hsu.lin@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The psock_tpacket test will need to access /proc/kallsyms, this would require the kernel config CONFIG_KALLSYMS to be enabled first. Check the file existence to determine if we can run this test. Signed-off-by: Po-Hsu Lin --- tools/testing/selftests/net/run_afpackettests | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/net/run_afpackettests b/tools/testing/selftests/net/run_afpackettests index ea5938e..8b42e8b 100755 --- a/tools/testing/selftests/net/run_afpackettests +++ b/tools/testing/selftests/net/run_afpackettests @@ -21,12 +21,16 @@ fi echo "--------------------" echo "running psock_tpacket test" echo "--------------------" -./in_netns.sh ./psock_tpacket -if [ $? -ne 0 ]; then - echo "[FAIL]" - ret=1 +if [ -f /proc/kallsyms ]; then + ./in_netns.sh ./psock_tpacket + if [ $? -ne 0 ]; then + echo "[FAIL]" + ret=1 + else + echo "[PASS]" + fi else - echo "[PASS]" + echo "[SKIP] CONFIG_KALLSYMS not enabled" fi echo "--------------------" -- 2.7.4