emscripten-core / emscripten-core/emscripten

llvmlibc.test_fcntl_open regression

Open
#26,740 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I know that the `llvmlibc` suite is experimental and not developed day-to-day, so not expected to pass at all times.

While looking at other red tests, I noticed that the following tests fail on `llvmlibc`:

http://clbri.com:8010/api/v2/logs/393341/raw_inline

```
FAIL: test_fcntl_open_nodefs (test_core.llvmlibc.test_fcntl_open_nodefs)
FAIL: test_fcntl_open (test_core.llvmlibc.test_fcntl_open)
FAIL: test_fcntl_open_rawfs (test_core.llvmlibc.test_fcntl_open_rawfs)
```

These are probably from the same cause.

```
C:\emsdk\emscripten\main>test\runner llvmlibc.test_fcntl_open
Running 1 tests
[1/1] test_fcntl_open (test_core.llvmlibc.test_fcntl_open) ... FAIL

Stdout:
(test did not pass in JS engine: ['C:/emsdk/node/22.16.0_64bit/bin/node.exe'])

======================================================================
FAIL: test_fcntl_open (test_core.llvmlibc.test_fcntl_open)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\emsdk\emscripten\main\test\common.py", line 377, in resulting_test
return func(self, *args)
File "C:\emsdk\emscripten\main\test\decorators.py", line 302, in metafunc
return func(self, *args, **kwargs)
File "C:\emsdk\emscripten\main\test\decorators.py", line 43, in decorated
return func(self, *args, **kwargs)
File "C:\emsdk\emscripten\main\test\test_core.py", line 5739, in test_fcntl_open
self.do_run_in_out_file_test('fcntl/test_fcntl_open.c')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\emsdk\emscripten\main\test\common.py", line 1397, in do_run_in_out_file_test
output = self._build_and_run(srcfile, expected, **kwargs)
File "C:\emsdk\emscripten\main\test\common.py", line 1448, in _build_and_run
self.assertContained(o, js_output, regex=regex)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\emsdk\emscripten\main\test\common.py", line 1103, in assertContained
self.fail("Expected to find '%s' in '%s', diff:\n\n%s\n%s" % (
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
limit_size(values[0]), limit_size(string), limit_size(diff),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
additional_info,
^^^^^^^^^^^^^^^^
))
^^
AssertionError: Expected to find 'EXISTING FILE 0,0
success: 1
errno: Success
st_mode: 0100000

[... snip ...]

CREAT
success: 1
errno: Success
error: Success
(not all output shown. See `limit_size`)
', diff:

--- expected
+++ actual
@@ -484,7 +484,7 @@

EXISTING LINK 0,1
success: 0
-errno: Symbolic link loop
+errno: Too many levels of symbolic links

EXISTING FILE 1,0
success: 1
@@ -972,7 +972,7 @@

EXISTING LINK 1,1
success: 0
-errno: Symbolic link loop
+errno: Too many levels of symbolic links

EXISTING FILE 2,0
success: 1
@@ -1460,8 +1460,10 @@

EXISTING LINK 2,1
success: 0
-errno: Symbolic link loop
+errno: Too many levels of symbolic links

CREAT
success: 1
-
+errno: Success
+error: Success
+

Stdout:
(test did not pass in JS engine: ['C:/emsdk/node/22.16.0_64bit/bin/node.exe'])

----------------------------------------------------------------------
Ran 1 test in 1.015s

FAILED (failures=1)
```

Bisected down to #26315

```
f4eb1453e44f21f63022ad496e9fec5aff581488 is the first bad commit
commit f4eb1453e44f21f63022ad496e9fec5aff581488
Author: Sam Clegg
Date: Fri Feb 20 16:50:44 2026 -0800

[test] Use strerror in test_fcntl_open (#26315)

test/fcntl/test_fcntl_open.c | 10 +-
test/fcntl/test_fcntl_open.out | 589 ++++++++++++++++++++---------------------
2 files changed, 299 insertions(+), 300 deletions(-)
```

The difference `errno` vs `error` seems like maybe just a test expectation being out of date?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.