diff --git a/userspace/units/gr/setup/nvgpu-gr-setup.c b/userspace/units/gr/setup/nvgpu-gr-setup.c index ee9f2ccf2..c530b148e 100644 --- a/userspace/units/gr/setup/nvgpu-gr-setup.c +++ b/userspace/units/gr/setup/nvgpu-gr-setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -399,6 +399,13 @@ static int gr_setup_fail_alloc(struct unit_module *m, struct gk20a *g) goto obj_ctx_fail_end; } + /* SUBTEST-4 for graphics class num */ + err = g->ops.gr.setup.alloc_obj_ctx(gr_setup_ch, 0xC397U, 0); + if (err == 0) { + unit_err(m, "setup alloc SUBTEST-4 failed\n"); + goto obj_ctx_fail_end; + } + obj_ctx_fail_end: return (err != 0) ? UNIT_SUCCESS: UNIT_FAIL; } diff --git a/userspace/units/gr/setup/nvgpu-gr-setup.h b/userspace/units/gr/setup/nvgpu-gr-setup.h index a45dbb003..006177a2e 100644 --- a/userspace/units/gr/setup/nvgpu-gr-setup.h +++ b/userspace/units/gr/setup/nvgpu-gr-setup.h @@ -121,7 +121,7 @@ int test_gr_setup_free_obj_ctx(struct unit_module *m, * Description: Helps to verify error paths in * g->ops.gr.setup.set_preemption_mode call. * - * Test Type: Error injection + * Test Type: Error injection, Boundary values * * Targets: #nvgpu_gr_setup_set_preemption_mode, * #nvgpu_gr_obj_ctx_set_ctxsw_preemption_mode. @@ -147,7 +147,7 @@ int test_gr_setup_preemption_mode_errors(struct unit_module *m, * Description: Helps to verify error paths in * g->ops.gr.setup.alloc_obj_ctx call. * - * Test Type: Error injection + * Test Type: Error injection, Boundary values * * Targets: #nvgpu_gr_setup_alloc_obj_ctx, * #nvgpu_gr_subctx_alloc, #nvgpu_gr_obj_ctx_alloc,