Message ID | 20240215165527.23684-1-msuchanek@suse.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-67350-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp533087dyb; Thu, 15 Feb 2024 08:58:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXGpg8SjZDJjOw9IBVCyuSZnZ1QfDOGicED2n5UfcIKmmE17cho3L7gl0AX3JxRuqOYXCF15aqTpOzjEBOuorRLDjY6vw== X-Google-Smtp-Source: AGHT+IHoWmXSCBQGZBMk3grrvu6MdSlm+PlaVZAUoIhplHPkLBtlJJEPiFv0/x7xWrC+GAxHLM+W X-Received: by 2002:a17:907:20e9:b0:a3d:6cb1:1889 with SMTP id rh9-20020a17090720e900b00a3d6cb11889mr3016581ejb.23.1708016282484; Thu, 15 Feb 2024 08:58:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708016282; cv=pass; d=google.com; s=arc-20160816; b=jGrJvD6KcVRCsSh3H/ZBEX5Ite/ZpMSNTr0AwOP8GQPYiKZWntui2AqC7v/8Y37rCL p5DIkhHc1DRkZrq4ZCnA+o/unBYrJ9eGEYa+VQ/W3yws8+lfFYjL9SXgO0E1cEftUCrZ u8E/LxiAMhKXLu5+N+wDzL/3TNLYJX2JVCylL9v/6NLyvKavmcc7VTwCiLtD+zKlzkAC Gipxq8it2i5+H934N2WZgaFro6ennD2PbyB4bVZgLwe6lIoHjzAbY6rVQPb68XtXWUzT AlYFTMSV9P7sLpsdD4S5UvMmvvU+s807AJlMnETNZsvz2JZA168zP2iF+43Y4Ubkcdrk EpaQ== ARC-Message-Signature: i=2; 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:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=HHI73AbiDsgFPpKe9TkJUmUEu7LiJywR0x6tJv++5SM=; fh=WDwUEPZxPLpzBYI0NllhQZX8SuerZRUQWI/nwqDYpaY=; b=oTtLi9gyG5l42OdCL0cMBLvSWK2/f+pMfeoNRd8pyWBNYyj0x8BrhSTxQAzqejF+yl +uIAvYGSo4HJyBssBFcsISrQCThA+XlPQQVmRXMX3pMUYjlD3pLy4sZw7MEm8DqC0v0p xurecXddwXqaQSVEH2EW0uVJGbFRv/QExhvE7+L1V1lyS+ejLUeaO04EDOYQKzotzYBX eX5G8/gJn/JbHDBHrEvznzH1TM466U5OnnJkXDbd3W9sj/zrPYKeFEMDYlhUWHTObeL7 WtMsiTSjH4s/KjqGikwCa2vnU/f2TGXq9iqQ1xAQ41ZZ0LEy3lPtmdW4X21JLjz5gB6N 5VKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=01FKlZ2e; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=01FKlZ2e; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-67350-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67350-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g11-20020a170906394b00b00a3d151da798si800828eje.905.2024.02.15.08.58.02 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 08:58:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67350-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=01FKlZ2e; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=01FKlZ2e; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-67350-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67350-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de 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 1B0FB1F2219A for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 16:58:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D47E1386A7; Thu, 15 Feb 2024 16:55:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="01FKlZ2e"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WSXmafZ0"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="01FKlZ2e"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WSXmafZ0" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9630E136644; Thu, 15 Feb 2024 16:55:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708016135; cv=none; b=upYz1I8Tzr5raluGBYNiSFsKhtsun5Zo76lHD8JMRKV60XKbso1tM7nIt3A1F/wztKSuVTeiixA4LXN4yvlzXljIQFun+/7s9/otggmr/apqEvQ240YZUGbLG+x7RRYczgrvslG3EnYjNOuvKqkDf8EufhRvLBy/U3pVmxfBPfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708016135; c=relaxed/simple; bh=+0UJSlfWMmd8U6AtuQoamLR1RlagrGh1ENR1LLeXmV8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EPXrU+ltATeQLte69IdQekO2f5eK6cpI1id0hrJsylNl5AwVcvpKs5NOsnypU410lvPuF1XMzNaX9JDVnZoA+X+2z8pI8BAV9xG2nTxLsCAVZf3NyYcjLPaBXvum5aW2Z3dPLRK7N89YTklHWG0TEJoRxvRaPwwVKi1hEf/342k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=01FKlZ2e; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=WSXmafZ0; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=01FKlZ2e; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=WSXmafZ0; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from kitsune.suse.cz (unknown [10.100.12.127]) by smtp-out1.suse.de (Postfix) with ESMTP id B7AF9211D2; Thu, 15 Feb 2024 16:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708016129; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HHI73AbiDsgFPpKe9TkJUmUEu7LiJywR0x6tJv++5SM=; b=01FKlZ2eJYvRpCDFGs5WClGtaZcibEiXNB0fRuhPAyZ/6JlJfm4WBfckCeupeigq9EY6dl mWqEhwKhNymwYGSAkpp7vnGiEXn8K8HNC4jVVdbifGph0NAjE4TwBBaClQqnWa2WVovLYq mZBpOIlYSGGg0hb/TleNeb3giUfHJbM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708016129; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HHI73AbiDsgFPpKe9TkJUmUEu7LiJywR0x6tJv++5SM=; b=WSXmafZ0ynuqlWv6uACXEuFrkDxjS/Gfy6KOGkN0ZNEa+YflSpYEZsCrYv8wN/E9FmLvAo UIxC/uLFDza3twDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708016129; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HHI73AbiDsgFPpKe9TkJUmUEu7LiJywR0x6tJv++5SM=; b=01FKlZ2eJYvRpCDFGs5WClGtaZcibEiXNB0fRuhPAyZ/6JlJfm4WBfckCeupeigq9EY6dl mWqEhwKhNymwYGSAkpp7vnGiEXn8K8HNC4jVVdbifGph0NAjE4TwBBaClQqnWa2WVovLYq mZBpOIlYSGGg0hb/TleNeb3giUfHJbM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708016129; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HHI73AbiDsgFPpKe9TkJUmUEu7LiJywR0x6tJv++5SM=; b=WSXmafZ0ynuqlWv6uACXEuFrkDxjS/Gfy6KOGkN0ZNEa+YflSpYEZsCrYv8wN/E9FmLvAo UIxC/uLFDza3twDQ== From: Michal Suchanek <msuchanek@suse.de> To: linuxppc-dev@lists.ozlabs.org Cc: root <root@jostaberry-6.arch.suse.de>, Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>, "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>, Shuah Khan <shuah@kernel.org>, Michal Suchanek <msuchanek@suse.de>, Nathan Lynch <nathanl@linux.ibm.com>, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH] selftests: powerpc: Add header symlinks for building papr character device tests Date: Thu, 15 Feb 2024 17:55:21 +0100 Message-ID: <20240215165527.23684-1-msuchanek@suse.de> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [4.55 / 50.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[12]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[jostaberry-6.arch.suse.de,ellerman.id.au,gmail.com,csgroup.eu,kernel.org,linux.ibm.com,suse.de,vger.kernel.org]; BAYES_HAM(-0.35)[76.37%] X-Spam-Level: **** X-Spam-Score: 4.55 X-Spam-Flag: NO X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790984881069888898 X-GMAIL-MSGID: 1790984881069888898 |
Series |
selftests: powerpc: Add header symlinks for building papr character device tests
|
|
Commit Message
Michal Suchánek
Feb. 15, 2024, 4:55 p.m. UTC
From: root <root@jostaberry-6.arch.suse.de> Without the headers the tests don't build. Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd") Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm") Signed-off-by: Michal Suchanek <msuchanek@suse.de> --- tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 + tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 + tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 + 3 files changed, 3 insertions(+) create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-vpd.h
Comments
Michal Suchanek <msuchanek@suse.de> writes: > > Without the headers the tests don't build. > > Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd") > Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm") > Signed-off-by: Michal Suchanek <msuchanek@suse.de> > --- > tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 + > tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 + > tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 + > 3 files changed, 3 insertions(+) > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h > create mode 120000 > tools/testing/selftests/powerpc/include/asm/papr-vpd.h I really hope making symlinks into the kernel source isn't necessary. I haven't experienced build failures with these tests. How are you building them? I usually do something like (on a x86 build host): $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- ppc64le_defconfig $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- headers $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- -C tools/testing/selftests/powerpc/ without issue.
On Thu, Feb 15, 2024 at 01:13:34PM -0600, Nathan Lynch wrote: > Michal Suchanek <msuchanek@suse.de> writes: > > > > Without the headers the tests don't build. > > > > Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd") > > Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm") > > Signed-off-by: Michal Suchanek <msuchanek@suse.de> > > --- > > tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 + > > tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 + > > tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 + > > 3 files changed, 3 insertions(+) > > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h > > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h > > create mode 120000 > > tools/testing/selftests/powerpc/include/asm/papr-vpd.h > > I really hope making symlinks into the kernel source isn't necessary. I > haven't experienced build failures with these tests. How are you > building them? > > I usually do something like (on a x86 build host): > > $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- ppc64le_defconfig > $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- headers > $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- -C tools/testing/selftests/powerpc/ > > without issue. I am not configuring the kernel, only building the tests, and certainly not installing headers on the system. Apparently this is what people aim to do, and report bugs when it does not work: build the kselftests as self-contained testsuite that relies only on standard libc, and whatever it brought in the sources. That said, the target to install headers is headers_install, not headers. The headers target is not documented, it's probably meant to be internal to the build system. Yet it is not enforced that it is built before building the selftests. Thanks Michal
Michal Suchánek <msuchanek@suse.de> writes: > On Thu, Feb 15, 2024 at 01:13:34PM -0600, Nathan Lynch wrote: >> Michal Suchanek <msuchanek@suse.de> writes: >> > >> > Without the headers the tests don't build. >> > >> > Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd") >> > Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm") >> > Signed-off-by: Michal Suchanek <msuchanek@suse.de> >> > --- >> > tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 + >> > tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 + >> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 + >> > 3 files changed, 3 insertions(+) >> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h >> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h >> > create mode 120000 >> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h >> >> I really hope making symlinks into the kernel source isn't necessary. I >> haven't experienced build failures with these tests. How are you >> building them? >> >> I usually do something like (on a x86 build host): >> >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- ppc64le_defconfig >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- headers >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- -C tools/testing/selftests/powerpc/ >> >> without issue. > > I am not configuring the kernel, only building the tests, and certainly > not installing headers on the system. OK, but again: how do you provoke the build errors, exactly? Don't make us guess please. > Apparently this is what people aim to do, and report bugs when it does > not work: build the kselftests as self-contained testsuite that relies > only on standard libc, and whatever it brought in the sources. > > That said, the target to install headers is headers_install, not > headers. The headers target is not documented, it's probably meant to be > internal to the build system. Yet it is not enforced that it is built > before building the selftests. <shrug> the headers target is used in Documentation/dev-tools/kselftest.rst: """ To build the tests:: $ make headers $ make -C tools/testing/selftests """ This is what I've been following.
On Thu, Feb 15, 2024 at 01:39:27PM -0600, Nathan Lynch wrote: > Michal Suchánek <msuchanek@suse.de> writes: > > On Thu, Feb 15, 2024 at 01:13:34PM -0600, Nathan Lynch wrote: > >> Michal Suchanek <msuchanek@suse.de> writes: > >> > > >> > Without the headers the tests don't build. > >> > > >> > Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd") > >> > Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm") > >> > Signed-off-by: Michal Suchanek <msuchanek@suse.de> > >> > --- > >> > tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 + > >> > tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 + > >> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 + > >> > 3 files changed, 3 insertions(+) > >> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h > >> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h > >> > create mode 120000 > >> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h > >> > >> I really hope making symlinks into the kernel source isn't necessary. I > >> haven't experienced build failures with these tests. How are you > >> building them? > >> > >> I usually do something like (on a x86 build host): > >> > >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- ppc64le_defconfig > >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- headers > >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- -C tools/testing/selftests/powerpc/ > >> > >> without issue. > > > > I am not configuring the kernel, only building the tests, and certainly > > not installing headers on the system. > > OK, but again: how do you provoke the build errors, exactly? Don't make > us guess please. cd tools/testing/selftests/powerpc/ make -k > > Apparently this is what people aim to do, and report bugs when it does > > not work: build the kselftests as self-contained testsuite that relies > > only on standard libc, and whatever it brought in the sources. > > > > That said, the target to install headers is headers_install, not > > headers. The headers target is not documented, it's probably meant to be > > internal to the build system. Yet it is not enforced that it is built > > before building the selftests. > > <shrug> the headers target is used in Documentation/dev-tools/kselftest.rst: > > """ > To build the tests:: > > $ make headers > $ make -C tools/testing/selftests > """ Indeed so it's not supposed to work otherwise. It would be nice if it did but might be difficult to achieve with plain makefiles. 'headers' is not in 'make help' output but whatever. Thanks Michal
Michal Suchánek <msuchanek@suse.de> writes: > On Thu, Feb 15, 2024 at 01:39:27PM -0600, Nathan Lynch wrote: >> Michal Suchánek <msuchanek@suse.de> writes: >> > On Thu, Feb 15, 2024 at 01:13:34PM -0600, Nathan Lynch wrote: >> >> Michal Suchanek <msuchanek@suse.de> writes: >> >> > >> >> > Without the headers the tests don't build. >> >> > >> >> > Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd") >> >> > Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm") >> >> > Signed-off-by: Michal Suchanek <msuchanek@suse.de> >> >> > --- >> >> > tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 + >> >> > tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 + >> >> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 + >> >> > 3 files changed, 3 insertions(+) >> >> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h >> >> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h >> >> > create mode 120000 >> >> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h >> >> >> >> I really hope making symlinks into the kernel source isn't necessary. I >> >> haven't experienced build failures with these tests. How are you >> >> building them? >> >> >> >> I usually do something like (on a x86 build host): >> >> >> >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- ppc64le_defconfig >> >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- headers >> >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- -C tools/testing/selftests/powerpc/ >> >> >> >> without issue. >> > >> > I am not configuring the kernel, only building the tests, and certainly >> > not installing headers on the system. >> >> OK, but again: how do you provoke the build errors, exactly? Don't make >> us guess please. > > cd tools/testing/selftests/powerpc/ > > make -k > >> > Apparently this is what people aim to do, and report bugs when it does >> > not work: build the kselftests as self-contained testsuite that relies >> > only on standard libc, and whatever it brought in the sources. >> > >> > That said, the target to install headers is headers_install, not >> > headers. The headers target is not documented, it's probably meant to be >> > internal to the build system. Yet it is not enforced that it is built >> > before building the selftests. >> >> <shrug> the headers target is used in Documentation/dev-tools/kselftest.rst: >> >> """ >> To build the tests:: >> >> $ make headers >> $ make -C tools/testing/selftests >> """ > > Indeed so it's not supposed to work otherwise. It would be nice if it > did but might be difficult to achieve with plain makefiles. It used to work without the headers, but at some point folks decided it was causing too many problems and building the headers was made mandatory. Note that by default they aren't installed globally, they just end up in $KBUILD_OUTPUT/usr/include. So it shouldn't affect the host system. cheers
diff --git a/tools/testing/selftests/powerpc/include/asm/papr-miscdev.h b/tools/testing/selftests/powerpc/include/asm/papr-miscdev.h new file mode 120000 index 000000000000..0f811020354d --- /dev/null +++ b/tools/testing/selftests/powerpc/include/asm/papr-miscdev.h @@ -0,0 +1 @@ +../../../../../../arch/powerpc/include/uapi/asm/papr-miscdev.h \ No newline at end of file diff --git a/tools/testing/selftests/powerpc/include/asm/papr-sysparm.h b/tools/testing/selftests/powerpc/include/asm/papr-sysparm.h new file mode 120000 index 000000000000..6355e122245e --- /dev/null +++ b/tools/testing/selftests/powerpc/include/asm/papr-sysparm.h @@ -0,0 +1 @@ +../../../../../../arch/powerpc/include/uapi/asm/papr-sysparm.h \ No newline at end of file diff --git a/tools/testing/selftests/powerpc/include/asm/papr-vpd.h b/tools/testing/selftests/powerpc/include/asm/papr-vpd.h new file mode 120000 index 000000000000..403ddec6b422 --- /dev/null +++ b/tools/testing/selftests/powerpc/include/asm/papr-vpd.h @@ -0,0 +1 @@ +../../../../../../arch/powerpc/include/uapi/asm/papr-vpd.h \ No newline at end of file