Skip to content

fork() and system(): Change errno value from EAGAIN to ENOSYS #14173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 14, 2021

Conversation

ijackson
Copy link
Contributor

This is more correct. Trying again will not help.

Fixes: #14124

This is more correct.  Trying again will not help.

Fixes: emscripten-core#14124
@welcome
Copy link

welcome bot commented May 13, 2021

Thank you for submitting a pull request! If this is your first PR, make sure to add yourself to AUTHORS.

@sbc100
Copy link
Collaborator

sbc100 commented May 13, 2021

Looks like you need to update the expectations for the test test_unistd_misc.

@ijackson
Copy link
Contributor Author

Apparently I can't see the test logs without making an account?? Let me see if I can find the relevant errno value somewhere else...

@ijackson
Copy link
Contributor Author

It seems like this is still broken :-(.

Unfortunately the test log links all redirect me to a login page. Maybe this will seem unreasonable, but I do not wish to create an account on a proprietary web service just to see some non-confidential CI logs for my public contribution to a public Free Software project.

I would be happy to try to fix the problems if someone would c&p the logs for me or something.

Sorry to be awkward.

@sbc100
Copy link
Collaborator

sbc100 commented May 13, 2021

I don't think are you are supposed to need an account to look at the logs in circleci.. I guess maybe its a bug at their end.

In any case:

======================================================================
FAIL: test_support_errno (test_other.other)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/root/project/tests/runner.py", line 351, in resulting_test
    return func(self, *args)
  File "/root/project/tests/test_other.py", line 9810, in test_support_errno
    self.do_run_from_file(src, output)
  File "/root/project/tests/runner.py", line 1028, in do_run_from_file
    self._build_and_run(filename, open(expected_output_filename).read(), **kwargs)
  File "/root/project/tests/runner.py", line 1085, in _build_and_run
    self.assertContained(expected_output, js_output)
  File "/root/project/tests/runner.py", line 767, in assertContained
    additional_info
  File "/usr/lib/python3.6/unittest/case.py", line 670, in fail
    raise self.failureException(msg)
AssertionError: Expected to find 'rtn     : -1
errno   : 6
strerror: Resource temporarily unavailable
' in 'rtn     : -1
errno   : 52
strerror: Function not implemented
', diff:

--- expected
+++ actual
@@ -1,4 +1,4 @@
 rtn     : -1
-errno   : 6
-strerror: Resource temporarily unavailable
+errno   : 52
+strerror: Function not implemented




======================================================================
FAIL: test_support_errno_minimal (test_other.other)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/root/project/tests/runner.py", line 351, in resulting_test
    return func(self, *args)
  File "/root/project/tests/test_other.py", line 9810, in test_support_errno
    self.do_run_from_file(src, output)
  File "/root/project/tests/runner.py", line 1028, in do_run_from_file
    self._build_and_run(filename, open(expected_output_filename).read(), **kwargs)
  File "/root/project/tests/runner.py", line 1085, in _build_and_run
    self.assertContained(expected_output, js_output)
  File "/root/project/tests/runner.py", line 767, in assertContained
    additional_info
  File "/usr/lib/python3.6/unittest/case.py", line 670, in fail
    raise self.failureException(msg)
AssertionError: Expected to find 'rtn     : -1
errno   : 6
strerror: Resource temporarily unavailable
' in 'rtn     : -1
errno   : 52
strerror: Function not implemented
', diff:

--- expected
+++ actual
@@ -1,4 +1,4 @@
 rtn     : -1
-errno   : 6
-strerror: Resource temporarily unavailable
+errno   : 52
+strerror: Function not implemented

@ijackson
Copy link
Contributor Author

Thanks! Fixed this one too I think. I hope this doesn't end up being too whack-a-mole. I did grep for errno.*\b6\b this time...

@kripken
Copy link
Member

kripken commented May 14, 2021

Browser error:


======================================================================
FAIL: test_system (test_browser.browser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/project/tests/runner.py", line 1386, in run_browser
    self.assertContained(expectedResult, output)
  File "/root/project/tests/runner.py", line 767, in assertContained
    additional_info
  File "/usr/lib/python3.6/unittest/case.py", line 670, in fail
    raise self.failureException(msg)
AssertionError: Expected to find '/report_result?0
' in '/report_result?abort:Assertion failed: errno == EAGAIN, at: /root/project/tests/system.c,28,main
', diff:

--- expected
+++ actual
@@ -1 +1 @@
-/report_result?0
+/report_result?abort:Assertion failed: errno == EAGAIN, at: /root/project/tests/system.c,28,main

Sorry about this annoyance with CircleCI, we reported it and they said it's a bug they intend to fix, but it's been many months now without resolution 😞

@ijackson
Copy link
Contributor Author

And again. I grepped tests for just EAGAIN this time...

@kripken
Copy link
Member

kripken commented May 14, 2021

Looks good!

How about adding a changelog entry for this? It's a breaking change in theory for some users.

@sbc100
Copy link
Collaborator

sbc100 commented May 14, 2021

Loos good!

BTW, your email looks very familiar to me. I think we maybe met one time back in the late nineties or early 2000s when I was living in england and involved with debian more (or maybe I just remember you name from the debian listserv). Certainly your domain name brought back memories. Thanks for the contribution to emscripten. Its exciting to see a familiar name. Can I ask what you are using emscripten for?

@sbc100 sbc100 enabled auto-merge (squash) May 14, 2021 17:20
@ijackson
Copy link
Contributor Author

BTW, your email looks very familiar to me. I think we maybe met one time back in the late nineties or early 2000s when I was living in england and involved with debian more (or maybe I just remember you name from the debian listserv). Certainly your domain name brought back memories.

Hi again :-).

Thanks for the contribution to emscripten. Its exciting to see a familiar name. Can I ask what you are using emscripten for?

Well, right now, nothing :-). Rust targets emscripten and I saw this EAGAIN in some CI output there, and I thought it was wrong. I like to fix things that seem wrong. But I do know that my friend Simon Tatham is using emscripten to provide the playable-online versions of his Portable Puzzle Collection

@sbc100 sbc100 merged commit 22e1e23 into emscripten-core:main May 14, 2021
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.

fork or posix_spawn return EAGAIN, should return ENOSYS
3 participants