Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2269524rdf; Mon, 6 Nov 2023 09:10:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTbmqk9y3SfLDLa2thPjK5xGU2XQkMRTVBxbVjfdklvzOCa1blDnvO+Yfd2/ezebXS0Eya X-Received: by 2002:a05:6a21:a108:b0:181:a9b6:8883 with SMTP id aq8-20020a056a21a10800b00181a9b68883mr11756421pzc.35.1699290617379; Mon, 06 Nov 2023 09:10:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699290617; cv=none; d=google.com; s=arc-20160816; b=SWIY6Q3/XlnijZCc5weCQnaXgXLd8KsY/4Mgfa9TfJFG+A0njnf27Gl+H9MLckbiIt mRrZSJnCfVl50/i/4fYUlrOoMkQTxE78nPz8GAJbvYPyJwiRvhsdeodIpJaDxZRUgu8a 2Zw0Yjvi+PqnZ44KE5RAK/cX8Kud/L4S09E9NMK7ONkq10igE2YNZ4eq95jXBzOBhvAZ Vb5dmCMf45d6iej0Yrymzuxg/hWYfxzU1BL41YHZ3e7yFJv34N78IXeiEznHvo68nfZI 6qFfONnBcB2mD2qK6u3HF19BfHLQNkPnj5XYjo8r3U7fPjtAND7qi+b1hQBtbyMokaCl KXHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=z0AxYMHaHXDi0zEzV7ihjvvJNMPUHQGq+VVPyjFWDAg=; fh=E1RCYjgY+V4/5vkXXDQLdTLoPspe4rsVHOvLtwdkTV0=; b=FtFBF4IsCZU/eEPeTiDr9R+DiL0t3asjbVLJtILcZfMlCeyYIhhO4XkEiD622+4rhY rOJjGW9Vh9Re5ZyjIRkZsOXwz/rxUVdzGuYAZ9++ipePM6PgVh7sVXQdOrf79PouWAsb H49RXmfLyFM81oXuvCeZmaz9+0W/OQqKmFdi30AyFwMgGHoZeJG0hy+YEoT95xlPOe/N cYcNI6ZS+m3CTt7DHpKbAkDmdHKSXcFOuI8OEZTHQlmZFxooOHUGThw19AFT5lcxtPGJ Rwo7kG5PgwzrFRBiWCJrgNRYK6BGwrIKaTiDnIenOhHln38u97/fP3YPlnflcvvaVPld iKdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hQaJvupT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id a14-20020a056a000c8e00b006910070695fsi8756076pfv.31.2023.11.06.09.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 09:10:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hQaJvupT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6A3D280A97DA; Mon, 6 Nov 2023 09:10:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229974AbjKFRKD (ORCPT + 99 others); Mon, 6 Nov 2023 12:10:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232919AbjKFRKB (ORCPT ); Mon, 6 Nov 2023 12:10:01 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E9C1D6B; Mon, 6 Nov 2023 09:09:58 -0800 (PST) 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-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) 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 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 06 Nov 2023 09:10:14 -0800 (PST) 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