From patchwork Fri Jul 10 15:04:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 235244 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp538430ilg; Fri, 10 Jul 2020 08:08:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4kLVgkNwsg+3HROeJHwo0NBC5CF9D90WrTbuIxPq7KKz68WZ2kDWxkYZZK4ytZJM73Hts X-Received: by 2002:a17:906:fa9a:: with SMTP id lt26mr51726776ejb.502.1594393689195; Fri, 10 Jul 2020 08:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594393689; cv=none; d=google.com; s=arc-20160816; b=AWXns7EJ31jL5pDg8oFXtm0MvYpZNoemzFA+8DZF5h8n116R4QBlgkqelgLYBmUNSc lNeLaEWRuYMVKIh6BeC98jO/78I1meJdrDPSHGCt2O+nmGFS0/8FDsIwPiTbYsrv8tfx AFZLhsT2DmapR5S2JJwOi1Y0WA6GqTlVcxeiG3n+xaZfjk1x72UXosmEja15ygIk4Rb2 naPGmSzBsEmaaV19LFvOlbI8R6Pan+ZxyP3w5SU+4Bm6ix/knv+RebVBxslyiadTO+Vs QjuJr4gQa68wxlQf12c0KxIvXiE94eJtiEKD3RfqLrNyYd5fomYt+iw8S/+680IIRCdm QDRQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=eSUBIu0ybhU8+dsOX2xJvZoNOHyRpVa4hcaol+Gn28E=; b=u+bpMLMUaxOWFdivxGhg10SwJFzwmnviF6Wmkceuqh+1+uVsHcGYsCbVeklJbCN5Iu hBoUmqD4Sh44PJ4v5Dnc3jIHzlb1qQ0/DfUNBYSPWgpa1nHTAiVkpa0wj0ExiCUhnrqt Sybc0KixfvkMrWXBIoqmc1IJiffMW6hS42jLfI1YIOSzGToGSaRkxlA6Oz6118d6SX4a ZzaO787cSLkuti0WL7UOZfdcH96oqqXSnBM2W03nfCPlnYEJSblL1oB/6abI3SixHw87 yV5ITG4F53sZ/ZnGUd/kuCdHYt+Hl8U6lT/rLDgKu6DU1bvweivn2S/p9ZzkSL/D9C2h LIwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tLoTOaK1; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-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. [23.128.96.18]) by mx.google.com with ESMTP id o11si3930398ejx.693.2020.07.10.08.08.08; Fri, 10 Jul 2020 08:08:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tLoTOaK1; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-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 S1726950AbgGJPII (ORCPT + 6 others); Fri, 10 Jul 2020 11:08:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbgGJPIH (ORCPT ); Fri, 10 Jul 2020 11:08:07 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87EBDC08C5DC for ; Fri, 10 Jul 2020 08:08:07 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id f139so6252939wmf.5 for ; Fri, 10 Jul 2020 08:08:07 -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:mime-version :content-transfer-encoding; bh=eSUBIu0ybhU8+dsOX2xJvZoNOHyRpVa4hcaol+Gn28E=; b=tLoTOaK1tP0nzNL4sEJ3OaYuBTW4ISdwxPITjr0VwZRTKMXjZ/8OV2Jvb1HdL57/NR sQ3fX1ImjvmbDF22H8mcGDoHvqYyzRUXSIiajGlyB02L55CUMdazbymN0l20OC4ITlKj aKrSz0vR1q+TJtfKPYt8PoVhRSgy5DwEPUZtqLD2ESuaTyK0RLloMeyO0s93FdOj/kEO R5Blj/lkIvMUY+5fGM+F/sgx1UaTSZaq+oixjDn87aV5EzoHjMKyQU43zKEODz6cJnte FqEbh9MdaP1ydNNtonZzkkr90aZBDPUlVQff5C1YBLcUEYDad29b7vfcVnan5q3Y8k14 LFzQ== 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=eSUBIu0ybhU8+dsOX2xJvZoNOHyRpVa4hcaol+Gn28E=; b=VESRrhnyx9qhCFz4Rp8JwlvsmhNbtA73OJkvQ2E6iYTVt4hdyWRigLWcBEeD7I6pP3 J5PiGgZpqx1BH3HgVx+cpiin7s57Unj38b+Kf3v+qnIyjMQmpzXt2D2IVYydn/9JWV4q xgT9AUhJiZTfjKmYcHI0v+YAv8NbO+cideErvPcrDzLDoa04xbBxQ5PI5OJVf0Q6nn73 G2uoUDyifaF8pLhZ6gb1YlW7yNgya39Z/Uw2Dx9TZ8JafflKOhg/f0Vyb7pQtZjkmUhM Bck+gwLtbYjDBoWWce6xz5H1wUIUmePlryCNcBRnFZx/w8Ik4vkieLxuDMqZsk0QHFv5 1MWA== X-Gm-Message-State: AOAM533gXr2qYupzRQr7fkg3I8BxtntYhvDfdJkxhUKDM7rRgVu3XpdJ cOes3QQ1uVoCP0r/+wIS1DR6DA== X-Received: by 2002:a7b:c313:: with SMTP id k19mr5658340wmj.67.1594393686171; Fri, 10 Jul 2020 08:08:06 -0700 (PDT) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id u65sm10215648wmg.5.2020.07.10.08.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 08:08:05 -0700 (PDT) From: Jean-Philippe Brucker To: bpf@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, sdf@google.com, Jean-Philippe Brucker Subject: [PATCH bpf] selftests/bpf: Fix cgroup sockopt verifier test Date: Fri, 10 Jul 2020 17:04:40 +0200 Message-Id: <20200710150439.126627-1-jean-philippe@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Since the BPF_PROG_TYPE_CGROUP_SOCKOPT verifier test does not set an attach type, bpf_prog_load_check_attach() disallows loading the program and the test is always skipped: #434/p perfevent for cgroup sockopt SKIP (unsupported program type 25) Fix the issue by setting a valid attach type. Fixes: 0456ea170cd6 ("bpf: Enable more helpers for BPF_PROG_TYPE_CGROUP_{DEVICE,SYSCTL,SOCKOPT}") Signed-off-by: Jean-Philippe Brucker --- tools/testing/selftests/bpf/verifier/event_output.c | 1 + 1 file changed, 1 insertion(+) -- 2.27.0 diff --git a/tools/testing/selftests/bpf/verifier/event_output.c b/tools/testing/selftests/bpf/verifier/event_output.c index 99f8f582c02b..c5e805980409 100644 --- a/tools/testing/selftests/bpf/verifier/event_output.c +++ b/tools/testing/selftests/bpf/verifier/event_output.c @@ -112,6 +112,7 @@ "perfevent for cgroup sockopt", .insns = { __PERF_EVENT_INSNS__ }, .prog_type = BPF_PROG_TYPE_CGROUP_SOCKOPT, + .expected_attach_type = BPF_CGROUP_SETSOCKOPT, .fixup_map_event_output = { 4 }, .result = ACCEPT, .retval = 1,