userspace: Update unit tests to use new .id and .runlist fields

Update the unit test code to reflect the following changes:

  https://git-master.nvidia.com/r/c/linux-nvgpu/+/2470305
  https://git-master.nvidia.com/r/c/linux-nvgpu/+/2470306

These adjust field names/types in struct nvgpu_runlist and
struct nvgpu_tsg; no functional changes are made but these do
affect the unit tests that rely on setting these private fields.

JIRA NVGPU-6425

Change-Id: I1fc9d56e363d326f1e6901aaec710903894ac61d
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2477585
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Alex Waterman
2021-01-29 15:27:50 -06:00
committed by mobile promotions
parent 5bf229dcd5
commit 06f554318a
8 changed files with 11 additions and 90 deletions

View File

@@ -261,8 +261,8 @@ int test_gv11b_fifo_preempt_tsg(struct unit_module *m, struct gk20a *g,
unit_verbose(m, "%s branches=%s\n",
__func__, branches_str(branches, f_preempt_tsg));
tsg->runlist_id = branches & F_PREEMPT_TSG_RUNLIST_ID_INVALID ?
NVGPU_INVALID_RUNLIST_ID : 0U;
tsg->runlist = branches & F_PREEMPT_TSG_RUNLIST_ID_INVALID ?
NULL : &g->fifo.active_runlists[0];
g->ops.fifo.is_preempt_pending =
branches & F_PREEMPT_TSG_PREEMPT_LOCKED_FAIL ?

View File

@@ -199,7 +199,7 @@ int test_preempt_poll_tsg_on_pbdma(struct unit_module *m, struct gk20a *g,
tsg = nvgpu_tsg_open(g, getpid());
unit_assert(tsg != NULL, goto done);
tsg->runlist_id = 0;
tsg->runlist = &f->active_runlists[0];
for (branches = 0U; branches < F_PREEMPT_POLL_LAST;
branches++) {