Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5642464img; Wed, 27 Mar 2019 12:17:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqztCXq7oDMz7gmOdqOsYMmOBU4CZcd8TZwJDfBQeQPw58UaA9876dpnku/k7adOdgvhOS0U X-Received: by 2002:a65:5c49:: with SMTP id v9mr36297961pgr.150.1553714224296; Wed, 27 Mar 2019 12:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553714224; cv=none; d=google.com; s=arc-20160816; b=0EvR5VMi9XnAfM3jdcixRBVI+/LWKPHgXWc7caCd9nsDHFDQzDyXSshY9HhAswmpt7 q+U65G9ASfTs1o9/PSmE6aMZomFjqHm+R1iBtqACxyz0nloYm6+NoXUt7RsQc6TJZB36 n+hC1L9wmihz9DzY8u67aDZUIACP8jU8F7WxuZiC2xR99I7Y2cORwKOIXseYLY4nfGRS ixw28AP46bgB+IZsKfy9KmZeAfJPbGr9UydgyCgb+1KTPBJzvxmPfaUmrGVMgl7IdMDv 8x1TzUnmt399nPyF0WDwt+HbttW03VUeJoaAFplaUEp3kCHZ+1sx4QR0g0mr7ZcA/iFc FlNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=naJBIKqeVW7ZiFueCCiXJ4zACT6QlEiw4fdPIJQFaI0=; b=OdgqNEqOc21Dfww4gARn+2dcdKR39ebgm3yonuvjBWC1fOTWHlqsr8lpaANabh1gCK Q6H/dhaXG5TgT57Hc+mXRvUyOzYc9Q75wFNGNAI3IySd7Mm7SPBmVWEoTHQtgdBSQKFF MVA05KY0qkftUkgj+Ycu3FiMGIHLZPJtOt3mWzOdBgaGSInl6luc1LxQ8BpYzZMgjkNX JXWimRrcaauJ6+eS7PWJaD2pk2LsWME8ACScLK0bwxZhwOOUBAzxtsDChcjgdTDk9iUH 7FBokXjZG0BAQJEiY19MHlw3NjH2+K5HgRXVQm0AWJn1xLheKYekWCZMBBox/GPY1oSL EjfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=woVdXMAx; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k16si449881pgb.587.2019.03.27.12.16.48; Wed, 27 Mar 2019 12:17:04 -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=@kernel.org header.s=default header.b=woVdXMAx; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388609AbfC0TQQ (ORCPT + 99 others); Wed, 27 Mar 2019 15:16:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:50956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732800AbfC0SJJ (ORCPT ); Wed, 27 Mar 2019 14:09:09 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B82592147C; Wed, 27 Mar 2019 18:09:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710148; bh=B79Hd6X3KLWO53HyK6zgiFcV+EC8nALm1QMiX27vHpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=woVdXMAxdCP8U5xPsduzWQ1E14kfAqlygnWfdFxXcr5GFTyDDnlO11Qr44qaW65fA yr1Mq1Y3sWhb0RpxQ8+jRlStrNcfroK63EM/tbLTGqQUGUKH62Uk8yYSKqkWR2vTcf DbH9UQRsP40/1qkdXOC5Mxn9Q4g1vC+3epLdjrA8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Stanislav Fomichev , Daniel Borkmann , Sasha Levin , linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH AUTOSEL 5.0 218/262] selftests/bpf: suppress readelf stderr when probing for BTF support Date: Wed, 27 Mar 2019 14:01:13 -0400 Message-Id: <20190327180158.10245-218-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stanislav Fomichev [ Upstream commit 2f0921262ba943fe9d9f59037a033927d8c4789b ] Before: $ make -s -C tools/testing/selftests/bpf readelf: Error: Missing knowledge of 32-bit reloc types used in DWARF sections of machine number 247 readelf: Warning: unable to apply unsupported reloc type 10 to section .debug_info readelf: Warning: unable to apply unsupported reloc type 1 to section .debug_info readelf: Warning: unable to apply unsupported reloc type 10 to section .debug_info After: $ make -s -C tools/testing/selftests/bpf v2: * use llvm-readelf instead of redirecting binutils' readelf stderr to /dev/null Signed-off-by: Stanislav Fomichev Acked-by: Song Liu Signed-off-by: Daniel Borkmann Signed-off-by: Sasha Levin --- tools/testing/selftests/bpf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 41ab7a3668b3..936f726f7cd9 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -96,6 +96,7 @@ $(BPFOBJ): force CLANG ?= clang LLC ?= llc LLVM_OBJCOPY ?= llvm-objcopy +LLVM_READELF ?= llvm-readelf BTF_PAHOLE ?= pahole PROBE := $(shell $(LLC) -march=bpf -mcpu=probe -filetype=null /dev/null 2>&1) @@ -132,7 +133,7 @@ BTF_PAHOLE_PROBE := $(shell $(BTF_PAHOLE) --help 2>&1 | grep BTF) BTF_OBJCOPY_PROBE := $(shell $(LLVM_OBJCOPY) --help 2>&1 | grep -i 'usage.*llvm') BTF_LLVM_PROBE := $(shell echo "int main() { return 0; }" | \ $(CLANG) -target bpf -O2 -g -c -x c - -o ./llvm_btf_verify.o; \ - readelf -S ./llvm_btf_verify.o | grep BTF; \ + $(LLVM_READELF) -S ./llvm_btf_verify.o | grep BTF; \ /bin/rm -f ./llvm_btf_verify.o) ifneq ($(BTF_LLVM_PROBE),) -- 2.19.1