]> www.infradead.org Git - users/hch/blktests.git/commitdiff
common/rc: _have_iproute2 fix for "ip -V" change
authorYi Zhang <yi.zhang@redhat.com>
Thu, 26 Nov 2020 08:35:31 +0000 (16:35 +0800)
committerOmar Sandoval <osandov@fb.com>
Mon, 4 Jan 2021 22:41:42 +0000 (14:41 -0800)
With below 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

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
common/rc

index 0d7a3cd81adf556828ac3b300e860139d94bb07b..37eb873891f0993651f9180d3c696778e2de0d47 100644 (file)
--- 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