mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: unit: improve coverage for quiesce
Add more cases for branch coverage of the following functions: - nvgpu_sw_quiesce - nvgpu_sw_quiesce_init_support - nvgpu_sw_quiesce_bug_cb Add SWUTS steps for test_quiesce. Jira NVGPU-4905 Change-Id: Ib14c03f30bb7556123faf4d49abf2b307b82014b Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280610 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: Philip Elcan <pelcan@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
This commit is contained in:
committed by
Alex Waterman
parent
1f2f414fde
commit
726d2a8d4a
@@ -307,15 +307,33 @@ int test_poweroff(struct unit_module *m, struct gk20a *g, void *args);
|
||||
* Test Type: Feature
|
||||
*
|
||||
* Targets: nvgpu_sw_quiesce_init_support, nvgpu_sw_quiesce_remove_support,
|
||||
* nvgpu_sw_quiesce_thread, nvgpu_sw_quiesce
|
||||
* nvgpu_sw_quiesce_thread, nvgpu_sw_quiesce, nvgpu_sw_quiesce_bug_cb
|
||||
*
|
||||
* Input:
|
||||
* - test_setup_env() must be called before.
|
||||
*
|
||||
* Steps:
|
||||
* - Use stub for g->ops.mc.intr_mask, g->ops.runlist.write_state and
|
||||
* g->ops.fifo.preempt_runlists_for_rc.
|
||||
* - Call nvgpu_sw_quiesce, wait for SW quiesce threads to complete,
|
||||
* and check that interrupts have been disabled.
|
||||
* - Check SW quiesce invoked from BUG().
|
||||
* - Check cases where nvgpu_sw_quiesce does not wake up threads:
|
||||
* - NVGPU_DISABLE_SW_QUIESCE is set.
|
||||
* - g->sw_quiesce_pending is already true.
|
||||
* - g->sw_quiesce_init_done is false.
|
||||
* - Check cases where nvgpu_sw_quiesce_thread skips quiescing:
|
||||
* - nvgpu_thread_should_stop is true (using fault injection).
|
||||
* - g->is_virtual is true.
|
||||
* - g->powered_on is false.
|
||||
* - Check failure cases in nvgpu_sw_quiesce_init_support:
|
||||
* - sw_quiesce_cond initialization failure (using cond fault injection).
|
||||
* - sw_quiesce already initialized.
|
||||
* - sw_quiesce_thread creation failure (using thread fault injection).
|
||||
* - sw_quiesce_wdog creation failure (using thread fault injection).
|
||||
*
|
||||
* Output:
|
||||
* - UNIT_FAIL if nvgpu_finalize_poweron() ever returns the unexpected value.
|
||||
* - UNIT_FAIL if SW quiesce did not behave as expected.
|
||||
* - UNIT_SUCCESS otherwise
|
||||
*/
|
||||
int test_quiesce(struct unit_module *m, struct gk20a *g, void *args);
|
||||
|
||||
Reference in New Issue
Block a user