Skip to content

Commit

Permalink
Merge pull request #1090 from jphickey/fix-1082-symdump-size
Browse files Browse the repository at this point in the history
Fix #1082, increase UT symbol dump size limit
  • Loading branch information
astrogeco authored Jul 2, 2021
2 parents a3801ab + 05ce4e2 commit 646c0be
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/unit-tests/osloader-test/ut_osloader_symtable_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
** Macros
**--------------------------------------------------------------------------------*/

/**
* The size limit to pass for OS_SymbolTableDump nominal test
*
* This must be large enough to actually accomodate all of the symbols
* in the target system.
*/
#define UT_SYMTABLE_SIZE_LIMIT 1048576

/*--------------------------------------------------------------------------------*
** Data types
**--------------------------------------------------------------------------------*/
Expand Down Expand Up @@ -188,9 +196,9 @@ void UT_os_symbol_table_dump_test()
/*-----------------------------------------------------*/
/* #3 Nominal */

if (UT_NOMINAL_OR_NOTIMPL(OS_SymbolTableDump(UT_OS_GENERIC_MODULE_DIR "SymbolFile.dat", 32000)))
if (UT_NOMINAL_OR_NOTIMPL(OS_SymbolTableDump(UT_OS_GENERIC_MODULE_DIR "SymbolReal.dat", UT_SYMTABLE_SIZE_LIMIT)))
{
UT_RETVAL(OS_SymbolTableDump(UT_OS_GENERIC_MODULE_DIR "SymbolFile.dat", 0), OS_ERR_OUTPUT_TOO_LARGE);
UT_RETVAL(OS_SymbolTableDump(UT_OS_GENERIC_MODULE_DIR "SymbolZero.dat", 0), OS_ERR_OUTPUT_TOO_LARGE);
}
}

Expand Down

0 comments on commit 646c0be

Please sign in to comment.