Peter Daifuku
f0f126d7cc
gpu: nvgpu: posix: fix GPL dependencies in bitmap
...
Fix up GPL issues in posix version of bitops.
Bug 2919200
Change-Id: I57fdb035b811f47e119cca2278431d3701717d89
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2340983
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: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Alex Waterman <alexw@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
Alex Waterman
5f0fdf085c
nvgpu: unit: Add new mock register framework
...
Many tests used various incarnations of the mock register framework.
This was based on a dump of gv11b registers. Tests that greatly
benefitted from having generally sane register values all rely
heavily on this framework.
However, every test essentially did their own thing. This was not
efficient and has caused a some issues in cleaning up the device and
host code.
Therefore introduce a much leaner and simplified register framework.
All unit tests now automatically get a good subset of the gv11b
registers auto-populated. As part of this also populate the HAL with
a nvgpu_detect_chip() call. Many tests can now _probably_ have all
their HAL init (except dummy HAL stuff) deleted. But this does
require a few fixups here and there to set HALs to NULL where tests
expect HALs to be NULL by default.
Where necessary HALs are cleared with a memset to prevent unwanted
code from executing.
Overall, this imposes a far smaller burden on tests to initialize
their environments.
Something to consider for the future, though, is how to handle
supporting multiple chips in the unit test world.
JIRA NVGPU-5422
Change-Id: Icf1a63f728e9c5671ee0fdb726c235ffbd2843e2
Signed-off-by: Alex Waterman <alexw@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2335334
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
ajesh
ef5935c7b3
gpu: nvgpu: update the thread swuts
...
Fix issue with the targets paragraph in thread SWUTS.
Jira NVGPU-4910
Change-Id: If2ab7d05f3e0de2fefe09f5dede7e1c55603dbe1
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2298588
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@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
Petlozu Pravareshwar
c2fbc99967
gpu: nvgpu: Address Vectorcast gap for posix queue
...
Update unit test for posix queue unit to cover Vectorcast gap.
Jira NVGPU-4478
Change-Id: I0d79861f173d511d25cf45051c399e3193eabdbe
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2294146
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Prateek sethi
51913163a6
gpu: nvgpu: Remove nvgpu_hr_timestamp from safety build
...
nvgpu_hr_timestamp() is not being called from any safe API, so it cab
be removed from the safety build. Patch moves this function and unit
test covers this function to under CONFIG_NVGPU_NON_FUSA flag.
Jira NVGPU-4994
Change-Id: I47d5c22b5a407626d75b10c1c67cdb3e765397b9
Signed-off-by: Prateek sethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2292895
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
ajesh
b342b29600
gpu: nvgpu: add tests for posix thread
...
Add more tests as part of Thread unit test to increase the
branch coverage.
Move struct instances to C file as part of cleanup.
Jira NVGPU-4478
Change-Id: Ie750f67a38abecae4d85327e002d3163539bfef0
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2292278
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@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
ajesh
33c9379b8b
gpu: nvgpu: add test for thread unit
...
Add test as part of Thread UT to increase the branch coverage.
Jira NVGPU-4478
Change-Id: I774e9677fde51d33505081d33193c93ef25617a9
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2291448
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
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 >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Nicolas Benech
f97335e723
gpu: nvgpu: unit: update bug SWUTS for nvgpu_assert
...
Adds nvgpu_assert to bug SWUTS.
JIRA NVGPU-3510
Change-Id: I7fcb00cf435d70d5536a783ad0fd4c159a77a0e3
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2289244
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
Reviewed-by: Alex Waterman <alexw@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
ajesh
d794ec926c
gpu: nvgpu: add unit tests for log2
...
Add unit tests for posix log2 unit.
Fix the build issue with rounddown_pow_of_two macro.
Jira NVGPU-4417
Change-Id: I244aa4ae2f8c5e682e263784b4efbf9cd372379e
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286955
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
ajesh
d4d5da4aa0
gpu: nvgpu: add tests for circ_buf
...
Add unit tests for posix circ_buf unit.
Jira NVGPU-4417
Change-Id: Ic0b04961cdd7813aed6f9b16fd0724b0e3cfeb2a
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2287141
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
ajesh
8d346debaa
gpu: nvgpu: add more tests for bitops
...
Add more tests as part of Bitops UT.
Jira NVGPU-4478
Change-Id: Ibb81e570385ab223d0f0f4a655da2e22733bd139
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284700
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@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
ajesh
9f021d2658
gpu: nvgpu: add more tests for utils
...
Add more tests as part of utils UT.
Jira NVGPU-4478
Change-Id: Iaf8f29cd78b03a6a62a15dab11b67f91197eadce
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284342
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Alex Waterman <alexw@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
75175d8081
gpu: nvgpu: unit: more traceability for fifo
...
Add/fix 'Targets:' statements for:
- nvgpu_engine_status_get_ctx_id_type
- nvgpu_engine_status_get_next_ctx_id_type
- gm20b_pbdma_reset_method
- gm20b_pbdma_restartable_0_intr_descs
- gm20b_pbdma_disable_and_clear_all_intr
- gm20b_pbdma_clear_all_intr
- gm20b_pbdma_get_fc_target
- nvgpu_bug_exit
- nvgpu_bug_cb_from_node
Jira NVGPU-4890
Change-Id: I984542aa7daace85843fe6858d7c27b310046b28
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284481
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
ajesh
eac3137c60
gpu: nvgpu: add more tests for bug
...
Add more tests as part of Bug UT.
Jira NVGPU-4478
Change-Id: If9141ded41e9b9e97d03fa26c7404b85fa253014
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284669
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@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
Petlozu Pravareshwar
61b14b226f
gpu: nvgpu: Update unit test for posix queue unit
...
Update unit test for posix queue unit to cover a missing branch.
Also add posix queue SWUTS file path in "SWUTS.sources".
Jira NVGPU-4478
Change-Id: Ib32969bc358d76686a03708f120da7da113c9533
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2282988
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
ajesh
4bcd419a0b
gpu: nvgpu: add unit tests for utils unit
...
Add unit tests for posix utils unit.
Jira NVGPU-4478
Change-Id: I426e2b8cc7ed508f4e66db3796ab21eb3ce3e85f
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2282760
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
ajesh
fbafc9e05c
gpu: nvgpu: units: swuts: Update SWUTS details
...
Update Posix SWUTS with following additions
- Add os_sched unit
- Add rwsem unit
- Modify the details for bitops unit
Jira NVGPU-4478
Change-Id: I196ce05f01a51d8a773f87f3e5446eda19e6a861
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2282304
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
ajesh
97718da708
gpu: nvgpu: add test for bug unit
...
Add a new test for warn message functionality as part of bug UT.
Jira NVGPU-4478
Change-Id: I2a250e4f6dc6946027e995ec3f340bb113c60f58
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2281019
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@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:10:29 -06:00
ajesh
e7f55f668d
gpu: nvgpu: unit: swuts: add posix bug
...
Add posix bug unit to SWUTS.
Jira NVGPU-4478
Change-Id: I37fb087952414d1083b268ad2bbf38def40ef189
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280348
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Petlozu Pravareshwar
ee255ef8eb
gpu: nvgpu: add unit tests for posix queue unit
...
Add unit tests for posix queue unit.
Jira NVGPU-4478
Change-Id: I0a0e39be5e350d34c3546d177abfc523e174d607
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275967
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
ajesh
26076a6aa0
gpu: nvgpu: add more tests for thread
...
Add more tests as part of unit test for thread unit.
Jira NVGPU-4478
Change-Id: Ib2464a28c73124b4e85d9e3ab19c79258d6b81fe
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275534
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shashank Singh <shashsingh@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@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
ajesh
f22f08cdc9
gpu: nvgpu: add more tests for cond unit
...
Add more tests as part of unit tests for condition variables.
Jira NVGPU-4478
Change-Id: I6256727b2174759a71fb1a3fecd18dde5dcdd9cd
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2274149
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: Shashank Singh <shashsingh@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
Vedashree Vidwans
318bd53f1d
gpu: nvgpu: unit: modify posix-timers unit test
...
Modify posix-timers unit test to improve coverage for modified posix
timer functions.
Jira NVGPU-4675
Change-Id: I5ce915db9046df333a6ba782d5b68b05d6977496
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275291
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Thomas Fleury
1a3c1ee984
gpu: nvgpu: unit: add test for BUG() callbacks
...
Add unit tests for the following functions:
- nvgpu_bug_register_cb
- nvgpu_bug_unregister_cb
Jira NVGPU-4512
Change-Id: I21a4bd55cfff080373b6234e517c1ee9cb51cb8a
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2266392
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: Shashank Singh <shashsingh@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:10:29 -06:00
ajesh
6afd472abe
gpu: nvgpu: add test case target functions
...
Add the target function names for posix unit tests.
Jira NVGPU-4478
Change-Id: I393c3d6ba99c96e54812e29dedc8abfe7afcebab
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2276656
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@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
Nicolas Benech
b682091b13
gpu: nvgpu: SWUTS: clean up test types
...
Apply the following changes to test types:
* "Init" --> "Other (setup)"
* "Coverage" --> Removed since it's implied for all tests
* "Feature based" --> "Feature"
* "Boundary Value analysis" and "Boundary values based" --> "Boundary values"
* "Error guessing based" --> "Error guessing"
JIRA NVGPU-3510
Change-Id: I3a9c0c59e6ad806f3479caa5e9a62f4d89f76923
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2265670
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Philip Elcan
dcd1e423b4
gpu: nvgpu: unit: cond: use nvgpu_thread's
...
The cond unit test was using native pthreads for threads. This change
updates the posix-cond unit test to use the nvgpu_threads interface to
create threads. This ensures the fault injection is setup correctly in
the threads used in the test.
JIRA NVGPU-2224
Change-Id: I94067d25d109cf0569e0c9d83825fefbfc36701a
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2258704
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 >
2020-12-15 14:10:29 -06:00
ajesh
c46a68c231
gpu: nvgpu: add rwsem unit test
...
Add unit tests for rwsem unit.
Jira NVGPU-2698
Change-Id: Id8c6f336b3cc2c458f42a8c21a9bace3a7711e05
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2208425
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
ajesh
d7dcc2b77e
gpu: nvgpu: add ut for posix kmem
...
Add unit tests for posix kmem unit.
Jira NVGPU-2658
Change-Id: If2b8a3eb44d0f440d10ab0aade36ba334d0de329
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2237255
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
ajesh
1241cb3014
gpu: nvgpu: add UT for os_sched
...
Add unit tests for posix os_sched unit.
Jira NVGPU-2689
Change-Id: Ideaf6ad8a0b2419efbe4e8960afa46a30f9f0e7a
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2215620
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Philip Elcan
1b3125d716
gpu: nvgpu: unit: bitops: add SWUTS
...
Add the SWUTS documentation for the posix-bitops unit test.
NVGPU-3943
Change-Id: Ib7e93e782e7ef6bb46ada09b94b8046a9ef70361
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2227957
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@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 >
2020-12-15 14:10:29 -06:00
ajesh
10094b7091
gpu: nvgpu: update SWUT with cond and timers
...
Update the SWUT sources and header file to include cond and
timers unit.
Jira NVGPU-3973
Jira NVGPU-3944
Change-Id: I480c6f7558a7e8d13fccba5ba79d65816527c904
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2203497
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:05:52 -06:00
Philip Elcan
3e288dd836
gpu: nvgpu: unit: add SWUTS docs for posix-fault-injection
...
This adds the SWUTS documentation for the posix fault injection unit
test.
JIRA NVGPU-3943
Change-Id: I3b76d7c29599a053a9d10b57387b21dc4c3a1ca9
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2200022
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:05:52 -06:00
ajesh
26d83f4fae
gpu: nvgpu: add UT for timers unit
...
Add unit test cases for timers unit.
Jira NVGPU-2655
Change-Id: Ie3f3001dc8b89cdd13cde3d4c326f2481dabd425
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2179108
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@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
ajesh
e4f52cbc77
gpu: nvgpu: update SWUT with sizes and thread
...
Update the SWUT sources and header file to include sizes and
thread unit.
Jira NVGPU-2654
Jira NVGPU-3972
Change-Id: Ida27486e36af970d6e5f1642b4ae42e8932236f6
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2196158
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:05:52 -06:00
ajesh
b9c2a0ec2d
gpu: nvgpu: add unit test for cond unit
...
Add unit test cases for cond unit.
Jira NVGPU-2661
Change-Id: Id0bdd069787d567f99d53a9d69eaba1a6e7de97d
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2169112
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:05:52 -06:00
ajesh
81d24e41d0
gpu: nvgpu: add ut for posix sizes unit
...
Add unit test cases for posix sizes unit.
Jira NVGPU-2654
Change-Id: I567e249c824fd75c617b43f196c36780ec75101f
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2189786
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:01:38 -06:00
ajesh
8a927abdce
gpu: nvgpu: add unit test for thread unit
...
Add unit test cases for thread unit.
Jira NVGPU-2662
Change-Id: I84a108fa83f66a3a5194f2553bf336ef2373cabf
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2164113
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:01:38 -06:00
ajesh
b095d73022
gpu: nvgpu: modify the ffs and fls interface
...
Modify the ffs/fls interface function names to nvgpu_ffs and
nvgpu_fls. The return bit values are numbered from 1 to 64.
A return value of 0 indicates an input of 0 value.
Jira NVGPU-3601
Change-Id: I1c151eeac1f94fe3b5b85bd5daf0488f75c5efa0
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2146119
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: Philip Elcan <pelcan@nvidia.com >
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-07-11 05:43:55 -07:00
ajesh
a6cbfca58c
gpu: nvgpu: fix MISRA violations in bitops unit
...
Fix the following MISRA rule violations in bitops unit,
MISRA Rule 10.1
MISRA Rule 10.3
MISRA Rule 10.4
MISRA Rule 11.8
MISRA Rule 21.2
Introduce nvgpu specific functions for bitops and bitmap operations
with unsigned integer as parameter for offset. OS specific type
conversions and handling of these inerfaces are taken care in the
respective OS files.
Jira NVGPU-3545
Change-Id: Ib1ef76563db6ba1d879a0b4d365b2958ea03f85c
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2129513
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-06-11 22:26:41 -07:00
Nicolas Benech
ce3facb616
gpu: nvgpu: unit: add posix-bug unit
...
The EXPECT_BUG construct was broken so this new unit will ensure
it does not happen again. It will also indirectly ensure that
BUG() works as intended.
JIRA NVGPU-3562
Change-Id: I09a11d616f37f8689e6f7c86840133410c5eb04e
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2126873
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-05 13:35:13 -07:00
Philip Elcan
5a0a711464
gpu: nvgpu: fix MISRA 21.2 violation in io.h
...
MISRA Rule 21.2 prohibits naming functions beginning with double
underscore. So, rename __nvgpu_readl() to nvgpu_readl_impl().
JIRA NVGPU-3361
Change-Id: Ia09a0f57e250fa3934f843671a529ee1b2ac2493
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2118041
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-05-15 22:29:21 -07:00
ajesh
8f24fc351e
gpu: nvgpu: unit: fix the ffs test
...
The LSB position is 1 in ffs, fix the ffs test parameters accordingly.
Jira NVGPU-2149
Change-Id: Ic67199b43b36e0ff98671ada301b71be85037ac9
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2107277
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-04-30 00:49:18 -07:00
Philip Elcan
13ad8142ef
gpu: nvgpu: unit: fix valgrind errors in posix bitmap
...
Fix cases where valgrind reported conditional jump or move depends on
uninitialised value(s)
JIRA NVGPU-3098
Change-Id: I5699d1f8539ec29e6f1bac6452e216c72c4d9007
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2094640
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Fleury <tfleury@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-04-12 15:34:10 -07:00
Philip Elcan
c0d5a715bd
gpu: nvgpu: unit: add test levels
...
Add -t/--test-level option for the unit test framework. This
correlates with the test plan levels in GVS. L0 tests are a subset of
the L1 tests. Currently, only test levels 0 and 1 are supported.
The test output has been updated to display skipped tests. Skipped
tests are not included in the test dump.
JIRA NVGPU-2251
Change-Id: Icc2ff19a81529be8526e89f70983e96040390e00
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2085280
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-04-05 13:14:20 -07:00
Nicolas Benech
33aea736a2
gpu: nvgpu: fix licenses in userspace
...
The licenses used in the userspace folder were inconsistent.
This patch fixes the situation by ensuring all files are using the
MIT license.
JIRA NVGPU-2974
Change-Id: I8c89667f72732ff6f73e6cf4be1acd9e58a7e516
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2087125
GVS: Gerrit_Virtual_Submit
Reviewed-by: Automatic_Commit_Validation_User
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-02 13:54:00 -07:00
Philip Elcan
c087e2c12e
gpu: nvgpu: unit: posix: verify U*_MAX values
...
While resolving MISRA 10.8 violations in our definitions of U8_MAX,
U16_MAX, etc, some of the variants tried that looked valid created
invalid values due to integer promotions. So, for sanity, we should
validate these macros in the unit test for posix-env.
JIRA NVGPU-2955
Change-Id: I9c4b66771a875728c2bf79036e9a510bbc871bfb
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2078365
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza <araza@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-03-22 08:47:45 -07:00
Alex Waterman
489236d181
gpu: nvgpu: MISRA 21.2 fixes: __nvgpu_set_enabled()
...
Rename __nvgpu_set_enabled() to nvgpu_set_enabled(). The original
double underscore was present to indicate that this function is a
function with potentially unintended side effects (enabling a feature
has wide ranging impact).
To not lose this documentation a comment was added to convey that this
function must be used with care.
JIRA NVGPU-1029
Change-Id: I8bfc6fa4c17743f9f8056cb6a7a0f66229ca2583
Signed-off-by: Alex Waterman <alexw@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1989434
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-01-15 12:54:19 -08:00
Philip Elcan
8f15a2903c
gpu: nvgpu: unit: initialize nvgpu_mem variables
...
There were several places were nvgpu_mem structs were declared on the
stack and not initialized. Some fields could be used erroneously by
underlying APIs.
To allow the initialization of an array of nvgpu_mem in
test_dma_alloc_fi_delayed_enable(), the array length had to be changed
from a const to a macro.
JIRA NVGPU-1563
Change-Id: I6c23445af7d932710898df2e23a8fd892bee77b3
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1967966
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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-12-11 14:41:08 -08:00
Alex Waterman
63da5366a6
gpu: nvgpu: unit: Shuffle the paths of tests around a bit
...
We will need to organize the unit tests in order to keep the
units/ directory managable.
The basic idea here is to mirror the common/ structure in
nvgpu proper under units/. There's one additrion at the
moment though: posix. This is for posix environment related
tests.
Also added a fix for the runlist unit test. Add it to the
tmake sources and move the nvgpu-runlist/ directory to just
runlist/.
Change-Id: I1f4163d0e33c3af70376cfeb3441d277d559e05a
Signed-off-by: Alex Waterman <alexw@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1935710
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2018-11-07 13:10:55 -08:00