Commit Graph

14 Commits

Author SHA1 Message Date
Thomas Fleury
4f682bf107 gpu: nvgpu: igpu and dgpu driver libs
Different build flags are used for iGPU and dGPU in
safety build. In order to support dGPU in unit tests,
a separate library is needed for the driver.

Added makefiles to build:
- libnvgpu-drv-igpu.so
- libnvgpu-drv-dpgu.so

Updated scripts and units makefiles to use libnvgpu-drv-igu
by default.

Jira NVGPU-5217

Change-Id: Ibcc56088723cec5cb2d0ac42725102ae0c886014
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2333499
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Nicolas Benech
fee7b81061 gpu: nvgpu: unit: required tests system
When running unit testing, we need to ensure that all expected unit
tests were actually run. This used to be done by an external Python
script, but it is not suitable for some OSes. This patch brings this
mechanism into the unit testing framework, and makes use of an INI
file to provide the list of expected tests.

JIRA NVGPU-3072

Change-Id: I9ed590de9005fe10324c594ea33ebc8fda482019
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2317220
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Alex Waterman
ec9e8bcbc7 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>
2020-12-15 14:05:52 -06:00
Nicolas Benech
f09d19d5a3 gpu: nvgpu: unit: force gcov.sh to use a single thread
On some host OSes, the OS may allocate virtual addresses that are
larger than can be handled by NVGPU. As a workaround, we noticed
that the host OS will not allocate such large addresses when
running single threaded. There is no other way to prevent this
issue nor is there any guarantee that this workaround will always
work...

JIRA NVGPU-1246

Change-Id: I8c89cf6be9f80bd6fb18fd1688037b9144d2d21c
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2135370
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-06-14 17:36:34 -07:00
Alex Waterman
c28546d545 gpu: nvgpu: Remove `-v' from unit.sh on L4T
When running the unit tests on an L4T target in GVS the `-v' argument
is specified in the unit test framework. This results in many megabytes
of text logs getting dumped by the pd_cache tests. These logs consist
of seemingly endless:

  02:00     5: 00:55    27: nvgpu: gpu.USS       nvgpu_pd_cache_alloc_direct:165  [DBG ]  PD-Alloc [D] 4096 bytes
  02:00     5: 00:55    27: nvgpu: gpu.USS       nvgpu_pd_cache_alloc_direct:165  [DBG ]  PD-Alloc [D] 4096 bytes
  02:00     5: 00:55    27: nvgpu: gpu.USS       nvgpu_pd_cache_alloc_direct:165  [DBG ]  PD-Alloc [D] 4096 bytes
  02:00     5: 00:55    27: nvgpu: gpu.USS       nvgpu_pd_cache_alloc_direct:165  [DBG ]  PD-Alloc [D] 4096 bytes

This isn't very useful for debugging and generally clogs this log to
a point where finding error messages is really time consuming.

Change-Id: Idd0ee1bba7426448ed88f825344f7eddcb6b90ef
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2127436
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-05-30 11:25:57 -07:00
Philip Elcan
bb61fc110b gpu: nvgpu: unit: add test levels to required test tracking
Add tracking of test levels to the required test mechanism in the unit
test framework. The json output will now include the test level. This
will allow runs with just level 0 tests to correctly verify the right
tests run.

JIRA NVGPU-3200

Change-Id: Ifc7c7ad5b605487945e0406d387f54ba04f1680d
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2103515
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-04-24 16:54:18 -07:00
Philip Elcan
91669ac61e gpu: nvgpu: unit: track time for test modules
When run with '-v' option, the unit tests will include the execution
time for each test module in seconds. E.g.

  [C] Module completed: posix_bitops (execution time: 0.607291)

Update unit.sh to run with -v option on target to get data for GVS runs
if tests start timing out.

Change-Id: I2a38ac458c5a5809777df33635e271e4dc9727de
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2082015
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-03-28 08:14:55 -07:00
Nicolas Benech
ccb4c67a1b gpu: nvgpu: unit: Test execution verification
When running unit tests, a log of all executed tests is
generated. A script along with the "required_tests.json"
will check that all required tests were effectively run, thus
ensuring that no tests are silently missing. The "testlist.py"
support script is also used to generate the list of required
tests, and can also generate an HTML-formatted output with links
to JAMA requirements wherever possible.

JIRA NVGPU-1717

Change-Id: Ic361b1d0a5f003f8b24952d63e20fb496dd1e787
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1983631
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-01-04 15:23:59 -08:00
Alex Waterman
bf51b0cdf7 gpu: nvgpu: Update license for some scripts
Update (or add) the MIT license for several scripts in the nvgpu
code.

Change-Id: I3724c3cf22358773cc7dcaa8a8bb8acba439d216
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1946911
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2018-11-12 15:46:49 -08:00
Philip Elcan
45db303354 gpu: nvgpu: unit: update params for on target runs
When run on target, presumably as part of GVS, we need to run
multithreaded, without colors and with the nvtest output. This updates
unit.sh to apply those params on target.

Also use the long parameter names since they should be self documenting.

JIRA NVGPU-1042

Change-Id: I27f0d1371df9b553262e1ebe1e4b258202c322d2
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1924617
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2018-10-18 13:44:32 -07:00
Philip Elcan
334f5869c9 gpu: nvgpu: unit: add output to make nvtest happy
This adds the correct output for the nvtest interpreter in GVS to track
the per-test pass/fails.

JIRA NVGPU-1042

Change-Id: I7f4a1a63c64988520db08029231f0db9deeaee7d
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1850293
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2018-10-12 17:35:10 +05:30
Philip Elcan
24a678ea81 gpu: nvgpu: unit: run test in right path
This make sure we're in the assumed path for running the unit fw.
This is done for GVS/nvgpu_submit.

JIRA NVGPU-1042

Change-Id: I7dfc874fdde2d97d543c25ac139db23f723985a1
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1848120
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2018-10-12 17:35:10 +05:30
Philip Elcan
bf99dfdaf2 gpu: nvgpu: unit: update unit.h for target
The directory structure is every so slightly different on target, so
this handles the differences.

JIRA NVGPU-1042

Change-Id: I5a0566c7d371fcb5cd541c71841e8acedfaac6e2
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1837443
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2018-09-24 15:54:55 -07:00
Alex Waterman
691bf90445 gpu: nvgpu: unit: Add unit testing FW
Full documentation for this is in the unit testing
confluence page.

JIRA NVGPU-525
Bug 2261555

Change-Id: I463e6267eb0eb12b7313f8b275266e8faabe5ccf
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1683915
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2018-08-09 23:11:06 -07:00