Re: [LTP] [PATCH] tst_kvercmp.sh: strip '+' when $(EXTRAVERSION) is blank

Petr Vorel
2022-06-07T15:04:57Z

Hi Zhao,

> 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

Thanks for info, merged.

For removing trailing + just single % would be enough, but two should not harm,
therefore I merged it without modification.

Kind regards,
Petr

> Best wishes,
> Gongyi