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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CAC9C0218F for ; Thu, 30 Jan 2025 14:38:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0361628007B; Thu, 30 Jan 2025 09:38:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F27B828007A; Thu, 30 Jan 2025 09:38:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DEF5D28007B; Thu, 30 Jan 2025 09:38:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C14C328007A for ; Thu, 30 Jan 2025 09:38:57 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 3F6DAACEF6 for ; Thu, 30 Jan 2025 14:38:57 +0000 (UTC) X-FDA: 83064375114.26.1314B3C Received: from mail-vk1-f180.google.com (mail-vk1-f180.google.com [209.85.221.180]) by imf17.hostedemail.com (Postfix) with ESMTP id 1CF5D4000C for ; Thu, 30 Jan 2025 14:38:54 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of geert.uytterhoeven@gmail.com designates 209.85.221.180 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738247935; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3koQwFtsYEj+sBiSRxwOt8Kdl4P9BIA497a/eImNeSg=; b=xPgmKSXvIGPiUBs2SEgJ7xs4IfSmqxPI9kzM69fXqWZ/1QPcMTHNMMhlzDancXWCmSt5tR IyiPoyozaNA7rHw/LvXm2hFxsVsuJxojShwxIz2r4EoXjKWgWtd6o6czdy2pRnyLj0Lkga 0OXGOF1d/nuJVHq0zGh9AIlASw56y8E= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of geert.uytterhoeven@gmail.com designates 209.85.221.180 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738247935; a=rsa-sha256; cv=none; b=vwrgB84eT5EHG9MN1gNQgemyJNvpJuTiVETkk8a90LDC1yxN6SmB8+W9B71QKHF4VB5tW8 /7JY/Uwbc/AH0QxsNEoDzwVYRXRV4zbskbGcCTLaPaJ9gLqDdDJr3YV1xree0LN2IHMJUG RVyUB7t9mdEB3uHXy7C+BTOP1IuwtwE= Received: by mail-vk1-f180.google.com with SMTP id 71dfb90a1353d-518a861612eso953436e0c.1 for ; Thu, 30 Jan 2025 06:38:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738247932; x=1738852732; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3koQwFtsYEj+sBiSRxwOt8Kdl4P9BIA497a/eImNeSg=; b=eGjLFA5UMSIjJeiWXOQEpJMaW6CBa1MbfJqIzWzn56q0rjo0QEsPXRnn6A7CP5ey+r zhMWyQ5G2DHmZ+qUfGMDKIcJ2CMGPlMYw8pVNjBO9yUBlXKFpFGhyJWmYoSkzfye8L6B E4HgGzTjyMVIovsXgrMJnyR/C/IgfTNnD/wBRYsUoKcAfQDr/6LQG6EoORwA/j2qg3fO 1MHCSJp6RMaBo4pMVTmIHiUcQVPHoYs6Y9qlvvQ4udP62Ev3aPnELavasji2bc0dy1Tv Ov1FWtqp2L/mg3lDOW1MlTfrv61q0BfGOzoreqTVjv+uOsaTm6Dc4SOVNkFRsOMgdaKN ecKg== X-Forwarded-Encrypted: i=1; AJvYcCX5d0zAdGyv19Ituu21B71++eAUEnw6e2MVEoynxJJ5OF1Whk7qq8n3325qTeA0Ro1HcBI9L9H9Mg==@kvack.org X-Gm-Message-State: AOJu0YzXvSRQmlckJb4NUv6tZ2wjm0rJAYyvmZ0IKzCcncoQtg+ZrKnI 2vdeAxII5tqYzuNpjR+RaMW9aOxaQg0V19iV85LLS8lVFJwba0C7XDux9xrOmnk= X-Gm-Gg: ASbGncuOudy4mO020epAAIzrEsQcNtlzXO4d73obFO36BeFWMuRKQju/ZAP6Kl2r2dB GmkqD4WnW/9wkppKYwcvEcNaOGy3jOVBLp+zdFiMQ5n3aUoRJIiXE32dRUmxjtzS3kZfuXpk8A8 vBPSdt631w6VHCSm4zjPrGqRnamcy1FwdgBi3oNhZtCpvtFRhLx3/h75Gb2LKcfhYl/7S537MIy GHx23FWd9izITzXVvDl1C6X1Gut/acEsgUlV3E18mb8DhGIy3yaQY2PDFmE18grM3aDgJtqYhpb yLMR1xt6U4tSIQDyBYPHhoHWdxhjBu/RIc7f7MGMqABpkXIDGTtKnw== X-Google-Smtp-Source: AGHT+IHNVe+s1UPsmzvqdG7mCkGyvfXzJzncO1UwqeiAXoL7kOaI/ur1FsNZFfaEAWo/fgzJG6P/bQ== X-Received: by 2002:a05:6122:2104:b0:50d:39aa:7881 with SMTP id 71dfb90a1353d-51eaedbaf26mr3491045e0c.0.1738247932432; Thu, 30 Jan 2025 06:38:52 -0800 (PST) Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com. [209.85.217.48]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-51eb1be18bcsm212999e0c.2.2025.01.30.06.38.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jan 2025 06:38:49 -0800 (PST) Received: by mail-vs1-f48.google.com with SMTP id ada2fe7eead31-4b9486a15a0so974669137.0 for ; Thu, 30 Jan 2025 06:38:49 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUx8eFWYVBb1UDdOiI9rVhe9dYSOcvRhOYtD5fqYqQdN9iK+BY8/cGujn8vBhlWdZ8xeNDcwHKYJQ==@kvack.org X-Received: by 2002:a67:f318:0:b0:4af:d48d:5142 with SMTP id ada2fe7eead31-4b9b70f3a0bmr2755704137.3.1738247929070; Thu, 30 Jan 2025 06:38:49 -0800 (PST) MIME-Version: 1.0 References: <20241205-xarray-kunit-port-v1-1-ee44bc7aa201@gmail.com> <07cf896e-adf8-414f-a629-a808fc26014a@oracle.com> <9636ed9d-3bfb-4dda-98dc-f945c9d53698@lucifer.local> In-Reply-To: <9636ed9d-3bfb-4dda-98dc-f945c9d53698@lucifer.local> From: Geert Uytterhoeven Date: Thu, 30 Jan 2025 15:38:36 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AWEUYZmOwEzWB0gEceqhOwmudbYpt2s9uwC-1Re-pPG58BUZxS-FmbWZ_JWw55Q Message-ID: Subject: Re: [PATCH] xarray: port tests to kunit To: Lorenzo Stoakes Cc: "Liam R. Howlett" , Sidhartha Kumar , akpm@linux-foundation.org, christophe.leroy@csgroup.eu, justinstitt@google.com, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, llvm@lists.linux.dev, maddy@linux.ibm.com, morbo@google.com, mpe@ellerman.id.au, nathan@kernel.org, naveen@kernel.org, ndesaulniers@google.com, npiggin@gmail.com, Matthew Wilcox , linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 1CF5D4000C X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: x38hexhon9yobmsu161diw7zgpabf5a4 X-HE-Tag: 1738247934-807857 X-HE-Meta: U2FsdGVkX1/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EVrCNGfCLdEP2iY+SOKSqTE3YwVF2hQpPTJW4W5MQ3N7oTy4iVdMtoIZksCxRaetsooRzuPUxvTIeDDMrtLYrlhuLF7jWtkthJrWuKqSMALFJuRJ3gbL0SswK3FfHGRIDHeT+UeGVh02eVZjzTXKdbfktj5UkMZK7yFEWJjnDu470rl8hOWazBYwMtT4edBBCum4CZeokr5+uRU7Gul8OHS7NkHP9zGmbpt2F08PizOjltZ6V9QT/TLTGbZK+EhG+n288OVTnRkaDzOhtuCcfBnqAagsTezUSOXFIMABkzfrN8ZLcYLRY/NpYnfU1dzs0tkyg1wc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi Lorenzo, On Thu, 30 Jan 2025 at 15:09, Lorenzo Stoakes wrote: > Having written a ton of test code, I've unfortunately encountered a lot of > this sort of push-back and it's HUGELY off-putting. Writing test code > should be ENCOURAGED not litigated against. I am not discouraging nor pushing back on any testing code (on the contrary, I test every single new kunit test that appears upstream). My apologies if I gave the impression. > The truth is far too little kernel code is tested to any degree, and this > is part of why. > > On kunit collaboration, I attended an in-person talk at LPC on kunit > userland testing where it was broadly agreed that at this point in time, > the xarray/radix tree tests weren't really suited to the framework. > > Therefore I think the healthy means of pushing forward with integration is > in sensible discussion and if patches, RFC patches in collaboration with > authors. Good. > The unhealthy approach is to needle one of the biggest contributors to core > test code in the kernel on a thread because you don't seem to want to cd to > a directory and run make. My initial issue was that I could not find out where that is documented. $ make help ... Userspace tools targets: use "make tools/help" or "cd tools; make help" $ make tools/help Possible targets: ... You can do: ... $ make tools/all builds all tools. But that command does not build tools/testing/radix-tree, so I was completely lost. > Why is this relevant to me? I am the author of the VMA test suite, on which > I spent countless hours + relied heavily on Liam's work to do so, and > equally there you have to cd to a directory and run make. Thanks for your work! One suggestion for improvement: tools/testing/vma does not seem to be built by "make tools/all" either. > But at the same time in both cases, testability of key internal components > is ENORMOUSLY improved and allows for REALLY exciting possibilities in test > coverage, really isolating functions for unit testing, enormously fast > iteration speed, etc. etc. > > I ask you to weigh up the desire to enumerate your misgivings about the > testing approach used here vs. all of the above. I repeat: I am not against these tests. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds