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 3EC8EC0218A for ; Thu, 30 Jan 2025 14:25:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CFF1E440150; Thu, 30 Jan 2025 09:25:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CAFC8280074; Thu, 30 Jan 2025 09:25:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B770E440150; Thu, 30 Jan 2025 09:25:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9ADB5280074 for ; Thu, 30 Jan 2025 09:25:06 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 400FB80EE3 for ; Thu, 30 Jan 2025 14:25:06 +0000 (UTC) X-FDA: 83064340212.29.871DA4F Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by imf30.hostedemail.com (Postfix) with ESMTP id 1241980013 for ; Thu, 30 Jan 2025 14:25:03 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf30.hostedemail.com: domain of geert.uytterhoeven@gmail.com designates 209.85.208.50 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738247104; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3OqrPZhmeATdEa/SarwcrPzfDvhKK4nRH2GJQ3Y2/Ao=; b=Hp+A1pP1K8Ix/ySVr5gXZs59S4P4YYMMsKUUqalnw8rvYPA5vX16Ooy1GLQcA46e0f6Nf9 T/MTkjTX6pj40GMKgr+EWb7Fv0Ajh2k4fI10XLjyH5wMitn52PqsRvRR6MRCTFZo/nS0/f humh5zHyQh71pBT8Zvf7SJ4sbfh8UAY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738247104; a=rsa-sha256; cv=none; b=ybYCnaQ4aqzNbMdL9lej9F6eEyPxglKUxgjypGBJXwW25z6TPUNLnuyzZfO97luv7yu47U 0YHpWXWOSQXtNuj5pxBfS39JjmIsGdRgo6rZ4YygcW5sdekmJnhHDrX080cFgSJZQ+iYPo TgVHxJhMANUQgPuO25XzZgFPwqIUUvk= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf30.hostedemail.com: domain of geert.uytterhoeven@gmail.com designates 209.85.208.50 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-5d4e2aa7ea9so1792448a12.2 for ; Thu, 30 Jan 2025 06:25:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738247100; x=1738851900; h=content-transfer-encoding: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=3OqrPZhmeATdEa/SarwcrPzfDvhKK4nRH2GJQ3Y2/Ao=; b=PMs5xM8tiF4MZNYWo4muwr2vJFS0SEBZi3b/NsT+XD8t7O1a8HPPCf46MzzUiOw06r ZlTrlIXBS9rXs8q5B1SsUSq+9eLzcWJnvPCi/aJTVt65Ij87tgHgHyMZIy/QX8Uhrh9r 76Zrf10M4f8xA5sFjBY/Med6EJ+q0teSvjQ2YukV1UGAR8Ur/TuAremGLOSyIWspvrlX UfyMlRZnnT1QxPIa2lTMMgqXMFLLC5VPBwnwB7JekU35UuFAKIeUUhEMJyt4CI2oOpbS fr5sTN6qZM+7wgEslFnQ6g+VYLz8NHuU1mqbygnC48+HnITc5ttl7tGKXCI09SiI9CZy hvEg== X-Forwarded-Encrypted: i=1; AJvYcCV/dWSkKz2oSQsIiNq+2Z9zMHVhqAy55V5hZVGLKBYq6uMRRdUJE4KMRLW41HpWzcCosvgzGBRFTQ==@kvack.org X-Gm-Message-State: AOJu0YxW81IUn5LEdDX2mhz2MnZL6dPD9SBrGh7PwNEE/1brNRvT9ucv vhz6sVbXkPIzwOcyjPeZKzDrqetK0LJDn0VMbJAtHHlbobLzuOUshHYAiowK39I= X-Gm-Gg: ASbGnctGfi+G0zQMiwi0QD1KjrAYk3YcRyD77SW7ocRgXpooJRqo51HL2WzM6MeRWnE mN136jBLf/Jamy+DeVPAKJwM4Su2PduBnUqWkhQzFliH7mjnQIZK5ogczJ6Rnz7w8EnR2oAq7mK LF9HtaDzxnfzGS6HNnBKbtCvbgDzXvjEXqijqGsyu0f2mKhqtJ+uwIaJlVitMZB1ntaw5LCI6nT xJ1mNxOrkH76kLW9b2ACFhBqR6/67J1SCrDHqLl7cXrW1eYoIJV5mA1Lawhb2zRLkrDtfhGn43d AY+WZlAGWzYofEav8AqNy5HAZmZYfzzwOCkegAjd+OtA+K3LCf2kOw== X-Google-Smtp-Source: AGHT+IE8QGma3/X+/KrBfO59lFZSJZKbCGgclDzmha+9DXhJAQItXUpqGswUOo6nTvZtbpr5ywku/Q== X-Received: by 2002:a05:6402:278f:b0:5db:ff7b:7bb2 with SMTP id 4fb4d7f45d1cf-5dc5efa8e75mr8123492a12.6.1738247099872; Thu, 30 Jan 2025 06:24:59 -0800 (PST) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com. [209.85.208.44]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5dc723e4b6dsm1150032a12.24.2025.01.30.06.24.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jan 2025 06:24:59 -0800 (PST) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5d3f65844deso1558488a12.0 for ; Thu, 30 Jan 2025 06:24:59 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUJ3/KH3EmW5PBjhGKntL/SS7SkrjtsyIqLPq//aCxMeV9SHuvKkEHZDyjIDKmHHvQ19sXMiY7XZw==@kvack.org X-Received: by 2002:a05:6402:40c9:b0:5d0:efaf:fb73 with SMTP id 4fb4d7f45d1cf-5dc5efc5baamr7107488a12.15.1738247099100; Thu, 30 Jan 2025 06:24:59 -0800 (PST) MIME-Version: 1.0 References: <20241205-xarray-kunit-port-v1-1-ee44bc7aa201@gmail.com> <07cf896e-adf8-414f-a629-a808fc26014a@oracle.com> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 30 Jan 2025 15:24:45 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AWEUYZmmaZQOtaNUMvBrswZCS49ixh1s35CzIVK-s4dUf7w23LLrATAr9KprGzw Message-ID: Subject: Re: [PATCH] xarray: port tests to kunit To: "Liam R. Howlett" Cc: 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" Content-Transfer-Encoding: quoted-printable X-Stat-Signature: wyoeupuxggzybu4e74fa3wsdufe13f3p X-Rspam-User: X-Rspamd-Queue-Id: 1241980013 X-Rspamd-Server: rspam03 X-HE-Tag: 1738247103-898778 X-HE-Meta: U2FsdGVkX19Uh7+Qd04pv2u5HbmA5rtUgusp5IC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1pY2VPgC1aon9t8X7IXNSHBPNVGu+lV2yeUC1KsA5yO/gge+cJ5z9jdAkdTuxmCYToy2xoarbQN8vP+ilif20AUoumJ1BMiArZX2D4bacn/mLy3lRkB0t+9q+I5m9xS5/6nOTVmaiZtw+J3Th+Z3g5K+wbAnjjJsvtgHUWvH8rydbejSgojq7gTD2rS5DQqyylqBK+u4h9diKFMJWNjk4h6j3jMspjY30NSNpdMS64vzxuONYQQvTPvo0wivup2ZDd3ow/t0w3kxoLA6pTmKHs8Ms11h6mwhGiMscqtxT4kwPHfpRvIn4FpTGqmn9MfnS+lM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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 Liam, On Thu, 30 Jan 2025 at 15:06, Liam R. Howlett wro= te: > * Geert Uytterhoeven [250130 08:26]: > > On Thu, 30 Jan 2025 at 13:52, Liam R. Howlett = wrote: > > > * Geert Uytterhoeven [250130 03:21]: > > > > On Wed, 29 Jan 2025 at 23:26, Liam R. Howlett wrote: > > > > > I've never used the kunit testing of xarray and have used the use= rspace > > > > > testing instead, so I can't speak to the obscure invocation as bo= th > > > > > commands seem insanely long and obscure to me. > > > > > > > > The long and obscure command line is a red herring: a simple > > > > "modprobe test_xarray" is all it takes... > > > > > > That command worked before too... > > > > Exactly, great! > > > > > > > You should look at the userspace testing (that this broke) as it = has > > > > > been really useful in certain scenarios. > > > > > > > > BTW, how do I even build tools/testing/radix-tree? > > > > "make tools/help" doesn't show the radix-tree test. > > > > "make tools/all" doesn't seem to try to build it. > > > > Same for "make kselftest-all". > > > > > > make > > > > Where? > > > > BTW, how do I even build tools/testing/radix-tree? > ^^^^^^^^^^^^^^^^^^^^^^^ Things like "make -C drivers/net/ethernet/" stopped working ca. 20y ago. > > > Or look at the make file and stop guessing. Considering how difficul= t > > > > There is no Makefile referencing tools/testing/radix-tree or the > > radix-tree subdir. That's why I asked... > > > > Oh, I am supposed to run make in tools/testing/radix-tree/? > > What a surprise! > > > > Which is a pain when building in a separate output directory, as you > > cannot just do "make -C tools/testing/radix-tree" there, but have to > > type the full "make -C tools/testing/radix-tree O=3D..." (and optionall= y > > ARCH=3D... and CROSS_COMPILE=3D...; oh wait, these are ignored :-( in t= he > > source directory instead... > > I'll await your patch to link all this together. Please Cc the authors. I gave it a try for kselftests a few years ago. https://lore.kernel.org/all/20190114135144.26096-1-geert+renesas@glider.be Unfortunately only one patch was applied... > > > it is to get m68k to build, you should probably know how to read a > > > makefile. > > > > Like all other kernel cross-compilation? Usually you don't even have > > to know where your cross-compiler is living: > > > > make ARCH=3Dm68k > > Ignoring that I had to make a config - which asked challenging > questions... make ARCH=3Dm68k defconfig > And ignoring the steps to get m68k compiler... apt install gcc-m68k-linux-gnu? > > > > When trying the above, and ignoring failures due to missing package= s > > > > on my host: > > > > - there are several weird build errors, > > > > - this doesn't play well with O=3D, > > > > - lots of scary warnings when building for 32-bit, > > > > - ... > > > > > > In file included from ./include/linux/sched.h:12, > from arch/m68k/kernel/asm-offsets.c:15: > ./arch/m68k/include/asm/current.h:7:30: error: invalid register name for = =E2=80=98current=E2=80=99 > 7 | register struct task_struct *current __asm__("%a2"); Which compiler are you using? > > > > At least the kunit tests build (and run[1] ;-) most of the time... > > > > > > Do they? How about you break something in xarray and then try to boo= t > > > the kunit, or try to boot to load that module. > > > > If you break the kernel beyond the point of booting, you can indeed > > not run any test modules... > > Which is extremely easy when you are changing code that runs so early in > the boot. > > My code found a compiler issue because it's the first function that > returns a boolean. This is stupid. Sorry. I don't understand this comment. Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= .org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds