selftests/bpf: Propagate error code of the command to vmtest.sh
authorKP Singh <kpsingh@google.com>
Thu, 25 Feb 2021 16:19:47 +0000 (16:19 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 26 Feb 2021 21:12:52 +0000 (13:12 -0800)
commit2854436612c4d2606c9246ce2976ab6634276337
tree6324dbf308f734e6e8f43a130d770c1f72f229d1
parent1e0ab70778bd86a90de438cc5e1535c115a7c396
selftests/bpf: Propagate error code of the command to vmtest.sh

When vmtest.sh ran a command in a VM, it did not record or propagate the
error code of the command. This made the script less "script-able". The
script now saves the error code of the said command in a file in the VM,
copies the file back to the host and (when available) uses this error
code instead of its own.

Signed-off-by: KP Singh <kpsingh@google.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210225161947.1778590-1-kpsingh@kernel.org
tools/testing/selftests/bpf/vmtest.sh