emscripten-core / emscripten-core/emscripten

test_clock_nanosleep is flaky (at least on mac)

Open
#16,490 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

Not very surprising since the test was recently added and has a timing element to it.

https://app.circleci.com/pipelines/github/emscripten-core/emscripten/19826/workflows/7db07fd2-6b5e-4630-91db-99c04ce22a7c/jobs/514249

```
======================================================================
FAIL: test_clock_nanosleep (test_other.other)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/distiller/emsdk/python/3.9.2_64bit/lib/python3.9/unittest/case.py", line 59, in testPartExecutor
yield
File "/Users/distiller/emsdk/python/3.9.2_64bit/lib/python3.9/unittest/case.py", line 593, in run
self._callTestMethod(testMethod)
File "/Users/distiller/emsdk/python/3.9.2_64bit/lib/python3.9/unittest/case.py", line 550, in _callTestMethod
method()
File "/Users/distiller/project/tests/test_other.py", line 11827, in test_clock_nanosleep
self.do_runf(test_file('other/test_clock_nanosleep.c'))
File "/Users/distiller/project/tests/common.py", line 1071, in do_runf
return self._build_and_run(filename, expected_output, **kwargs)
File "/Users/distiller/project/tests/common.py", line 1126, in _build_and_run
js_output = self.run_js(js_file, engine, args,
File "/Users/distiller/project/tests/common.py", line 726, in run_js
self.fail('JS subprocess failed (%s): %s. Output:\n%s' % (error.cmd, error.returncode, ret))
File "/Users/distiller/emsdk/python/3.9.2_64bit/lib/python3.9/unittest/case.py", line 670, in fail
raise self.failureException(msg)
AssertionError: JS subprocess failed (/Users/distiller/emsdk/node/14.18.2_64bit/bin/node --stack-trace-limit=50 --unhandled-rejections=throw --trace-uncaught /private/var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/T/tmpu6c6oxa9/emscripten_test_other_lgunhrfs/test_clock_nanosleep.js): 7. Output:
before: 3092966
after: 3092981
before: 3092982
after: 3092982
Aborted(Assertion failed: after > before, at: /Users/distiller/project/tests/other/test_clock_nanosleep.c,37,main)
/private/var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/T/tmpu6c6oxa9/emscripten_test_other_lgunhrfs/test_clock_nanosleep.js:146
throw ex;
^

RuntimeError: Aborted(Assertion failed: after > before, at: /Users/distiller/project/tests/other/test_clock_nanosleep.c,37,main)
```

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.