From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A786C169C4 for ; Fri, 8 Feb 2019 17:41:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC9432146E for ; Fri, 8 Feb 2019 17:41:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="FTL2arfV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727860AbfBHRld (ORCPT ); Fri, 8 Feb 2019 12:41:33 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:51257 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727338AbfBHRlc (ORCPT ); Fri, 8 Feb 2019 12:41:32 -0500 Received: by mail-wm1-f67.google.com with SMTP id b11so4418501wmj.1 for ; Fri, 08 Feb 2019 09:41:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nLrta1H0yZlSFETMjNhLUjUkb4DBJsLvLNluySIfdjA=; b=FTL2arfVMeh1W4q1Hc2wkNETnmxzXiTGiNguoCBh2JEdaK+GavRsP3HSDgknzze02p egfRti0J0HKdXNals3Mp9u4G5PP5SiOvoHijnGV4rUqAbzVNf+719x6RWywB4YUJ8aSA J3W3xaelZq65VgcIZqZDgIThpivbynQK17+/we7gOOsqOCh0DGijyZyatd7/PDUCmO9U HOUJr37G8LAjVWze2LyPsR5vU9Vq1Ct4NY/IuNoZEU8TtLY1qY3A0EtG5OWYNpWg4aq/ XVejG/Gtu9FP7GwhP7mgFYmH4KaynfmfLZ5KdmjfcSK44ubM5bb0r4E/gHBt92mKVZcg e2Bg== 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=nLrta1H0yZlSFETMjNhLUjUkb4DBJsLvLNluySIfdjA=; b=MIBEdyO+OJGXcBiecrJVjzqFFczCbO5XdN61Bd03YMJzzsW6bC05SpNiANO57eVN0d XSYNtXZD1NAAJvKOxxEeDoOWe3AJHFVC/8MaNLvhN/Q5JfhONI7Vfzx4B9qeNxTKtPQv 1YAQYraYhIqav9odRKziLlz+Nv7qU3JXwBu+x4guJJ+hf+D924IHHcgW5gnZBsyz6fh/ vUHCnVgwznQU7bsixnGmWLyVNdZ3DyO65pDbE3t6mPksqE1ixrghSovMGqfMyPt8i6Mi o8rqYe4phhZmXj/KZbTW9ny8NnJ6d+n81/LvZlyq9OPDIY7f+kXqXwRwvn70TFcrUR3v RxLg== X-Gm-Message-State: AHQUAuaB7EYUNA6NOD2pBn4LOAFDMYod//SR4hlGuUzOhxRqT1gBvd33 kYPPgz9+gMwFKyumBLNDBOjbeQ== X-Google-Smtp-Source: AHgI3IaY+13uYN5jrpa6c3c3MRK3YxPJ8qa8KnFGDww1pHRTJXjM542eNZkWf5c7tGYgeTO7KpAO7A== X-Received: by 2002:a5d:4487:: with SMTP id j7mr11716653wrq.83.1549647690465; Fri, 08 Feb 2019 09:41:30 -0800 (PST) Received: from cbtest28.netronome.com ([217.38.71.146]) by smtp.gmail.com with ESMTPSA id w16sm2944138wrp.1.2019.02.08.09.41.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Feb 2019 09:41:29 -0800 (PST) From: Jiong Wang To: alexei.starovoitov@gmail.com, daniel@iogearbox.net Cc: netdev@vger.kernel.org, oss-drivers@netronome.com, Jiong Wang Subject: [PATCH bpf-next 2/3] selftests: bpf: extend sub-register mode compilation to all bpf object files Date: Fri, 8 Feb 2019 17:41:20 +0000 Message-Id: <1549647681-13818-3-git-send-email-jiong.wang@netronome.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549647681-13818-1-git-send-email-jiong.wang@netronome.com> References: <1549647681-13818-1-git-send-email-jiong.wang@netronome.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org At the moment, we only do extra sub-register mode compilation on bpf object files used by "test_progs". These object files are really loaded and executed. This patch further extends sub-register mode compilation to all bpf object files, even those without corresponding runtime tests. Because this could help testing LLVM sub-register code-gen, kernel bpf selftest has much more C testcases with reasonable size and complexity compared with LLVM testsuite which only contains unit tests. There were some file duplication inside BPF_OBJ_FILES_DUAL_COMPILE which is removed now. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang --- tools/testing/selftests/bpf/Makefile | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 383d2ff..70b2570 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -35,20 +35,15 @@ BPF_OBJ_FILES = \ sendmsg4_prog.o sendmsg6_prog.o test_lirc_mode2_kern.o \ get_cgroup_id_kern.o socket_cookie_prog.o test_select_reuseport_kern.o \ test_skb_cgroup_id_kern.o bpf_flow.o netcnt_prog.o test_xdp_vlan.o \ - xdp_dummy.o test_map_in_map.o test_spin_lock.o test_map_lock.o - -# Objects are built with default compilation flags and with sub-register -# code-gen enabled. -BPF_OBJ_FILES_DUAL_COMPILE = \ - test_pkt_access.o test_pkt_access.o test_xdp.o test_adjust_tail.o \ - test_l4lb.o test_l4lb_noinline.o test_xdp_noinline.o test_tcp_estats.o \ + xdp_dummy.o test_map_in_map.o test_spin_lock.o test_map_lock.o \ + test_pkt_access.o test_xdp.o test_adjust_tail.o test_l4lb.o \ + test_l4lb_noinline.o test_xdp_noinline.o test_tcp_estats.o \ test_obj_id.o test_pkt_md_access.o test_tracepoint.o \ - test_stacktrace_map.o test_stacktrace_map.o test_stacktrace_build_id.o \ - test_stacktrace_build_id.o test_get_stack_rawtp.o \ - test_get_stack_rawtp.o test_tracepoint.o test_sk_lookup_kern.o \ - test_queue_map.o test_stack_map.o + test_stacktrace_map.o test_stacktrace_build_id.o \ + test_get_stack_rawtp.o test_sk_lookup_kern.o test_queue_map.o \ + test_stack_map.o -TEST_GEN_FILES = $(BPF_OBJ_FILES) $(BPF_OBJ_FILES_DUAL_COMPILE) +TEST_GEN_FILES = $(BPF_OBJ_FILES) # Also test sub-register code-gen if LLVM + kernel both has eBPF v3 processor # support which is the first version to contain both ALU32 and JMP32 @@ -58,7 +53,7 @@ SUBREG_CODEGEN := $(shell echo "int cal(int a) { return a > 0; }" | \ $(LLC) -mattr=+alu32 -mcpu=probe 2>&1 | \ grep 'if w') ifneq ($(SUBREG_CODEGEN),) -TEST_GEN_FILES += $(patsubst %.o,alu32/%.o, $(BPF_OBJ_FILES_DUAL_COMPILE)) +TEST_GEN_FILES += $(patsubst %.o,alu32/%.o, $(BPF_OBJ_FILES)) endif # Order correspond to 'make run_tests' order -- 2.7.4