Hi,
I still found qa/903 failing on one of my virtual machines due to the
$num_metrics variable being unset. This patch fixes the issue.
>From 09e8ba9efaf1ba7a84fa9a134e86971e3e340144 Mon Sep 17 00:00:00 2001
From: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed, 15 Apr 2015 13:48:50 -0400
Subject: [PATCH] Correct 903 testcase where no papi counters are available
qa/903 - $num_couters variable is not set in cases where there are no papi
counters,
not just a value of 0 should be checked.
Signed-off-by: Lukas Berk <lberk@xxxxxxxxxx>
---
qa/903 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qa/903 b/qa/903
index dafaff3..6cfdadd 100755
--- a/qa/903
+++ b/qa/903
@@ -47,7 +47,7 @@ pmdapapi_install()
$sudo ./Install </dev/null >$tmp.out 2>&1
# some warnings are reasonable (e.g., too many concurrent counters)
num_metrics=`$sudo pminfo -f papi.available.num_counters | grep value |
awk '{print $2}'`
- if [ "$num_metrics" -eq "0" ]; then
+ if [ -z "$num_metrics" ] || [ "$num_metrics" -eq "0" ]; then
_notrun "PAPI metrics not found on hardware"
fi
# Check papi metrics have appeared ... X metrics and Y values
--
2.1.0
|