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=-3.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, 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 89842C282C0 for ; Fri, 25 Jan 2019 23:24:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 31388217D4 for ; Fri, 25 Jan 2019 23:24:56 +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="mfL3M/Oq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729482AbfAYXYz (ORCPT ); Fri, 25 Jan 2019 18:24:55 -0500 Received: from mail-qt1-f171.google.com ([209.85.160.171]:36170 "EHLO mail-qt1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbfAYXYy (ORCPT ); Fri, 25 Jan 2019 18:24:54 -0500 Received: by mail-qt1-f171.google.com with SMTP id t13so12592886qtn.3 for ; Fri, 25 Jan 2019 15:24:53 -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:mime-version :content-transfer-encoding; bh=WDO2gSZhfQnBMNX5rraf1v15cJI0A5MTwkRPt3GZD9c=; b=mfL3M/OqHY94YhOEao7NowYaN2BNGUf7bmFRGVk4Qcz2n+zR0XWqBe5kGOU7V5YpKQ V6ArSEGe0Xib4NWjuKnQW6/leo/hblY7cJF4+wsWrK1mYkBZL6C0xtaKl76togLIss1q bhOBZ/7+fvhAYsqGLbLal0P3pEB2ORlu+slVeXyWJU6kHkSF5d+oTNO7PdxNoFPwicQ0 FuOJUwFmyx8WRwGf/P/UmEQ/tGnOmB5fah2YKTXC+MLR5jSfMBDoDfCeZR+HPTEL9Vd5 nO/PpZ4sB8CMErElnooXEWQ65ufOh0RWCFjhsVG8xD4ZKm79xM5qugiImZ+jmJ2hbwKU TNGA== 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:mime-version :content-transfer-encoding; bh=WDO2gSZhfQnBMNX5rraf1v15cJI0A5MTwkRPt3GZD9c=; b=PpnPqxPzDBrIfO5HqQxjVtF+Y5s/tBQDyvTWxX3vospNHCc3av9d17FCn7tbuKdzfM sJPdB7VXtSDL4aM1bw69V/WIkdqOZUKpPgQNMky/e83bDc1mQy/rgV9I8WhdWZqpQM7e oaUCoSJyDiXHokd3TABUs49apQlfeVhLbGxbHiq1G5eUn6cRtj/HfFYiYv7Xt9rAacEm 97UX9XDgVy1qzU0u+ESsUtQFjpQclcLrxE8gNqCH/FpuQ+IEkpEDcFeJUZ3TqOS6XNsn ja4TP6hRArkIMn8Yj6eQPsIgIN969B+l9yFY6Y6/02c9iO8bjyZZcqMxlbIhtdt2fEWm Fovg== X-Gm-Message-State: AJcUukf0rluJ3QkH4A5xEQtfADoauqEJngXuHzn5OHXDbSDduDHlCpTR AA6R8iJE307E0CGAchDKh6VZHg== X-Google-Smtp-Source: ALg8bN5++IVjTdttMH8KX7TwVXbQ2tocTC+wSniqCRY5Wj20PUcLCbTRzKZv5qlduebmupKiO66vKw== X-Received: by 2002:ac8:3a64:: with SMTP id w91mr12957253qte.70.1548458693316; Fri, 25 Jan 2019 15:24:53 -0800 (PST) Received: from jkicinski-Precision-T1700.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id y4sm84095875qtc.47.2019.01.25.15.24.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 15:24:52 -0800 (PST) From: Jakub Kicinski To: alexei.starovoitov@gmail.com, daniel@iogearbox.net Cc: oss-drivers@netronome.com, netdev@vger.kernel.org, Jakub Kicinski Subject: [PATCH bpf-next v2 0/3] selftests: bpf: break up test_verifier Date: Fri, 25 Jan 2019 15:24:41 -0800 Message-Id: <20190125232444.30172-1-jakub.kicinski@netronome.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi! The tools/testing/selftests/bpf/test_verifier.c file is way too large, and since most people add their at the end of the list it's very prone to conflicts. Break it up in the simplest possible way - slice the array up into smaller C files and include them in the right spot. Tested: $ make -C tools/testing/selftests/bpf/ $ cd tools/testing/selftests/bpf/ ; make v2: The indentation is reduced further as discussed and lines folded. The conversion was scripted, and double checked by hand. Jakub Kicinski (3): selftests: bpf: prepare for break up of verifier tests selftests: bpf: break up test_verifier selftests: bpf: break up the rest of test_verifier tools/testing/selftests/bpf/Makefile | 13 + tools/testing/selftests/bpf/test_verifier.c | 16288 +--------------- .../testing/selftests/bpf/verifier/.gitignore | 1 + tools/testing/selftests/bpf/verifier/and.c | 50 + .../selftests/bpf/verifier/array_access.c | 219 + tools/testing/selftests/bpf/verifier/basic.c | 23 + .../selftests/bpf/verifier/basic_call.c | 50 + .../selftests/bpf/verifier/basic_instr.c | 134 + .../selftests/bpf/verifier/basic_stack.c | 64 + .../selftests/bpf/verifier/basic_stx_ldx.c | 45 + tools/testing/selftests/bpf/verifier/bounds.c | 508 + .../selftests/bpf/verifier/bounds_deduction.c | 124 + .../bpf/verifier/bounds_mix_sign_unsign.c | 406 + .../selftests/bpf/verifier/bpf_get_stack.c | 44 + tools/testing/selftests/bpf/verifier/calls.c | 1942 ++ tools/testing/selftests/bpf/verifier/cfg.c | 70 + .../bpf/verifier/cgroup_inv_retcode.c | 72 + .../selftests/bpf/verifier/cgroup_skb.c | 197 + .../selftests/bpf/verifier/cgroup_storage.c | 220 + .../testing/selftests/bpf/verifier/const_or.c | 60 + tools/testing/selftests/bpf/verifier/ctx.c | 93 + .../selftests/bpf/verifier/ctx_sk_msg.c | 180 + .../testing/selftests/bpf/verifier/ctx_skb.c | 1033 + .../selftests/bpf/verifier/dead_code.c | 159 + .../bpf/verifier/direct_packet_access.c | 633 + .../verifier/direct_stack_access_wraparound.c | 40 + tools/testing/selftests/bpf/verifier/div0.c | 184 + .../selftests/bpf/verifier/div_overflow.c | 104 + .../bpf/verifier/helper_access_var_len.c | 614 + .../bpf/verifier/helper_packet_access.c | 460 + .../bpf/verifier/helper_value_access.c | 953 + tools/testing/selftests/bpf/verifier/jit.c | 88 + tools/testing/selftests/bpf/verifier/jmp32.c | 724 + tools/testing/selftests/bpf/verifier/jset.c | 165 + tools/testing/selftests/bpf/verifier/jump.c | 180 + .../selftests/bpf/verifier/junk_insn.c | 45 + tools/testing/selftests/bpf/verifier/ld_abs.c | 286 + tools/testing/selftests/bpf/verifier/ld_dw.c | 36 + .../testing/selftests/bpf/verifier/ld_imm64.c | 141 + tools/testing/selftests/bpf/verifier/ld_ind.c | 72 + .../testing/selftests/bpf/verifier/leak_ptr.c | 67 + tools/testing/selftests/bpf/verifier/lwt.c | 189 + .../selftests/bpf/verifier/map_in_map.c | 62 + .../selftests/bpf/verifier/map_ptr_mixing.c | 100 + .../selftests/bpf/verifier/map_ret_val.c | 65 + .../testing/selftests/bpf/verifier/masking.c | 322 + .../selftests/bpf/verifier/meta_access.c | 235 + .../bpf/verifier/perf_event_sample_period.c | 59 + .../bpf/verifier/prevent_map_lookup.c | 74 + .../selftests/bpf/verifier/raw_stack.c | 305 + .../selftests/bpf/verifier/ref_tracking.c | 607 + .../selftests/bpf/verifier/runtime_jit.c | 80 + .../selftests/bpf/verifier/search_pruning.c | 156 + .../selftests/bpf/verifier/spill_fill.c | 75 + .../selftests/bpf/verifier/stack_ptr.c | 317 + tools/testing/selftests/bpf/verifier/uninit.c | 39 + tools/testing/selftests/bpf/verifier/unpriv.c | 521 + tools/testing/selftests/bpf/verifier/value.c | 104 + .../selftests/bpf/verifier/value_adj_spill.c | 43 + .../bpf/verifier/value_illegal_alu.c | 94 + .../selftests/bpf/verifier/value_or_null.c | 152 + .../selftests/bpf/verifier/value_ptr_arith.c | 792 + .../testing/selftests/bpf/verifier/var_off.c | 66 + tools/testing/selftests/bpf/verifier/xadd.c | 97 + tools/testing/selftests/bpf/verifier/xdp.c | 14 + .../bpf/verifier/xdp_direct_packet_access.c | 900 + 66 files changed, 15970 insertions(+), 16285 deletions(-) create mode 100644 tools/testing/selftests/bpf/verifier/.gitignore create mode 100644 tools/testing/selftests/bpf/verifier/and.c create mode 100644 tools/testing/selftests/bpf/verifier/array_access.c create mode 100644 tools/testing/selftests/bpf/verifier/basic.c create mode 100644 tools/testing/selftests/bpf/verifier/basic_call.c create mode 100644 tools/testing/selftests/bpf/verifier/basic_instr.c create mode 100644 tools/testing/selftests/bpf/verifier/basic_stack.c create mode 100644 tools/testing/selftests/bpf/verifier/basic_stx_ldx.c create mode 100644 tools/testing/selftests/bpf/verifier/bounds.c create mode 100644 tools/testing/selftests/bpf/verifier/bounds_deduction.c create mode 100644 tools/testing/selftests/bpf/verifier/bounds_mix_sign_unsign.c create mode 100644 tools/testing/selftests/bpf/verifier/bpf_get_stack.c create mode 100644 tools/testing/selftests/bpf/verifier/calls.c create mode 100644 tools/testing/selftests/bpf/verifier/cfg.c create mode 100644 tools/testing/selftests/bpf/verifier/cgroup_inv_retcode.c create mode 100644 tools/testing/selftests/bpf/verifier/cgroup_skb.c create mode 100644 tools/testing/selftests/bpf/verifier/cgroup_storage.c create mode 100644 tools/testing/selftests/bpf/verifier/const_or.c create mode 100644 tools/testing/selftests/bpf/verifier/ctx.c create mode 100644 tools/testing/selftests/bpf/verifier/ctx_sk_msg.c create mode 100644 tools/testing/selftests/bpf/verifier/ctx_skb.c create mode 100644 tools/testing/selftests/bpf/verifier/dead_code.c create mode 100644 tools/testing/selftests/bpf/verifier/direct_packet_access.c create mode 100644 tools/testing/selftests/bpf/verifier/direct_stack_access_wraparound.c create mode 100644 tools/testing/selftests/bpf/verifier/div0.c create mode 100644 tools/testing/selftests/bpf/verifier/div_overflow.c create mode 100644 tools/testing/selftests/bpf/verifier/helper_access_var_len.c create mode 100644 tools/testing/selftests/bpf/verifier/helper_packet_access.c create mode 100644 tools/testing/selftests/bpf/verifier/helper_value_access.c create mode 100644 tools/testing/selftests/bpf/verifier/jit.c create mode 100644 tools/testing/selftests/bpf/verifier/jmp32.c create mode 100644 tools/testing/selftests/bpf/verifier/jset.c create mode 100644 tools/testing/selftests/bpf/verifier/jump.c create mode 100644 tools/testing/selftests/bpf/verifier/junk_insn.c create mode 100644 tools/testing/selftests/bpf/verifier/ld_abs.c create mode 100644 tools/testing/selftests/bpf/verifier/ld_dw.c create mode 100644 tools/testing/selftests/bpf/verifier/ld_imm64.c create mode 100644 tools/testing/selftests/bpf/verifier/ld_ind.c create mode 100644 tools/testing/selftests/bpf/verifier/leak_ptr.c create mode 100644 tools/testing/selftests/bpf/verifier/lwt.c create mode 100644 tools/testing/selftests/bpf/verifier/map_in_map.c create mode 100644 tools/testing/selftests/bpf/verifier/map_ptr_mixing.c create mode 100644 tools/testing/selftests/bpf/verifier/map_ret_val.c create mode 100644 tools/testing/selftests/bpf/verifier/masking.c create mode 100644 tools/testing/selftests/bpf/verifier/meta_access.c create mode 100644 tools/testing/selftests/bpf/verifier/perf_event_sample_period.c create mode 100644 tools/testing/selftests/bpf/verifier/prevent_map_lookup.c create mode 100644 tools/testing/selftests/bpf/verifier/raw_stack.c create mode 100644 tools/testing/selftests/bpf/verifier/ref_tracking.c create mode 100644 tools/testing/selftests/bpf/verifier/runtime_jit.c create mode 100644 tools/testing/selftests/bpf/verifier/search_pruning.c create mode 100644 tools/testing/selftests/bpf/verifier/spill_fill.c create mode 100644 tools/testing/selftests/bpf/verifier/stack_ptr.c create mode 100644 tools/testing/selftests/bpf/verifier/uninit.c create mode 100644 tools/testing/selftests/bpf/verifier/unpriv.c create mode 100644 tools/testing/selftests/bpf/verifier/value.c create mode 100644 tools/testing/selftests/bpf/verifier/value_adj_spill.c create mode 100644 tools/testing/selftests/bpf/verifier/value_illegal_alu.c create mode 100644 tools/testing/selftests/bpf/verifier/value_or_null.c create mode 100644 tools/testing/selftests/bpf/verifier/value_ptr_arith.c create mode 100644 tools/testing/selftests/bpf/verifier/var_off.c create mode 100644 tools/testing/selftests/bpf/verifier/xadd.c create mode 100644 tools/testing/selftests/bpf/verifier/xdp.c create mode 100644 tools/testing/selftests/bpf/verifier/xdp_direct_packet_access.c -- 2.19.2