Commit Graph

10 Commits

Author SHA1 Message Date
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