All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Alexander Bulekov <alxndr@bu.edu>
Cc: Qiuhao Li <Qiuhao.Li@outlook.com>,
	qemu-devel@nongnu.org, Darren Kenny <darren.kenny@oracle.com>,
	Bandan Das <bsd@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH] fuzz: fix unbound variable in build.sh
Date: Wed, 8 Sep 2021 07:53:27 +0200	[thread overview]
Message-ID: <97821a92-b067-7527-c1ec-5b1469fcab58@redhat.com> (raw)
In-Reply-To: <20210907125108.44h7vpprunbb7yy4@mozz.bu.edu>

On 07/09/2021 14.51, Alexander Bulekov wrote:
> On 210907 1432, Thomas Huth wrote:
>> On 07/09/2021 13.08, Alexander Bulekov wrote:
>>> /src/build.sh: line 76: GITLAB_CI: unbound variable
>>> Fix that.
>>>
>>> Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
>>> ---
>>>
>>> This change is in preparation to revert:
>>> 7602748c ("qemu: manually build glib (#5919)") on OSS-Fuzz.
>>> Reverting as-is produces an unbound variable complaint when we try to
>>> build the fuzzers in the OSS-Fuzz container.
>>>
>>>    scripts/oss-fuzz/build.sh | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh
>>> index 98b56e0521..5ddc769c9c 100755
>>> --- a/scripts/oss-fuzz/build.sh
>>> +++ b/scripts/oss-fuzz/build.sh
>>> @@ -73,7 +73,7 @@ if ! make "-j$(nproc)" qemu-fuzz-i386; then
>>>              "\nFor example: CC=clang CXX=clang++ $0"
>>>    fi
>>> -if [ "$GITLAB_CI" != "true" ]; then
>>> +if [ -z ${GITLAB_CI+x} ]; then
>>
>> My bash-foo is really not the best, but shouldn't there be a colon in there,
>> i.e. ${GITLAB_CI:+x} ?
> 
> I think the difference is that GITLAB_CI+x only checks if GITLAB_CI is
> set, while GITLAB_CI:+x checks that it is set and non-null.
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
> 
> I don't think that makes much of a difference here.

TIL, and I agree that it does not make a difference here (and if it would, 
your variant is certainly better).

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2021-09-08  5:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 11:08 [PATCH] fuzz: fix unbound variable in build.sh Alexander Bulekov
2021-09-07 11:43 ` Darren Kenny
2021-09-07 12:32 ` Thomas Huth
2021-09-07 12:51   ` Alexander Bulekov
2021-09-08  5:53     ` Thomas Huth [this message]
2021-09-08  6:06 ` Paolo Bonzini
2021-09-08 10:43   ` Darren Kenny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97821a92-b067-7527-c1ec-5b1469fcab58@redhat.com \
    --to=thuth@redhat.com \
    --cc=Qiuhao.Li@outlook.com \
    --cc=alxndr@bu.edu \
    --cc=bsd@redhat.com \
    --cc=darren.kenny@oracle.com \
    --cc=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.