public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: zhaogongyi via ltp <ltp@lists.linux.it>
To: Petr Vorel <pvorel@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] tst_kvercmp.sh: strip '+' when $(EXTRAVERSION) is blank
Date: Tue, 7 Jun 2022 02:14:54 +0000	[thread overview]
Message-ID: <3b3bb782eec842579edb890bb7282e80@huawei.com> (raw)

Hi Petr,

Yes, if EXTRAVERSION is set to "-*", it has been stripped, but EXTRAVERSION also can be set to blank and sources were modified without commit, In this case,
we run 'make clean' or 'make' would report error like:

./scripts/tst_kvercmp.sh: line 16: 5 * 65536 + 10 * 256 + 0+: syntax error: operand expected (error token is "+")
./scripts/tst_kvercmp.sh: line 17: [: -ge: unary operator expected
 
Best wishes,
Gongyi

> 
> Hi Zhao,
> 
> > $(EXTRAVERSION) defines an even tinier sublevel for pre-patches or
> > additional patches. It is usually some non-numeric string such as
> > "-pre4", and is often blank. When $(EXTRAVERSION) is blank, there may
> > be a extra '+' which shoud be stripped.
> ...
> >  r3=${r3%%-*}
> > +r3=${r3%%+*}
> 
> Is that '+' on kernel which sources were modified without commit?
> This can be on version with non-blank EXTRAVERSION, but in that case it's
> already removed by r3=${r3%%-*}, right?
> 
> LGTM
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> 
> Kind regards,
> Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

             reply	other threads:[~2022-06-07  2:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07  2:14 zhaogongyi via ltp [this message]
2022-06-07 15:04 ` [LTP] [PATCH] tst_kvercmp.sh: strip '+' when $(EXTRAVERSION) is blank Petr Vorel
  -- strict thread matches above, loose matches on Subject: below --
2022-06-06 11:36 Zhao Gongyi via ltp
2022-06-06 18:53 ` Petr Vorel

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=3b3bb782eec842579edb890bb7282e80@huawei.com \
    --to=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    --cc=zhaogongyi@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox