]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Allow spaces in path to virt-aa-helper
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 25 Mar 2024 11:42:50 +0000 (12:42 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 15 Apr 2024 07:28:32 +0000 (09:28 +0200)
The virt-aa-helper bash script constructs a path to itself when
it runs. But it isn't prepared for the case when there is a space
in the path leading to the script (something, something, double
quotes, something).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/virt-aa-helper-test

index 9a97168330fc1726fbe1ebea145c1a74462966c0..4c8d31c9d7f5160dac1564f57b2e0189cf08c54e 100755 (executable)
@@ -130,9 +130,9 @@ testme() {
     echo "': " >$output
     set +e
     if [ -n "$input" ]; then
-        LD_LIBRARY_PATH="$ld_library_path" $exe $extra_args $args < $input >"$tmpout" 2>&1
+        LD_LIBRARY_PATH="$ld_library_path" "${exe}" $extra_args $args < $input >"$tmpout" 2>&1
     else
-        LD_LIBRARY_PATH="$ld_library_path" $exe $extra_args $args >"$tmpout" 2>&1
+        LD_LIBRARY_PATH="$ld_library_path" "${exe}" $extra_args $args >"$tmpout" 2>&1
     fi
     rc="$?"
     cat "$tmpout" >"$output"