diff mbox series

[blktests,4/5] common/rc: _have_iproute2 fix for "ip -V" change

Message ID 20201124010427.18595-5-yi.zhang@redhat.com (mailing list archive)
State New, archived
Headers show
Series nvmeof-mp/srp/nvme-rdma misc fix and enhancement | expand

Commit Message

Yi Zhang Nov. 24, 2020, 1:04 a.m. UTC
With bellow commit, the version will be updated base on the tag
fbef6555 replace SNAPSHOT with auto-generated version string

To reproduce it:
$ ./check srp/015
common/rc: line 98: [: ip utility, iproute2-5.9.0: integer expression expected

Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bart Van Assche Nov. 24, 2020, 3:29 a.m. UTC | #1
On 11/23/20 5:04 PM, Yi Zhang wrote:
> With bellow commit, the version will be updated base on the tag
       ^^^^^^
       below?
> fbef6555 replace SNAPSHOT with auto-generated version string

Thanks,

Bart.
Yi Zhang Nov. 24, 2020, 2:07 p.m. UTC | #2
On 11/24/20 11:29 AM, Bart Van Assche wrote:
> On 11/23/20 5:04 PM, Yi Zhang wrote:
>> With bellow commit, the version will be updated base on the tag
>         ^^^^^^
>         below?
Thanks, will update it in the v2

>> fbef6555 replace SNAPSHOT with auto-generated version string
> Thanks,
>
> Bart.
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
>
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index 0d7a3cd..37eb873 100644
--- a/common/rc
+++ b/common/rc
@@ -95,7 +95,7 @@  _have_iproute2() {
 		SKIP_REASON="ip utility not found"
 		return 1
 	fi
-	if [ "$snapshot" -lt "$1" ]; then
+	if [[ "$snapshot" =~ ^[0-9]+$ && "$snapshot" -lt "$1" ]]; then
 		SKIP_REASON="ip utility too old"
 		return 1
 	fi