Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6572270rdb; Tue, 2 Jan 2024 06:25:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOUOUpubP8RcJclPJT6NR+QszOU3MG7FX5Uj0GnwOAQy0tRTV494GfsSZ0i6C6IZf+N4f4 X-Received: by 2002:a05:600c:16c9:b0:40d:3076:1f25 with SMTP id l9-20020a05600c16c900b0040d30761f25mr8726538wmn.151.1704205520199; Tue, 02 Jan 2024 06:25:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704205520; cv=none; d=google.com; s=arc-20160816; b=Z7Gj6HUzPCRapbOoWr0j2ZaHTcanQoRFYeBaEVtZMnSYYvAZimsuGeDQ/5oMQcMjT2 TV4w+hGig/kA2QclElKZZEO6w3ufSpLx0GJAmjMOTqkGrsX9YDVQorHzq2zut8f4TV7N A6Tita/W1QY+eM58H+x0poB+Bot5QXvM7FsuAZQWQyhpu8Ern57i/L2PNjrodZM+2Qcv ljPE5I3cThQK/NaSHh3aHIw40CnT6SFmHGHrlbpuW/45+jTzZNYwUxHt9Yn/wc9cIow4 JYICWnFxx1TSa11t7FoQ3+rG87Hl5kgxxTDwmgcmjMQGdasqMC8bdHbLVCLOMtScH88r BROw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=91zQ6zsKNARaRYK5Dezc/s0KliBHLXXE9pQQHgZeXD0=; fh=gMK4NMURZ/N93VR7GygNHAZsSoIOJv3gaPs1HbK7nTk=; b=cU1ApzjhzHjgENVnCDCy3VpXZOzdKUP/M1VsWu5/OcYbyx76H9F1cOvdOkSflFBNdj 8Yjy1RlOlR97zUHPWKspx149PQVEwt49r5l2rbvCpbZEiOtU6F7gV8UZtwAOiGMd0ogy mBXQe5PmJoU8qwm87lxhPQRqcs6t4E8pQBVVjomWDdB+gZX2WlvOyPbt+MPTb5ZUYzit 9foCAcK0Iig5eo8XqPQgaUctTTgBcaWMAmUXS52z9TBwgXc52RLJRdjIAVvlcCYg9/oK qVlMoXx8kpWgXns7Clz8Ju8lapznORpdyyZliuAroNvuDj5dz/j8Wiz1lZuT3YrIe9TZ 4vRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=weIcn7xk; spf=pass (google.com: domain of linux-kernel+bounces-14479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14479-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m23-20020a1709062b9700b00a2816454c9bsi1253383ejg.469.2024.01.02.06.25.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 06:25:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=weIcn7xk; spf=pass (google.com: domain of linux-kernel+bounces-14479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14479-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E0D151F21B56 for ; Tue, 2 Jan 2024 14:25:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8983E11719; Tue, 2 Jan 2024 14:25:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="weIcn7xk" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50C3610A38; Tue, 2 Jan 2024 14:25:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1704205506; bh=Q5TdwinC73cuLXTCvLj5CDlQo+9OecSMtSDZry2sjzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=weIcn7xkvss+5cT8YbmlvI9kaLv3IXYiZqPrcT7fbBhWCWRfH9G+MEbyaveoQ6VjD ONQDn/J9BCwAS+0yRCSDrrCRxx0F7FJF7+tc3SP0RKtGfo8INbtSfo/ir4TgkU2pvL 2W+Uo4bdDYCvDzC+dpYVma9TZqCI6nDXbqKbzUL14AgCmq6soS/I9WupsLcaYeSbUl LaPZsudHfExfuC1ConJgK42s4fvl513IQ0BB6MV94AR4vV3L6nQnX/a0kayqmxHEpK yds5JOomKx0hLDdI/LtWwIw6OjVaAR55dBIowPiS08S2kBwwtZWJJDLZka8LBk4MqP 7VNCJCKtubqtA== Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: laura.nao) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 5F52437802F2; Tue, 2 Jan 2024 14:25:05 +0000 (UTC) From: Laura Nao To: miguel.ojeda.sandonis@gmail.com Cc: a.hindborg@samsung.com, alex.gaynor@gmail.com, aliceryhl@google.com, benno.lossin@proton.me, bjorn3_gh@protonmail.com, boqun.feng@gmail.com, davidgow@google.com, gary@garyguo.net, kernel@collabora.com, laura.nao@collabora.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, ojeda@kernel.org, rust-for-linux@vger.kernel.org, shuah@kernel.org, wedsonaf@gmail.com Subject: Re: [PATCH] kselftest: Add basic test for probing the rust sample modules Date: Tue, 2 Jan 2024 15:25:14 +0100 Message-Id: <20240102142514.174562-1-laura.nao@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 12/21/23 20:46, Miguel Ojeda wrote: > On Fri, Dec 15, 2023 at 2:21 PM Laura Nao > wrote: >> >> Add new basic kselftest that checks if the available rust sample >> modules >> can be added and removed correctly. >> >> Signed-off-by: Laura Nao > > Thanks Laura! > > Shuah: do you want that we pick this one? If so, your `Acked-by` would > be nice -- thanks! Otherwise, please feel free to pick it up. > > Cc'ing David too since it involves KTAP in case he has comments. > >> diff --git a/tools/testing/selftests/rust/Makefile >> b/tools/testing/selftests/rust/Makefile > > Missing SPDX line? (it can be added when picking it up, though). > Thanks for the feedback Miguel! >> +$(OUTPUT)/ktap_helpers.sh: >> + cp $(top_srcdir)/tools/testing/selftests/dt/ktap_helpers.sh >> $@ > > This may be something for another series, but should these helpers be > factored out perhaps / provided by the framework? Does it work > sourcing them from `dt` directly instead of copying meanwhile (to > simplify)? > >> +KSFT_PASS=0 >> +KSFT_FAIL=1 >> +KSFT_SKIP=4 > > Similarly, would it make sense for this kind of "common constants" be > factored somehow? Or does that not make sense (I see other tests also > define them "manually")? > Sourcing the file from the `dt` folder does work when running the test with `make -C tools/testing/selftests TARGETS=rust run_tests`, but fails when the test is installed with `make -C tools/testing/selftests TARGETS=rust install` and run with `./tools/testing/selftests/kselftest_install/run_kselftest.sh` (unless the dt kselftest is installed too). I agree factoring out the helpers might be a better solution. I sent a patch to move the ktap_helpers.sh file to the kselftest common directory, so that kselftests written in bash can make use of the helper functions more easily: https://lore.kernel.org/linux-kselftest/20240102141528.169947-1-laura.nao@collabora.com/T/#u If that patch is merged first, I'll rework this one and send a v2 with the proper adjustments. Best, Laura