From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9E75B29CEB for ; Mon, 6 Nov 2023 17:09:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hQaJvupT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4302DC433CC; Mon, 6 Nov 2023 17:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699290598; bh=UFzUofNNLBASgkPIJgDuNdjyCEGP5bQHseuE8TRa7W0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hQaJvupT4KjzsBJdf632gxvpFt08jPP2HUDi32DeJFMsVaQqfn9+Ll6lnsXFhbVsU +b+Uav8d70GJwoVLBcWGbauVZbqJyurllHJlodYjkF6SDrEnGz3fnAOCBkBac+VmM2 phkpuBXi7HP8IMxpaip3rkmLqlZcM7mVARX6ASdBtDbHE+vnJaf+kRheCDZAmVo1ON luwtZETkz9Wbr8zxDVN1wz4WWSh0J+fC7LZ4QWtWv/MT1K/1X5AcAZwsLPk40G7sB1 iEPNu4LejFDtl2mkefC5ZDw8eZsClBKglllw9L+IK68px2zWyh4hNO2BAaNrlk34XZ 7xZTEWkPoai4w== Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-50970c2115eso1670521e87.1; Mon, 06 Nov 2023 09:09:58 -0800 (PST) X-Gm-Message-State: AOJu0Yw2IKqAJPS+2Fkxq0EZP056hMXrFq21oAH0ITMOhJQjMEefwdyV zs+mm5NpysbD2AMDQorVKJdP8yVbWhLP0ZXjbQ== X-Google-Smtp-Source: AGHT+IGpMZ2uYxaFKvHqjpiuPBw5ga6h3w246K/OsJC2VAWaxh57/wBNpyznpCnRCwVbLEpl1hL6RVNZkRP/FNRR2yI= X-Received: by 2002:ac2:53ab:0:b0:507:ce2f:8f0c with SMTP id j11-20020ac253ab000000b00507ce2f8f0cmr22254953lfh.35.1699290596382; Mon, 06 Nov 2023 09:09:56 -0800 (PST) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20230828211424.2964562-1-nfraprado@collabora.com> <20230828211424.2964562-4-nfraprado@collabora.com> In-Reply-To: From: Rob Herring Date: Mon, 6 Nov 2023 11:09:44 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 3/3] kselftest: Add new test for detecting unprobed Devicetree devices To: Mark Brown , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Cc: 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 2, 2023 at 12:36=E2=80=AFPM Mark Brown wro= te: > > On Thu, Nov 02, 2023 at 07:15:58PM +0530, Naresh Kamboju wrote: > > On Thu, 2 Nov 2023 at 17:41, Aishwarya TCV wrot= e: > > > > 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 file= s ? > > Right, it does look like something bad is going on with symlinks: > > > > '/tmp/kci/linux/tools/testing/selftests/../../../build/source/build/s= ource/build/source/build/source/build/source/build/source/build/source/buil= d/source/build/source/build/source/build/source/build/source/build/source/b= uild/source/build/source/build/source/build/source/build/source/build/sourc= e/build/source/build/source/build/source/build/source/build/source/build/so= urce/build/source/build/source/build/source/build/source/build/source/build= /source/build/source/build/source/build/source/build/source/build/source/bu= ild/source/build/source/build/source/build/source/tools/testing/selftests/p= owerpc/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=3D8 O=3D/home/tuxbuild/.cache/tuxmake= /builds/1/build INSTALL_PATH=3D/home/tuxbuild/.cache/tuxmake/builds/1/build= /kselftest_install ARCH=3Darm64 CROSS_COMPILE=3Daarch64-linux-gnu- CROSS_CO= MPILE_COMPAT=3Darm-linux-gnueabihf- 'CC=3Dsccache aarch64-linux-gnu-gcc' 'H= OSTCC=3Dsccache 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=3DKernelCI FORMAT=3D.xz ARCH=3Darm64 HOSTCC=3Dgc= c CROSS_COMPILE=3Daarch64-linux-gnu- CROSS_COMPILE_COMPAT=3Darm-linux-gnuea= bihf- CC=3D"ccache aarch64-linux-gnu-gcc" O=3D/tmp/kci/linux/build -C/tmp/k= ci/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-ex= tract-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. A simple solution would be instead of passing the source tree root to dt-extract-compatibles, pass 'arch', 'drivers', and 'sound' instead. There shouldn't be compatibles anywhere else. Rob