[autotest-client-tests][PATCH 2/2] UBUNTU: SAUCE: ubuntu_nvidia_server_driver: nvidia-fs: fail the job correctly

Taihsiang Ho (tai271828) taihsiang.ho at canonical.com
Fri Jul 8 10:31:19 UTC 2022


This commit fixes the false positive of a-c-t-entry.sh, which is a
wrapper to make sure a-c-t invoke our target script in the right
directory context. The wrapper itself should fail correspondingly if the
target script fails, otherwise, there will be false positive of a-c-t
job.

Appending set -x for us to have debugging information in the future by
default, so we can reduce our debugging turn-around time. Not necessary
for returning the right status code of a failed job, but will be very
helpful for post-mortem if the job fails.

Signed-off-by: Taihsiang Ho (tai271828) <taihsiang.ho at canonical.com>
---
 ubuntu_nvidia_server_driver/nvidia-fs/a-c-t-entry.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ubuntu_nvidia_server_driver/nvidia-fs/a-c-t-entry.sh b/ubuntu_nvidia_server_driver/nvidia-fs/a-c-t-entry.sh
index 9c535270..38c3c549 100755
--- a/ubuntu_nvidia_server_driver/nvidia-fs/a-c-t-entry.sh
+++ b/ubuntu_nvidia_server_driver/nvidia-fs/a-c-t-entry.sh
@@ -1,5 +1,9 @@
 #!/usr/bin/env bash
 
+set -e
+set -x
+
+# make sure a-c-t invoke the script in the right directory context
 run_test() {
     exe_dir=$(dirname "${BASH_SOURCE[0]}")
     pushd "${exe_dir}"
-- 
2.36.1




More information about the kernel-team mailing list