diff --git a/userspace/units/fbp/nvgpu-fbp.c b/userspace/units/fbp/nvgpu-fbp.c index 99501e1ad..6866a991b 100644 --- a/userspace/units/fbp/nvgpu-fbp.c +++ b/userspace/units/fbp/nvgpu-fbp.c @@ -206,8 +206,15 @@ int test_fbp_remove_support(struct unit_module *m, struct gk20a *g, void *args) return UNIT_FAIL; } + /* + * Call fbp_remove_support with fbp pointer set to NULL for branch + * coverage. + */ + nvgpu_fbp_remove_support(g); + return ret; } + struct unit_module_test fbp_tests[] = { UNIT_TEST(fbp_setup, test_fbp_setup, NULL, 0), UNIT_TEST(fbp_init_and_query, test_fbp_init_and_query, NULL, 0), diff --git a/userspace/units/fbp/nvgpu-fbp.h b/userspace/units/fbp/nvgpu-fbp.h index d8fc9dcb1..dd67d9119 100644 --- a/userspace/units/fbp/nvgpu-fbp.h +++ b/userspace/units/fbp/nvgpu-fbp.h @@ -117,6 +117,7 @@ int test_fbp_init_and_query(struct unit_module *m, struct gk20a *g, void *args); * - Confirm if g->fbp != NULL before calling fbp_remov_support API. * - Call fbp_remove_support to cleanup the saved FBP data. * - Confirm if g->fbp == NULL after cleanup. + * - Call fbp_remove_support with fbp pointer set to NULL for branch coverage. * * Output: * - UNIT_FAIL if above API fails to cleanup g->fbp;