Skip to content

Commit

Permalink
Fix #1016, move pointer check on OS_ModuleInfo test
Browse files Browse the repository at this point in the history
Move the test for OS_INVALiD_POINTER to after setup,
where the module ID is valid.
  • Loading branch information
jphickey committed May 25, 2021
1 parent f384359 commit ebc789a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/unit-tests/osloader-test/ut_osloader_module_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,6 @@ void UT_os_module_info_test()
return;
}

/*-----------------------------------------------------*/
/* #1 Invalid-pointer-arg */

UT_RETVAL(OS_ModuleInfo(OS_OBJECT_ID_UNDEFINED, NULL), OS_INVALID_POINTER);

/*-----------------------------------------------------*/
/* #2 Invalid-ID-arg */

Expand All @@ -236,6 +231,10 @@ void UT_os_module_info_test()
/* Setup */
if (UT_SETUP(OS_ModuleLoad(&module_id, "Good", UT_OS_GENERIC_MODULE_NAME2, OS_MODULE_FLAG_LOCAL_SYMBOLS)))
{
/* Invalid-pointer-arg */
UT_RETVAL(OS_ModuleInfo(module_id, NULL), OS_INVALID_POINTER);

/* Nominal */
UT_NOMINAL(OS_ModuleInfo(module_id, &module_info));

UT_TEARDOWN(OS_ModuleUnload(module_id));
Expand Down

0 comments on commit ebc789a

Please sign in to comment.