Commit Graph

14 Commits

Author SHA1 Message Date
Alex Waterman
56f6646da1 unit: Fix local unit test install script
A lot of paths changed during the dGPU unit test development work.
Although that work stalled, some of the structure is still present
so fix the install script to place files in the correct location.

Change-Id: Id601fb849705f7c93ba892c81b344386b0a761b9
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2355299
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
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
vinodg
8da4c91ad5 gpu: nvgpu: move userspace firmware files to gv11b dir
Move all userspaces firmware files from firmware dir
to firmware/gv11b dir.
Fix for unit.sh test failure in local host.

Update Makefile.tmk and install-unit.sh scripts to
copy from firmware/gv11b dir.

Jira NVGPU-5144

Signed-off-by: vinodg <vinodg@nvidia.com>
Change-Id: I706af069f6796db085947278e56a8598a9e3fff2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2311071
Reviewed-by: automaticguardword <automaticguardword@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
Prateek sethi
451797a6d5 gpu: nvgpu: move userspace firmware files to gv11b
qnx unit test access ucode from /proc/boot/gv11b. QNX Unit test face
issues like permission, platform dependency etc when test tries to
access ucode from /proc/boot. To fix issue updating qnx firmware unit
to read ucode from firmware/gv11b in case of unit test. Patch also
updates firmware access path for posix as well.

Jira NVGPU-3582
Bug 2693908

Change-Id: I1b28c8475b6bc4fe5ec3d6a525cb3af152feb887
Signed-off-by: Prateek sethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2306278
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-by: Dinesh T <dt@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
Thomas Fleury
0d8eddc2e0 gpu: nvgpu: unit: copy largest libraries last
For some units that depend on libraries, tmake generates
what seems to be stub libraries, with all functions
implemented as a simple 'ret' instruction.

For instance, libfalcon_utf.so can be seen in multiple places:
du -b $(sudo find . -name libfalcon_utf.so)
7808	./nvidia/kernel/nvgpu/userspace/units/pmu-l4t_64/libfalcon_utf.so
7808	./nvidia/kernel/nvgpu/userspace/units/acr-l4t_64/libfalcon_utf.so
7808	./nvidia/kernel/nvgpu/userspace/units/falcon/falcon_tests-l4t_64/libfalcon_utf.so
76968	./nvidia/kernel/nvgpu/userspace/units/falcon-l4t_64/libfalcon_utf.so
76968	./systemimage/home/nvgpu_unit/units/libfalcon_utf.so

The "real" library is in falcon-l4t_64/, and it contains actual code.

But install-unit.sh copies all *.so files to nvgpu_unit/units on target.
In some cases, we end up with a "stub" library being used instead of
the expected one.

To avoid this, make sure to copy the largest libraries (in bytes) last.
Also, remove the '-u' option of rsync to force the copy.

Jira NVGPU-4089

Change-Id: I3832373db9c5aa72ad9ce59eb09ec031609a69e4
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2215319
GVS: Gerrit_Virtual_Submit
Reviewed-by: Philip Elcan <pelcan@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>
2020-12-15 14:10:29 -06:00
vinodg
ff4610e910 gpu: nvgpu: unit: add gr_prepare test
Add support gr_prepare for sw and hw.
Add needed registers using nvgpu_posix_io_add_reg_space calls.

Add unit tests covering following functions
nvgpu_gr_prepare_sw
nvgpu_gr_enable_hw

install-unit.sh modified to copy the firmware binaries under
nvgpu-unit/firmware directory

Currently the gr_init_prepare test is called as part of the
gr_config test, later this will be moved as separate unit test.

Jira NVGPU-3582
Bug 2693908

Change-Id: If8f5ac4988deba0db477b2177981f7912bdb8eec
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2191254
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:05:52 -06:00
Bo Yan
df8f8e24b2 Revert "gpu: nvgpu: unit: add gr_prepare tests"
This reverts commit 9bfdb2ba03f90f0cf828f08b99101a3a3e6c4532.

Bug 2693908

Change-Id: I3ef56773e46aad3626f16b84ea5e51c2fdcc3f1c
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2189200
2020-12-15 14:01:33 -06:00
vinodg
ac8afda036 gpu: nvgpu: unit: add gr_prepare tests
Add support gr_prepare for sw and hw.
Add needed registers using nvgpu_posix_io_add_reg_space calls.

Add unit tests covering following functions
nvgpu_gr_prepare_sw
nvgpu_gr_enable_hw

Copy the falcon ucode binaries under userspace/firmware
directory
install-unit.sh modified to copy the firmware binaries
under nvgpu-unnit/firmware directory

Jira NVGPU-3582

Change-Id: If2131d2c48e828251208da86688b0594e62de82e
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2184293
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:00:13 -06: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
Nicolas Benech
904cd50026 gpu: nvgpu: unit: script to automate gcov
A new script, gcov.sh, can check and install missing dependencies,
run unit tests, run gcov and present the results in the browser.

JIRA NVGPU-1246

Change-Id: Ic225ac5d397efd539d14a358671a3c20460c277e
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1954049
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-12-04 10:25:28 -08:00
Nicolas Benech
0659ff2985 gpu: nvgpu: unit: fix typo in install script
A typo could cause the find/exec command to fail in the
install_unit.sh script.

JIRA NVGPU-1246

Change-Id: I0dd33954945f88d96c8704d863ac26a241af7b94
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1954030
Reviewed-by: Philip Elcan <pelcan@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>
2018-12-04 10:25:24 -08:00
Nicolas Benech
99384a67b5 gpu: nvgpu: unit: install-unit: Handle subfolders
Now that some unit modules are in subfolders, this script
needed an update as well. All module .so are now searched
and all copied to the nvgpu_unit/units/ folder on target.

JIRA NVGPU-1246

Change-Id: I1da639006a0012c8a2d1e19b8b2bddd0b6376b67
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1943578
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Philip Elcan <pelcan@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-11-06 21:57:40 -08:00
Philip Elcan
e2c08f4f7b gpu: nvgpu: unit: install-unit: check for -next
Check for nvgpu-next before trying to copy it to the target. This avoids
an error message when the directory doesn't exist.

Change-Id: I0e195779c7bd53c19e3e5e2ce0aaa4ac4c5c653d
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1935594
Reviewed-by: Nicolas Benech <nbenech@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@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>
2018-10-30 15:36:20 -07:00
Alex Waterman
1f1134544d gpu: nvgpu: unit: Add script to install unit tests
Add a script to install unit tests on a target jetson board.
The installation consists of copying all the binaries generated
by tmake over to that target board and building a source tree
that matches the nvgpu code.

The reason the systemimage out directory is not used is this
is created by the `image createfs' command during the build
process. This script will work after just a simple `tmm[p]'

Change-Id: I1f2650e666a42c12762ab444159b69ba8fc582f8
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1850545
Reviewed-by: Philip Elcan <pelcan@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:09 +05:30