From 49c1b76c043516d163f43742da69cdd5ea3874c6 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Fri, 4 May 2012 07:45:02 -0400 Subject: [PATCH] LU-1345 tests: sanity test 215 non integer handling fix 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 Change-Id: I2c9ae2c56d7864099cddb456b998356f0f7c32b2 Reviewed-on: http://review.whamcloud.com/2602 Reviewed-by: Yu Jian Tested-by: Hudson Tested-by: Maloo Reviewed-by: Minh Diep Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 9ee94b4..76c2a36 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -8776,12 +8776,12 @@ check_lnet_proc_entry() { } 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) -- 1.8.3.1