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 17DEAC83F1B for ; Thu, 17 Jul 2025 13:23:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A79006B00AB; Thu, 17 Jul 2025 09:23:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A28B96B00AD; Thu, 17 Jul 2025 09:23:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 917536B00AE; Thu, 17 Jul 2025 09:23:12 -0400 (EDT) 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 7D8646B00AB for ; Thu, 17 Jul 2025 09:23:12 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 972121A073E for ; Thu, 17 Jul 2025 13:23:11 +0000 (UTC) X-FDA: 83673822582.02.669EAD8 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf10.hostedemail.com (Postfix) with ESMTP id 9106EC000C for ; Thu, 17 Jul 2025 13:23:09 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=lst.de; spf=pass (imf10.hostedemail.com: domain of hch@lst.de designates 213.95.11.211 as permitted sender) smtp.mailfrom=hch@lst.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1752758590; a=rsa-sha256; cv=none; b=pPqjGoeUU8ihGEOtbeptbybRcPgtKj0MGihWw7+1fJ45E10RxU0A/5yopT+FPYK+OxZ/LS SKAtkvY1I4ksNZY9xXEWhRWZ1WdTygtFUTy06kHKq3fvZ3pEsX6peqwl8l5yBHJdJRZQIH vWV87RImLW8ceZ2jlpygAgB19qrwjT0= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=lst.de; spf=pass (imf10.hostedemail.com: domain of hch@lst.de designates 213.95.11.211 as permitted sender) smtp.mailfrom=hch@lst.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1752758590; 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=VHIdE69rAtOUPPvoBI7lKImHodXK3jYIJzTLpXgWoLg=; b=YxHBgR0iff+TEGa8tsifptOgL3iJx4z2W5FteXWBfXjaYybm5oA6F+IvMXFJ/YSyKcZZJA 3I3dbLZvLPN2H72UgGFdqJBPz7NszEnRCmhLIb4IOzWhZmH59z/tgwQYK4hEe9MzDYOo4w 3gtABgtNHzClkf5EtOUrpClRTM8JIPc= Received: by verein.lst.de (Postfix, from userid 2407) id 57276227A88; Thu, 17 Jul 2025 15:23:00 +0200 (CEST) Date: Thu, 17 Jul 2025 15:23:00 +0200 From: Christoph Hellwig To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , Willy Tarreau , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Brendan Higgins , David Gow , Rae Moar , Shuah Khan , Jonathan Corbet , Nicolas Schier , Kees Cook , Alexander Viro , Christian Brauner , Jan Kara , Christoph Hellwig , Luis Chamberlain , Christophe Leroy , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, workflows@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v5 00/15] kunit: Introduce UAPI testing framework Message-ID: <20250717132259.GA25835@lst.de> References: <20250717-kunit-kselftests-v5-0-442b711cde2e@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20250717-kunit-kselftests-v5-0-442b711cde2e@linutronix.de> User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Queue-Id: 9106EC000C X-Stat-Signature: zhisdkxwfccew1nnqocm6eayxbir4ehh X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1752758589-451580 X-HE-Meta: U2FsdGVkX1/eM4rOoV940pN/doMcCseYEtpjJXlw6Mavmr7aSNdYbjDZJ3hnXDJP6lI5YxASciHTn7jW/iyR2juT/2nS48SjRk5AYz0bhGSQ5W6CmECQ27z/qdGjhGwcpLpUmSwDew5Kdr5pyoaUcCdsVXGmTSbMNGw42JYoJV9S9ROqx1eGpntuQbWpzzMOQA0fz/NnXyGoKTql/HYtv+0ppzN8d9CX8kl3fwc6z/qUajK+pYvzopcMqET48lUkSid3DxdvtuSKJB/iz9MMcFUeaPLbNHSGUOIndMjpDdpZJPZaW78tzhzLvDZOGz96wLFniN9oEXeTxx3qPeEgka3oCzAVfycG0NBDxJj66fMU28THW9JmfpgM27t//wDaLxXOsTuEEvoZk8uXT1qaNw9Vo6AKjtIhh1uVZYmHmVWb6aMMC54GZDNqZ3HbJ9mWvl9tLGiHxEkMvy1iOQ2RgzcQMdALW02BSHV137koWZTrQds/81WlZVo2Nib5REpViAYUObMxEFKOZ8bt22OP/3LMR1YZlrc/Vm+8vgqeS1dnR5zFRhobmK1k2xnCAy7zhiys/xXWqhzcrF7zsIqBIFb0C6nRUeDS1PcAMnAy4SQb+sMBiQc4B7i6hM3TMhcQPEQF+z3ZkyVwaP41PfS3nWtLxdMsUBRbo7i3jRUSnvTepCqqI1+klC7+TLmvVIRgkPnudZqAykJO/9e6GJ8Go6AvqDTws2r2DwwZAGwKHy+ataZFZEx3NfWgCg7JuY1hiFWfw9CN5/WlBVDOCKzM4w/Zc7i7TE/37lLfKhpPEbXoQvNcn87PnMV0c0/yNKCsBUKpcWuIN9/qxWIr998xV8G87cjhztixzzQObIK+gmDniGc14mmgyt0Jo5zcGny/OrqMUqFkjKoN+oKQy742MXcs4rY1e4rY4lpuEdtVg8uvmjprVzSuaaWqTlCQNOobPKbRRSZEqr/WU/pxoEy VOVO4lqL CpZ5orF0VGdNOqlIwAVT/e5V+GhqOA4UdHD6a7InxFro6HNAD6e21yGuYWfoBzuu0l2puVPMM+9awzuJKc0RvcSjI54wahv3lsarGFmZy/PG2cN38tz/NKt/8sw== 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: On Thu, Jul 17, 2025 at 10:48:02AM +0200, Thomas Weißschuh wrote: > Currently testing of userspace and in-kernel API use two different > frameworks. Which is kinda expected as one has to run in the kernel to test in-kernel kernel space APIs, and the other tests externally provided kernel functionality. > Therefore kunit is much easier to run against different kernel > configurations and architectures. Which is is normal. unit tests are always easier to run than integration tests. > This series aims to combine kselftests and kunit, avoiding both their > limitations. It works by compiling the userspace kselftests as part of > the regular kernel build, embedding them into the kunit kernel or module > and executing them from there. This is really weird. "Running userspace code is hard, so we package it in the kernel". I had my own fair share of problems with kselftests, mostly because of the lack of structure and automated way to run them, but adding them to the kernel (or a module) is overshooting the target by far. > If the kernel toolchain is not fit to > produce userspace because of a missing libc, the kernel's own nolibc can > be used instead. Is nolibc enough to run all the selftests? If so we should just do it unconditionally, but linking to different libraries by availability seems a bit problematic. > The structured TAP output from the kselftest is integrated into the > kunit KTAP output transparently, the kunit parser can parse the combined > logs together. Good idea!