runtime: SKIP if required sysfs file is missing
Paolo Bonzini
maintainerPATCH 1/1 runtime: SKIP if required sysfs file is missing
This fixes the test once more, so that we correctly skip for example access-reduced-maxphyaddr on AMD processors.
Signed-off-by Paolo Bonzini <[email protected]>
--- scripts/runtime.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/runtime.bash +1 -1
@@ -118,7 +118,7 @@ function run() for check_param in "${check[@]}"; do path=${check_param%%=*} value=${check_param#*=} - if [ -f "$path" ] && [ "$(cat $path)" != "$value" ]; then + if ! [ -f "$path" ] || [ "$(cat $path)" != "$value" ]; then print_result "SKIP" $testname "" "$path not equal to $value" return 2 fi
Signature · 1 line
2.26.2
Quoted 24 lines · Paolo Bonzini
This fixes the test once more, so that we correctly skip for example access-reduced-maxphyaddr on AMD processors.
Signed-off-by Paolo Bonzini <[email protected]>--- scripts/runtime.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/runtime.bash +1
-1@@ -118,7 +118,7 @@ function run() for check_param in "${check[@]}"; do path=${check_param%%=*} value=${check_param#*=} - if [ -f "$path" ] && [ "$(cat $path)" != "$value" ]; then + if ! [ -f "$path" ] || [ "$(cat $path)" != "$value" ]; then print_result "SKIP" $testname "" "$path not equal to $value" return 2 fiSignature · 1 line
2.26.2
Reviewed-by Andrew Jones <[email protected]>