Whamcloud - gitweb
b=21962 Quote the error message in results.yaml
authorManoj Joseph <Manoj.Joseph@sun.com>
Thu, 29 Apr 2010 03:27:20 +0000 (21:27 -0600)
committerRobert Read <robert.read@oracle.com>
Thu, 29 Apr 2010 18:12:41 +0000 (11:12 -0700)
Quote and escape the error message in results.yaml

i=robert.read
i=nicolas.williams

lustre/tests/yaml.sh

index 689f474..506a1e7 100644 (file)
@@ -168,8 +168,11 @@ yml_log_sub_test() {
             return_code: $4
 EOF
     shift 4
-    printf "            error: "
-    echo $@
+    if [ -z "$*" ]; then
+        printf '            error:\n'
+    else
+        printf '            error: "%q"\n' "$*"
+    fi
 }
 
 yml_log_sub_test_log() {