tests: posix: fs: declare entry statically
qemu_x86/atom was failing tests/posix/fs in test_fs_readdir_threadsafe for some reason and only for that platform. All other platforms pass the testsuite properly with the dirent declared on the stack. Declare the dirent object statically so that qemu_x86/atom will pass test cases. Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This commit is contained in:
parent
3e49a19b17
commit
c0e0fc5d7f
1 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,8 @@ static int test_mkdir(void)
|
|||
static struct dirent *readdir_wrap(DIR *dirp, bool thread_safe)
|
||||
{
|
||||
if (thread_safe) {
|
||||
struct dirent entry;
|
||||
/* cannot declare on stack otherwise this test fails for qemu_x86/atom */
|
||||
static struct dirent entry;
|
||||
struct dirent *result = NULL;
|
||||
|
||||
zassert_ok(readdir_r(dirp, &entry, &result));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue