From ec9e8bcbc7f6a240826b7684dd3b765290f1f4e6 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Tue, 24 Sep 2019 08:31:44 -0700 Subject: [PATCH] gpu: nvgpu: Use single threaded unit testing The parallel unit testing is simply too buggy due to unit tests not being completely independent. We need to determine exactly what they are sharing and get rid of that. For now, force unit tests to run one at a time. This should help avoid many of the race conditions we see. Bug 2711887 Change-Id: I04de51998b907d2c2195ea56f6092bbf76ffa1e3 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/2204721 Reviewed-by: Vinod Gopalakrishnakurup Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Thomas Fleury Reviewed-by: Joshua Widen Tested-by: Joshua Widen --- userspace/unit.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/userspace/unit.sh b/userspace/unit.sh index de85b5c91..f7c706ee6 100755 --- a/userspace/unit.sh +++ b/userspace/unit.sh @@ -36,8 +36,12 @@ if [ -f nvgpu_unit ]; then # target, so use that dir structure LD_LIBRARY_PATH=".:units" cores=$(cat /proc/cpuinfo |grep processor |wc -l) + + # Ignore number of cores for now; it seems that the parallel unit + # tests are just too buggy and that they really don't save much + # actual computing time. NVGPU_UNIT="./nvgpu_unit --nvtest --unit-load-path units/ --no-color \ - --num-threads $cores" + --num-threads 1" else # running on host LD_LIBRARY_PATH="build:build/units"