From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,FAKE_REPLY_C, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DA22C43381 for ; Tue, 16 Mar 2021 09:52:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F25165016 for ; Tue, 16 Mar 2021 09:52:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236373AbhCPJvu (ORCPT ); Tue, 16 Mar 2021 05:51:50 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:56064 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236346AbhCPJvq (ORCPT ); Tue, 16 Mar 2021 05:51:46 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1lM6MN-0007c3-NU; Tue, 16 Mar 2021 20:51:32 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Tue, 16 Mar 2021 20:51:31 +1100 Date: Tue, 16 Mar 2021 20:51:31 +1100 From: Herbert Xu To: Linus Torvalds Cc: rong.a.chen@intel.com, lkp@intel.com, oberpar@linux.ibm.com, akpm@linux-foundation.org, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [kbuild-all] Re: [PATCH] gcov: fail build on gcov_info size mismatch Message-ID: <20210316095131.GA18709@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Newsgroups: apana.lists.os.linux.kernel User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds wrote: > > See: > > [torvalds@ryzen ~]$ a="!" [ "$a" = ".size" ] > > is fine, but > > [torvalds@ryzen ~]$ a="!" [ $a = ".size" ] > -bash: [: =: unary operator expected This isn't doing what you think it's doing. The first assignment to a is not in effect when the shell is expanding $a so what you're actually running is a="!" [ = .size ] Which is why it bombs out. To get the desired result you need a semicolon: $ a="!"; [ $a = ".size" ] $ Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0529212550720922121==" MIME-Version: 1.0 From: Herbert Xu To: kbuild-all@lists.01.org Subject: Re: [PATCH] gcov: fail build on gcov_info size mismatch Date: Tue, 16 Mar 2021 20:51:31 +1100 Message-ID: <20210316095131.GA18709@gondor.apana.org.au> In-Reply-To: List-Id: --===============0529212550720922121== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Linus Torvalds wrote: > > See: > = > [torvalds(a)ryzen ~]$ a=3D"!" [ "$a" =3D ".size" ] > = > is fine, but > = > [torvalds(a)ryzen ~]$ a=3D"!" [ $a =3D ".size" ] > -bash: [: =3D: unary operator expected This isn't doing what you think it's doing. The first assignment to a is not in effect when the shell is expanding $a so what you're actually running is a=3D"!" [ =3D .size ] Which is why it bombs out. To get the desired result you need a semicolon: $ a=3D"!"; [ $a =3D ".size" ] $ = Cheers, -- = Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --===============0529212550720922121==--