Commit Graph

4 Commits

Author SHA1 Message Date
Philip Elcan
529d40103f gpu: nvgpu: unit: init: improve branch coverage for nvgpu_put
This adds tests for testing some NULL pointer checks in the nvgpu_put()
code paths that weren't covered.

JIRA NVGPU-2239

Change-Id: I7b4e3d26644bab0aadff4d3bf5ecdb951e391ec8
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2184929
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-08-28 16:55:29 -07:00
Philip Elcan
373e7e8452 gpu: nvgpu: unit: init: add tests for poweron/poweroff
Add unit test cases for nvgpu_finalize_poweron() and
nvgpu_prepare_poweroff().

JIRA NVGPU-2239

Change-Id: I5735b1d04095aae41532750a6ba0f1fb186261ce
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2184928
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-08-28 16:55:20 -07:00
Philip Elcan
88e167ad98 gpu: nvgpu: unit: init: cleanup init test header
Remove include files and replace with forward declarations.
Remove 'static' modifier in header and source.

JIRA NVGPU-2239

Change-Id: Ie7b6d34be446a7c9a163179c0fc443275278489a
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2184927
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>
2019-08-28 16:55:10 -07:00
Philip Elcan
bb2aee6d1a gpu: nvgpu: unit: add nvgpu.common.init unit test
This creates the basic test and validates all interfaces besides poweron
and poweroff.

JIRA NVGPU-3642

Change-Id: Idd36a1d7eaa8b459500ca642c742396dea677ff2
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2182348
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-08-26 16:07:58 -07:00