From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AC2D30654 for ; Tue, 7 Nov 2023 23:03:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="nT+oFqWT" Received: from notapiano (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id CFE8366074D8; Tue, 7 Nov 2023 23:02:50 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1699398173; bh=HNuFXAmcr38Mjsj1EcQwzGsMmMNd5OK9/yCfyVW4N7E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nT+oFqWTGc+4wcTmMdloWWi/XInr7UbLO36ivjlKIj541/njlF6/1JmYBN/9SdZXF KLSi6IH9AO5SU9we2nGYDD7XiN9ovEDl9BeJPMFKLiX9JF79hgHfT3mn3jDqzlelKx crgKKPLIm8Hgju51OfnZ9/R9lVg4TXpWQoa5y7m0WBlD8vrJGg/VlMBG9d4Ubmnz+9 K+vo2TLj9Q9w6CR/9W1rZsHX+9RnCjHSbodX4wN3Z1FEIdwyEh03iOEuXHdyotN7fw U82ZVuC2fE8Wh45D+BNIunm8YuRvMZ477t4NNemoQWYA5ypwIi6kPcjhBXBQHOhwe+ 9LxEOu/MGP6/w== Date: Tue, 7 Nov 2023 18:02:47 -0500 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: Rob Herring Cc: Mark Brown , Naresh Kamboju , Aishwarya TCV , kernelci@lists.linux.dev, kernel@collabora.com, Guenter Roeck , Bjorn Andersson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Frank Rowand , Shuah Khan Subject: Re: [PATCH v3 3/3] kselftest: Add new test for detecting unprobed Devicetree devices Message-ID: <59bca032-2657-46a8-9070-7528ffcc3e28@notapiano> References: <20230828211424.2964562-1-nfraprado@collabora.com> <20230828211424.2964562-4-nfraprado@collabora.com> Precedence: bulk X-Mailing-List: kernelci@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Nov 06, 2023 at 11:09:44AM -0600, Rob Herring wrote: > On Thu, Nov 2, 2023 at 12:36 PM Mark Brown wrote: > > > > On Thu, Nov 02, 2023 at 07:15:58PM +0530, Naresh Kamboju wrote: > > > On Thu, 2 Nov 2023 at 17:41, Aishwarya TCV wrote: > > > > > > https://storage.kernelci.org/mainline/master/v6.6-9152-gdeefd5024f07/arm64/defconfig%2Bkselftest/gcc-10/logs/kselftest.log > > > > ... > > > > > May be due to, A loop of symlinks that are pointing to self / same files ? > > > > Right, it does look like something bad is going on with symlinks: > > > > > > '/tmp/kci/linux/tools/testing/selftests/../../../build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/build/source/tools/testing/selftests/powerpc/vphn/vphn.c' > > > > > Please build by using tuxmake and validate builds are working. > > > > Note that tuxmake does an in tree build of kselftest: > > > > make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build INSTALL_PATH=/home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest_install ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- 'CC=sccache aarch64-linux-gnu-gcc' 'HOSTCC=sccache gcc' kselftest-install > > > > and does it's own tarball build too, whereas kernelci does an out of > > tree build and uses kselftest-gen_tar: > > > > make KBUILD_BUILD_USER=KernelCI FORMAT=.xz ARCH=arm64 HOSTCC=gcc CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- CC="ccache aarch64-linux-gnu-gcc" O=/tmp/kci/linux/build -C/tmp/kci/linux -j10 kselftest-gen_tar > > > > and that the error is in the dt-extract-compatibles program which is > > part of the kernel (well, imported into the kernel from dtc upstream): > > > > File "/tmp/kci/linux/tools/testing/selftests/../../../scripts/dtc/dt-extract-compatibles", line 107, in > > compat_ignore_list.extend(parse_compatibles_to_ignore(f)) > > > > This all suggests that something to do with how the build is set up is > > resulting in the source symlink that gets created for out of tree builds > > blowing up, I guess it's not specifically the DT stuff that's blowing it > > up but rather that it's tripping over an existing bug. Really does look > > like a legitimate bug though, the source link is set up by the in tree > > kernel build infrastructure. > > > > I did poke a bit at reproducing outside of the KernelCI scripts but > > didn't manage to yet. > > I can repro with "make dt_compatible_check". The problem is with an > 'out of tree' build within the tree. That's my normal setup, but the > difference is I have ".build" directories. If I use "build" instead, > then I can repro. The issue is the iglob will recurse into "build" but > not hidden directories (by default). There's no option to not follow > symlinks which would solve this (there is an open python issue since > 2017 to add it). I don't see a simple solution in python other than > getting a full list with glob(), convert to absolute paths, and remove > duplicates. I imagine that will be somewhat slow. Hi, sorry for the delay, I was on vacation last week. I was able to reproduce the issue the way you described. And I also suspected an alternative approach would be slower, but after trying it out it ran just as fast as the current one, even on cold cache, so I sent it out: https://lore.kernel.org/all/20231107225624.9811-1-nfraprado@collabora.com Let me know your thoughts there. Thanks, Nícolas