Whamcloud - gitweb
LU-1345 tests: sanity test 215 non integer handling fix
authorJames Simmons <uja.ornl@gmail.com>
Fri, 4 May 2012 11:45:02 +0000 (07:45 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 8 May 2012 21:46:45 +0000 (17:46 -0400)
Sanity test 215 test the format of various /proc/sys/lnet/* files.
Some of those files are integer values but their can be times when
no valid number is available so a NA is reported. This patch
handles those cases.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I2c9ae2c56d7864099cddb456b998356f0f7c32b2
Reviewed-on: http://review.whamcloud.com/2602
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 9ee94b4..76c2a36 100644 (file)
@@ -8776,12 +8776,12 @@ check_lnet_proc_entry() {
 }
 
 test_215() { # for bugs 18102, 21079, 21517
 }
 
 test_215() { # for bugs 18102, 21079, 21517
-       local N='(0|[1-9][0-9]*)'   # non-negative numeric
-       local P='[1-9][0-9]*'       # positive numeric
-       local I='(0|-?[1-9][0-9]*)' # any numeric (0 | >0 | <0)
-       local NET='[a-z][a-z0-9]*'  # LNET net like o2ib2
-       local ADDR='[0-9.]+'        # LNET addr like 10.0.0.1
-       local NID="$ADDR@$NET"      # LNET nid like 10.0.0.1@o2ib2
+       local N='(0|[1-9][0-9]*)'       # non-negative numeric
+       local P='[1-9][0-9]*'           # positive numeric
+       local I='(0|-?[1-9][0-9]*|NA)'  # any numeric (0 | >0 | <0) or NA if no value
+       local NET='[a-z][a-z0-9]*'      # LNET net like o2ib2
+       local ADDR='[0-9.]+'            # LNET addr like 10.0.0.1
+       local NID="$ADDR@$NET"          # LNET nid like 10.0.0.1@o2ib2
 
        local L1 # regexp for 1st line
        local L2 # regexp for 2nd line (optional)
 
        local L1 # regexp for 1st line
        local L2 # regexp for 2nd line (optional)