Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4104684pxf; Tue, 23 Mar 2021 02:49:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv5YquCyb71z88lcBXL95sc1BWQDGRmDZaFC8imFpvRK1Jp+Kt9kn8gLY7+gfY+J2cduqY X-Received: by 2002:a05:6402:3486:: with SMTP id v6mr3712665edc.109.1616492996004; Tue, 23 Mar 2021 02:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616492995; cv=none; d=google.com; s=arc-20160816; b=Nnix/u/I13oeleTpncBUfkflcYbmxs4fadihvGDhMYIURC5X/W3Nj/5NBmlvDJ5Mcy azLyaFDh3i7BtM+xZ9n8Rjsi98cW3n0llOrbC2ZTtzJ6cizMAzIR2vmpLvCike+BeYTU Bk7xcfesAkHzAVk3BnidQfuUWEqDszxTM5gt6M6yK66A2sQVLgJpE2edMPmYAjLYcmFo RK66U+KeaMr698MqpUqS9eneZNXW5lhtvCVsml1LplWuwwC72BuN81iRGr8GKF6jU1lu 7wOJ+e22oVLmvUVQ8Y/t3Swn1AoHuUYXx1fT3GNX/x760iNC9FV0B296LUWKhhK5ahBw mAAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hgweAXsQTwePYGvzySvRrmFVPab8jCtXeq0art5Xlzk=; b=F6lBfzJM6vTe6uNrzgP5OymVN1Y9GBGpLUzytCA39UqdtTwTB1CMTdjrPbqVqulwqL N1NYZ1A0xHrTDM8RARADzXFULCiBUfUQ7hzGKT4oG3BxXBFOi9SGMDXJAkpgg8xvSY4x LPvTA+U0CD/DjUwaBKk+lzmUn5XkP1kzAMaTCaWU4DemOidPqeocar/FpVPmbwV/T6uP WjkdOhm8n/HLBdtJVWjDX+fLwXjHKXLhWnaXSyw3V+5+7oQrWboo7eVEEVtpnM6XZym8 84IPZKPTTcJPWIJJHVSBD3TU2wJawi9rX3+qw0rMPxvLLp3YM8uT1SiD/3hQ5Yw3brZW jBjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=c83oOIai; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si13826740edv.29.2021.03.23.02.49.33; Tue, 23 Mar 2021 02:49:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@google.com header.s=20161025 header.b=c83oOIai; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbhCWJrz (ORCPT + 99 others); Tue, 23 Mar 2021 05:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230261AbhCWJr1 (ORCPT ); Tue, 23 Mar 2021 05:47:27 -0400 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DAD2C061574 for ; Tue, 23 Mar 2021 02:47:27 -0700 (PDT) Received: by mail-ot1-x329.google.com with SMTP id l23-20020a05683004b7b02901b529d1a2fdso18855119otd.8 for ; Tue, 23 Mar 2021 02:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hgweAXsQTwePYGvzySvRrmFVPab8jCtXeq0art5Xlzk=; b=c83oOIai0vT/1Ehf7TwcWcfH05xGv8gE6Hg9fLoNtkbRowQEpsxj0F9qOqpyseVzcK Q2rN4vwz/CFe7+PkWFTwCUeAyxAT31qQdtAeXfXs01n2UBp+LZwJq3hVB4sDOKwEeXyR RY+Hh9E6NspuxTBUJKfL2OA81sVHSqqt5Ih+LGq0V/NDMZOHpPIdEUkuL1e0trb8yM8c 7MXr4IjK5B1jHwhY2nXdhfqGP8wCPR558Pk6EKwP+ETOoUDB9HndX6hp3wvxdcp6S2U6 vmFQM21beG3mVjRFHTyq/nWVtwXAuSm3IyGLEtPu8jHKd067xDHfseWi99DCjr/vRArs 5Mtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hgweAXsQTwePYGvzySvRrmFVPab8jCtXeq0art5Xlzk=; b=ZD2lRVm6nIxouhUjl4AkE/65GpYTOf0X14ZX1j/siq72htdm88IVtuIgY2zyBuzJBB Odut7HZzgJ2EKn/rike6T1r8Apd5rzDn8J6lD0swJ17Wmlbkxj9X3S05f/iJ2KwBMhBi RngFGiAicmiTZzhzGre2RHbTmxOh2MFHfaIksI93X/eA/qwtX7qc1c3efqnTqz/poLoY FF++HGNcTWl/o8Yl+TgKdjALC2fvkT9Rv9qrkAre+qcR7okTk3lReAHf5LPpkmvJEKtc Pd7nFiQA/1KmZ8HlPIJRvdiAJLqcEjv5AVIp0VwtPkZnsLgnq7e0+V30W9M82TtYqjHV jmyw== X-Gm-Message-State: AOAM530KoCX/BNiGIUMb/KVLjCb+mHjdd4Y7nzJiWZNmSp+T1fHFt158 rpdInFirLcd9Q+ZuacrdLmTPhNkFoS0q/5bvCK3kwQ== X-Received: by 2002:a05:6830:148c:: with SMTP id s12mr3724534otq.251.1616492846280; Tue, 23 Mar 2021 02:47:26 -0700 (PDT) MIME-Version: 1.0 References: <20210310104139.679618-1-elver@google.com> <20210310104139.679618-9-elver@google.com> In-Reply-To: From: Marco Elver Date: Tue, 23 Mar 2021 10:47:13 +0100 Message-ID: Subject: Re: [PATCH RFC v2 8/8] selftests/perf: Add kselftest for remove_on_exec To: Ian Rogers Cc: Peter Zijlstra , Alexander Shishkin , Arnaldo Carvalho de Melo , Ingo Molnar , Jiri Olsa , Mark Rutland , Namhyung Kim , Thomas Gleixner , Alexander Potapenko , Al Viro , Arnd Bergmann , Christian Brauner , Dmitry Vyukov , Jann Horn , Jens Axboe , Matt Morehouse , Peter Collingbourne , kasan-dev , linux-arch , linux-fsdevel , LKML , x86 , "open list:KERNEL SELFTEST FRAMEWORK" , Vince Weaver Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 Mar 2021 at 04:10, Ian Rogers wrote: > On Mon, Mar 22, 2021 at 6:24 AM Marco Elver wrote: > > On Wed, Mar 10, 2021 at 11:41AM +0100, Marco Elver wrote: > > > Add kselftest to test that remove_on_exec removes inherited events from > > > child tasks. > > > > > > Signed-off-by: Marco Elver > > > > To make compatible with more recent libc, we'll need to fixup the tests > > with the below. > > > > Also, I've seen that tools/perf/tests exists, however it seems to be > > primarily about perf-tool related tests. Is this correct? > > > > I'd propose to keep these purely kernel ABI related tests separate, and > > that way we can also make use of the kselftests framework which will > > also integrate into various CI systems such as kernelci.org. > > Perhaps there is a way to have both? Having the perf tool spot an > errant kernel feels like a feature. There are also > tools/lib/perf/tests and Vince Weaver's tests [1]. It is possible to > run standalone tests from within perf test by having them be executed > by a shell test. Thanks for the pointers. Sure, I'd support more additional tests. But I had another look and it seems the tests in tools/{perf,lib/perf}/tests do focus on perf-tool or the library respectively, so adding kernel ABI tests there feels wrong. (If perf-tool somehow finds use for sigtrap, or remove_on_exec, then having a perf-tool specific test for those would make sense again.) The tests at [1] do seem relevant, and its test strategy seems more extensive, including testing older kernels. Unfortunately it is out-of-tree, but that's probably because it was started before kselftest came into existence. But there are probably things that [1] contains that are not appropriate in-tree. It's all a bit confusing. Going forward, if you insist on tests being also added to [1], we can perhaps mirror some of the kselftest tests there. There's also a logistical problem with the tests added here, because the tests require an up-to-date siginfo_t, and they use the kernel's with some trickery. Until libc's siginfo_t is updated, it probably doesn't make sense to add these tests to [1]. The other question is, would it be possible to also copy some of the tests in [1] and convert to kselftest, so that they live in-tree and are tested regularly (CI, ...)? Because I'd much prefer in-tree tests with little boilerplate, that are structured with parsable output; in the kernel we have the kselftest framework for tests with a user space component, and KUnit for pure in-kernel tests. Thanks, -- Marco > Thanks, > Ian > > [1] https://github.com/deater/perf_event_tests [...]