mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: unit: improve branch coverage for pbdma
Improve branch coverage for: - nvgpu_pbdma_find_for_runlist Jira NVGPU-3490 Change-Id: I28a0b86f92a6912cb4046145c0fcc9ec9efc360f Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2263620 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: Alex Waterman <alexw@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
987cbaa914
commit
2fe78b4a31
@@ -173,6 +173,7 @@ int test_pbdma_find_for_runlist(struct unit_module *m,
|
||||
struct gk20a *g, void *args)
|
||||
{
|
||||
struct nvgpu_fifo *f = &g->fifo;
|
||||
struct nvgpu_fifo fifo = g->fifo;
|
||||
u32 runlist_id;
|
||||
bool active;
|
||||
bool found;
|
||||
@@ -195,9 +196,15 @@ int test_pbdma_find_for_runlist(struct unit_module *m,
|
||||
assert(pbdma_id == U32_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
f->num_pbdma = 0;
|
||||
assert(!nvgpu_pbdma_find_for_runlist(g, 0, &pbdma_id));
|
||||
|
||||
ret = UNIT_SUCCESS;
|
||||
|
||||
done:
|
||||
g->fifo = fifo;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user