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 <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2204721
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-by: Joshua Widen <jwiden@nvidia.com>
Tested-by: Joshua Widen <jwiden@nvidia.com>
This commit is contained in:
Alex Waterman
2019-09-24 08:31:44 -07:00
parent f779eb8e9a
commit ec9e8bcbc7

View File

@@ -36,8 +36,12 @@ if [ -f nvgpu_unit ]; then
# target, so use that dir structure # target, so use that dir structure
LD_LIBRARY_PATH=".:units" LD_LIBRARY_PATH=".:units"
cores=$(cat /proc/cpuinfo |grep processor |wc -l) 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 \ NVGPU_UNIT="./nvgpu_unit --nvtest --unit-load-path units/ --no-color \
--num-threads $cores" --num-threads 1"
else else
# running on host # running on host
LD_LIBRARY_PATH="build:build/units" LD_LIBRARY_PATH="build:build/units"