From patchwork Thu Oct 5 15:55:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 14958 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2016:b0:403:3b70:6f57 with SMTP id fe22csp403203vqb; Thu, 5 Oct 2023 09:06:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNETNBQELWagGijyvUd4GN7wR0NZ7iYX/IsjhacgwSQlEC6fjXtWUR3c6gTXEXSIwooOzo X-Received: by 2002:a05:6e02:13eb:b0:351:50f1:1fc0 with SMTP id w11-20020a056e0213eb00b0035150f11fc0mr4467390ilj.32.1696521997052; Thu, 05 Oct 2023 09:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696521997; cv=none; d=google.com; s=arc-20160816; b=A94jiYoBo0upBVP2ndYlKm01LUpOYmaq7Kkhoxe+FAAKlojkCRg5GHSLGref7vMrYt jEPvWESpuDFSMHCJOudL8tUsKdFWLjr7fvmi0Ih02C8NcBXUzaIu++9gCrZV24RG9Yg+ l4pXrctGSssGnf5ok5qi9aM5jtzg+cJRuNeh/OeRAgWPblw6YrjOvZH2QHisRIikoB4w sI5BgEo8TtcGcgGkwdcIWGCG0mUO7eELbZQcqacPM2JIz0fy9bHQQsSBEF4Ckkc2xX9n Mhk+rJwf1pCJ8OplSfyJ3ocvQpmKbYHV6pZ/cGqqk8WaljsWY+8ecdDZqGP7csPX8Xni eRDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=So/LEDpBq4KqNyuoqkM9GXjHePKLHimP231oB4jyBU4=; fh=Z+uWtI/26wVdSrOjNf3A4Lyt6xrKVaeJDgBxVt/Utqg=; b=j8FJ2NJvmevjKFOl9Bqx2IHrN9dlw5OajFIYQ568Sry6H57Mv7QNuHHeTi1Hh5EYDT 2vLgGY3q+lezqMzSEbDW1LVQZKn2O2bDtiAfCThoJP2EPOjbKKTLRXGPV1Kr8UMOn/xp YLN/eN61o3c4EGdJkvS5gRFZmfc7LcXvHDprkbCdKyB2c7/JM0HsGvxTee4ZRalLSu0e ylCF49z9O+PlqdZW5HkrLqsEz409eRJsJHnTjR3xvKNbpMZi+DZDkAItgvDQtZDn9TiF JsJXUo1fAHgt63F7suXhgwk8Hq95CvaMvyIsvHpDw4rGbsU7MZ6a4ERwe915gjfsxV7m dAqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K2co4MVX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h15-20020a63574f000000b00573f94e8b83si1666862pgm.265.2023.10.05.09.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:06:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K2co4MVX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 058888068229; Thu, 5 Oct 2023 09:05:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237125AbjJEQDx (ORCPT + 19 others); Thu, 5 Oct 2023 12:03:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237411AbjJEQDQ (ORCPT ); Thu, 5 Oct 2023 12:03:16 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4D6C204E; Thu, 5 Oct 2023 08:55:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24067C433C7; Thu, 5 Oct 2023 15:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696521354; bh=SIPC1Mp73EwXkbAN9/gPbN2F1Z6TDFvdzsTQ4ZY03dQ=; h=From:Subject:Date:To:Cc:From; b=K2co4MVXsX0raEVNhAq0awY8LcG3w5yI3l/wZnyZGfRLAvT80ZDEBcvv6YITvjYcr 00kAgKOtuXE/ux1hJ1BBKx9eXlkkwRHxsVeCFhPSvjhincMHBw/95lUk+VJO3Wh1hm PFzrTDj4pxS6Dx1UyPC85fCLY3uuHXdhiu4/kUY8x2GhLResTjE59krrYYyzlJBCoN KNanDzJjsDlXScvlil9vp5+ItLR5weKcbmZb6xfRgaYgeREFfUHZQkg3LHNE4WWLe1 sBEdBd1IhduYAJKbkhu6lInk437bomEoTvufvi1DArLKLwMoYFT3a9DlUfQgLC5EfS WyHUqIYNgh6+A== From: Benjamin Tissoires Subject: [PATCH v3 0/3] selftests/hid: assorted fixes Date: Thu, 05 Oct 2023 17:55:31 +0200 Message-Id: <20230825-wip-selftests-v3-0-639963c54109@kernel.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAHPcHmUC/3WNyw6CMBBFf4V07ZgyWF4r/8OwKDhAY1PIDKKG8 O9W9i7PSe49mxJiR6LqZFNMqxM3hQjZKVHdaMNA4O6RFWrMdIkGXm4GId8vJItAZQujsTW5uaC Km9YKQcs2dGNchaf3Uc5MvXsfkVsTeXSyTPw5mmv6s//u1xQ0dGWORV5p1La8PogD+fPEg2r2f f8CxcY7E8AAAAA= To: Jiri Kosina , Benjamin Tissoires , Shuah Khan , Justin Stitt , Nick Desaulniers , Eduard Zingerman Cc: linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Benjamin Tissoires , Shuah Khan X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1696521351; l=2800; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=SIPC1Mp73EwXkbAN9/gPbN2F1Z6TDFvdzsTQ4ZY03dQ=; b=zaZ5m2UhLY7gtQNNTXMahtti4JXH9dKv4AZSJBR7TtloTNTI+kYJC5Wfua8smGDoNT4eHkXk0 y/Wwat3hT3lD9/tB8vwSij82GRiVd266JJsMbZ0kNt6qUmmNC8U4Ijx X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 05 Oct 2023 09:05:52 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778932249369597132 X-GMAIL-MSGID: 1778932249369597132 And this is the last(?) revision of this series which should now compile with or without CONFIG_HID_BPF set. I had to do changes because [1] was failing Nick, I kept your Tested-by, even if I made small changes in 1/3. Feel free to shout if you don't want me to keep it. Eduard, You helped us a lot in the review of v1 but never sent your Reviewed-by or Acked-by. Do you want me to add one? Cheers, Benjamin [1] https://gitlab.freedesktop.org/bentiss/hid/-/jobs/49754306 For reference, the v2 cover letter: | Hi, I am sending this series on behalf of myself and Benjamin Tissoires. There | existed an initial n=3 patch series which was later expanded to n=4 and | is now back to n=3 with some fixes added in and rebased against | mainline. | | This patch series aims to ensure that the hid/bpf selftests can be built | without errors. | | Here's Benjamin's initial cover letter for context: | | These fixes have been triggered by [0]: | | basically, if you do not recompile the kernel first, and are | | running on an old kernel, vmlinux.h doesn't have the required | | symbols and the compilation fails. | | | | The tests will fail if you run them on that very same machine, | | of course, but the binary should compile. | | | | And while I was sorting out why it was failing, I realized I | | could do a couple of improvements on the Makefile. | | | | [0] https://lore.kernel.org/linux-input/56ba8125-2c6f-a9c9-d498-0ca1c153dcb2@redhat.com/T/#t Signed-off-by: Benjamin Tissoires Tested-by: Justin Stitt --- Changes in v3: - Also overwrite all of the enum symbols in patch 1/3 - Link to v2: https://lore.kernel.org/r/20230908-kselftest-09-08-v2-0-0def978a4c1b@google.com Changes in v2: - roll Justin's fix into patch 1/3 - add __attribute__((preserve_access_index)) (thanks Eduard) - rebased onto mainline (2dde18cd1d8fac735875f2e4987f11817cc0bc2c) - Link to v1: https://lore.kernel.org/r/20230825-wip-selftests-v1-0-c862769020a8@kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/1698 Link: https://github.com/ClangBuiltLinux/continuous-integration2/issues/61 --- Benjamin Tissoires (3): selftests/hid: ensure we can compile the tests on kernels pre-6.3 selftests/hid: do not manually call headers_install selftests/hid: force using our compiled libbpf headers tools/testing/selftests/hid/Makefile | 10 ++- tools/testing/selftests/hid/progs/hid.c | 3 - .../testing/selftests/hid/progs/hid_bpf_helpers.h | 77 ++++++++++++++++++++++ 3 files changed, 81 insertions(+), 9 deletions(-) --- base-commit: 29aa98d0fe013e2ab62aae4266231b7fb05d47a2 change-id: 20230825-wip-selftests-9a7502b56542 Best regards,