Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2969993pxf; Sun, 14 Mar 2021 19:34:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9rtQLv7NeTicMMbtyqDVfkUP0msLq1YdDnlUdBRVQ+poMjcAWTl5p68GX/n/0+XstaYZB X-Received: by 2002:aa7:ccd7:: with SMTP id y23mr27637123edt.190.1615775670627; Sun, 14 Mar 2021 19:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615775670; cv=none; d=google.com; s=arc-20160816; b=gzHbsQnvxyhgaSC34hPtUcdkVhoNfqeSFCRGSy8KSzoR8H/uaUYyG0Czi8havK5XCr my0xBJkq+c2dyz/drgnGb8xDQmXpbPWDfBXHtic9tLf5YbfLyJ3gB/F4w7HcpBqnCg+c N44mrU5UGiQX4zUlGzWDVLVrLJ4OezC2bAksHKQrEYg0uq9uGU8Nbj7Fa9JBT9FnLwcw MhVj8HHMlE269U76UfrMMmp+G1r13p0T90kYWfdHW5AVjK8F9KMyt1kBLi7CWL2qYS9L gEsMKotoCtyBT4sdRAqEuFpJ73pT/ShWzmAScINEI42H5VuDljIC3uahS0tLHVgfl6FS Bhiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=8MJEXtmaEnJnug7yNUZHR02Yz6lbO3BYiqUWyBX9/Pg=; b=cG6+/HmmUEp4ve1GEpPE7+leckeVSJLULKlPEf7JTxiIJH3QOIP6oSTSSgT7oBcUz2 z29Y8xmM+/BIDYIjl78c4no5W4RAuwjktZOs5UyNRBCf4TBcgSZvPXckUNDTByabe58v JsfmvC4K9KQsXZkCQr5bIc814xoOgjoC4BaosynYx/2ax3e6aqBsd0K9/KmcoQVu9VTU CZ+lKLlGxptyf8luCaTAR4pp4Ra0YADW/TbFwhTIqwD2gycetk2xp5EhKC9/kCnhKTX+ OZguSiJTwLtFo7bvcJOpjYzq1u6O2wEzHxleeQ4Xxc5/EMVnZS/k9Y5GWdli5rctJT5m oTOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rl1si9330852ejb.115.2021.03.14.19.34.07; Sun, 14 Mar 2021 19:34:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229679AbhCOCcv (ORCPT + 99 others); Sun, 14 Mar 2021 22:32:51 -0400 Received: from mga14.intel.com ([192.55.52.115]:30761 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbhCOCcg (ORCPT ); Sun, 14 Mar 2021 22:32:36 -0400 IronPort-SDR: /htU0sR2WskbsACLvmL9wPOxKceUcAVtJpdZAtKBb8JGz73usCdsyP2bny/uoBcVCf7/NvncAg u3y0VffW7GaA== X-IronPort-AV: E=McAfee;i="6000,8403,9923"; a="188387351" X-IronPort-AV: E=Sophos;i="5.81,249,1610438400"; d="scan'208";a="188387351" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2021 19:32:36 -0700 IronPort-SDR: qiRYHTeyZJR7NNbv0bBzWEpKYT2uQJMAMugrpDkwcuexGTShOrbDwqh8zaQk/w57fJeu3S08Fw v0TZ00EqNidw== X-IronPort-AV: E=Sophos;i="5.81,249,1610438400"; d="scan'208";a="411686099" Received: from shao2-debian.sh.intel.com (HELO [10.239.13.11]) ([10.239.13.11]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2021 19:32:34 -0700 Subject: Re: [kbuild-all] Re: [PATCH] gcov: fail build on gcov_info size mismatch To: Linus Torvalds Cc: kernel test robot , Peter Oberparleiter , Andrew Morton , kbuild-all@lists.01.org, Linux Kernel Mailing List References: <20210311130328.2859337-1-oberpar@linux.ibm.com> <202103120329.VU4uJ0yZ-lkp@intel.com> From: Rong Chen Message-ID: <09373c3d-73e8-933a-24ad-5c4ba4fdc615@intel.com> Date: Mon, 15 Mar 2021 10:31:49 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/13/21 1:52 AM, Linus Torvalds wrote: > On Thu, Mar 11, 2021 at 7:50 PM Rong Chen wrote: >> >> The issue is from a=!, and [ "$a $b" = ".size .LPBX0," ] can avoid the >> error. >> >> + [ ! = .size -a ABI = .LPBX0, ] >> ./kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator > But that's not what the patch did. > > The patch used quotes around $a, so "$a" should still be fine. > > See: > > [torvalds@ryzen ~]$ a="!" [ "$a" = ".size" ] > > is fine, but > > [torvalds@ryzen ~]$ a="!" [ $a = ".size" ] > -bash: [: =: unary operator expected > > and the patch I saw, and that the test robot replied to, had that > correct quoting, afaik. > > So I still don't see what the test robot is complaining about. Was > there an earlier version of the patch without the quotes that I didn't > see? > > Or is the shell on the test robot doing something really really odd, > and it's somehow nds32-specific? > > Linus Hi Linus, It can be reproduced with '-a' option in dash:     $ a="!"     $ [ "$a" = ".size" ]     $ [ "$a" = ".size" -a "$b" = ".LPBX0," ]     sh: 2: [: =: unexpected operator and there is a advice for the option at https://wiki.ubuntu.com/DashAsBinSh, I'm not sure it's the best practice or not.     While dash supports most uses of the -a and -o options, they have very confusing semantics even in bash and are best avoided. Commands like the following:         [ \( "$foo" = "$bar" -a -f /bin/baz \) -o ! -x /bin/quux ]     should be replaced with:         (([ "$foo" = "$bar" ] && [ -f /bin/baz ]) || [ ! -x /bin/quux ]) Best Regards, Rong Chen