mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
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:
committed by
Alex Waterman
parent
0836f31c47
commit
796781313e
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user