Commit 8b0a3d4d authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

runtime.bash: fix check for parameter files



We need to check if the file exists, not just if it is a non-empty string.
While an empty $path would have the unfortunate effect that "cat" would
read from stdin, that is not an issue as you can simply not do that.
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Reviewed-by: Andrew Jones's avatarAndrew Jones <drjones@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 420767d2
......@@ -118,7 +118,7 @@ function run()
for check_param in "${check[@]}"; do
path=${check_param%%=*}
value=${check_param#*=}
if [ "$path" ] && [ "$(cat $path)" != "$value" ]; then
if [ -f "$path" ] && [ "$(cat $path)" != "$value" ]; then
print_result "SKIP" $testname "" "$path not equal to $value"
return 2
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment