Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3299400rdb; Sat, 9 Dec 2023 23:06:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzp1jpBO4dH3Z1HT01As+7aPGzUvxFfOGlZErbc7jwBzONtuWH3jBVOtxugZJN2V6898OB X-Received: by 2002:a05:6e02:b2a:b0:35d:620d:b97d with SMTP id e10-20020a056e020b2a00b0035d620db97dmr3997832ilu.45.1702191996770; Sat, 09 Dec 2023 23:06:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702191996; cv=none; d=google.com; s=arc-20160816; b=JSPV7XyfLkHf0/p6ZLLgZ4XSZ5qgAKaLQhvBD1zetMPhp1IWF3jNg1RpUduPNUA+Pc 09nV+TjbbfD3qL1p2EwkNB1IEStn+G0qUmhu4vAULx6zgYqYFZWjHZmurNUIpxfdf73l J6qL5E4UipnB9VhYgKh5zFtZr0IcZ6zQfNpszUzNH2vl0WiS2Wk18/ubIjFyG8nDlx+6 KPh3rEDVmvQBwTGS6jawUAUN8PhnT0PCuy+DTorGErA8d1/z9qM/Z5Pv9YZF4/EGWnK7 QWT4yliLH8Mgncep9OzMwp/w9PH937ET+2BKCs+VWbqMO9xuEKhnrmrqeRzMKterYu2w 3HjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=fQdyRbljwT/r0TSo1s9hRYxGuVAweoThqs6h9Ac1n4U=; fh=LxvuedbCDexgPS7PCUIMReAEHuru3vKZX5hWS6CoY24=; b=GrzW1ufJv1z+3+Sbxxne2vdE+lribdIpqtvpU19ms8dtGdOUOfuBOi0PlOC82BnrQX JQGcke1smwnVILcfqjeC7puLgUTgEmjsdociPIO9eLIGaXzb2buLrdmTqJmv51J8O206 DQze4SaCAqbfs5EDnbrU5c8/Z3kumeQ5abSFZv8Ul//NR4wjT91CyeR41G+Jqactxqk4 nntL6A/zFNL0cMW3Ov9Q1Zkg0wn8EF1kFC4OEPcXmsihlXvdRgiIcB7t86U9143HZcVY ch1E6JNDP8g8k+LlBlAlxGDj5g5YzLcS9rbsDnJ20c/SW89flUvWucdpdstby8vVicHD 9/jw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id n16-20020a170903111000b001d3177065acsi90927plh.229.2023.12.09.23.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 23:06:36 -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; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 7F125807C656; Sat, 9 Dec 2023 23:06:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231622AbjLJHGU (ORCPT + 99 others); Sun, 10 Dec 2023 02:06:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231645AbjLJHGO (ORCPT ); Sun, 10 Dec 2023 02:06:14 -0500 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40ADF10DF; Sat, 9 Dec 2023 23:06:12 -0800 (PST) X-QQ-mid: bizesmtpipv601t1702191953twkf Received: from localhost.localdomain ( [255.141.82.1]) by bizesmtp.qq.com (ESMTP) with id ; Sun, 10 Dec 2023 15:05:51 +0800 (CST) X-QQ-SSF: 01200000000000B0J000000A0000000 X-QQ-FEAT: PsQCk6chbj6h4FU2I72BeOc3gpNWlAN7ZYYwmfNI2bTPdpmO6QR0dRY7cSJ5H q57bZVSsSmCepYmP49Uz+fXk9R94bDJXxL7H9nH3DVBL8zHBPdTVHFZhtOJ55wkwRXpckLk askBWocVTeETXN1Ry1ID2yHgx+eyCm9rqfDGwDIfqutekJ7wBXcTTtfZsmMajrRzHY4R7Ac 12XkPO5qz4A08IvDO3pnady/N56oY/hYwrr4MgaQa0bF8D1yMfRWHu78VFMpVcm3VhOjA8u +qxG5xkE95LnX6GSdyuJV3wu+qsM+ajjEOjPd9FD6SHld9Wt9O2qzOVOET10eu66YvZ+gln nWXlO7YBkdTw3mRACg= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 18368869975197440686 From: Jialu Xu To: masahiroy@kernel.org Cc: justinstitt@google.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, morbo@google.com, nathan@kernel.org, ndesaulniers@google.com, xujialu@vimux.org Subject: Re: [PATCH v4] gen_compile_commands.py: fix path resolve with symlinks in it Date: Sun, 10 Dec 2023 15:05:32 +0800 Message-Id: <20231210070533.925534-1-xujialu@vimux.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtpipv:vimux.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=0.5 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_ILLEGAL_IP,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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]); Sat, 09 Dec 2023 23:06:34 -0800 (PST) >Is there any reason why you didn't simply replace >os.path.abspath() with os.path.realpath() ? I have tried it before, but obviously, I made a mistake. >This patch uses pathlib.Path() just in one place, >leaving many call-sites of os.path.*() functions. > >If it is just a matter of your preference, >you need to convert os.path.*() for consistency >(as a follow-up patch). Keep os.path.* as os.path.realpath() works. >I see one more os.path.abspath() > > return (args.log_level, > os.path.abspath(args.directory), > args.output, > args.ar, > args.paths if len(args.paths) > 0 else [args.directory]) > >Does it cause a similar issue for the 'directory' field >with symbolic link jungles? Yes, also fixed. -- Best Regards Jialu Xu