Skip to content

Conversation

@brendandahl
Copy link
Collaborator

The test was failing intermittently on Linux because inode numbers were stored in signed 32-bit integers. On modern Linux filesystems, inode numbers frequently exceed the range of a signed 32-bit integer, leading to narrowing overflows and negative values which triggered assertion failures.

This change updates the test to use ino_t (which is 64-bit in Emscripten).

Fixes #26090

@brendandahl brendandahl requested a review from sbc100 February 3, 2026 00:26
assert(a_ino > 0);
assert(b_ino > 0);
printf("readdir a_ino: %llu, b_ino: %llu\n", (unsigned long long)a_ino, (unsigned long long)b_ino);
printf("stat a_ino: %llu, b_ino: %llu\n", (unsigned long long)sta.st_ino, (unsigned long long)stb.st_ino);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably if we fix the foramt string we don't need those casts?

It looks like ino_t is always 64-bit under emscripten.

The test was failing intermittently on Linux because inode numbers were
stored in signed 32-bit integers. On modern Linux filesystems, inode
numbers frequently exceed the range of a signed 32-bit integer, leading
to narrowing overflows and negative values which triggered assertion
failures.

This change updates the test to use ino_t (which is 64-bit in
Emscripten).

Fixes emscripten-core#26090
@brendandahl brendandahl force-pushed the fix-intermittent-rawnode branch from 612953a to 45ba451 Compare February 3, 2026 00:37
@brendandahl brendandahl enabled auto-merge (squash) February 3, 2026 00:46
@brendandahl brendandahl merged commit e940d4c into emscripten-core:main Feb 3, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_fs_readdir_ino_matches_stat_ino_rawfs is flaky

2 participants