gpu: nvgpu: unit: worker: add more coverage

This adds a test to cover a missing branch in the worker thread.

JIRA NVGPU-4818

Change-Id: I6e4a1f4615954a666549d063020308b592286347
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2276649
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: Thomas Fleury <tfleury@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>
This commit is contained in:
Philip Elcan
2020-01-09 09:21:20 -05:00
committed by Alex Waterman
parent 0836f31c47
commit 796781313e
2 changed files with 50 additions and 4 deletions

View File

@@ -137,7 +137,13 @@ int test_enqueue(struct unit_module *m, struct gk20a *g, void *args);
* - Enqueue a work item (which will try to restart the thread).
* - Verify no error is returned.
* - Disable fault injection for checking if thread is running.
* - Re-init the worker to restart the thread properly.
* - Re-init the worker to restart the thread properly for next test.
* - Case 8: Test thread stopping when thread_should_stop is set.
* - Enqueue a work item.
* - In, the wakeup_post_process callback, set the thread fault injection.
* - Wait until thread exits.
* - Disable thread fault injection.
* - Re-init the worker to restart the thread properly for next test.
*
* Output: Returns PASS if expected result is met, FAIL otherwise.
*/