Skip to content
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

recordstatus gives different values for errors on windows and github #383

Open
u-fischer opened this issue Sep 24, 2024 · 3 comments
Open
Assignees

Comments

@u-fischer
Copy link
Member

I'm trying to use recordstatus in various testsuites (to get better warnings about unrelated errors from deprecation and similar).
It works fine for tests with status 0 (no error), but fails for non-zero status. E.g. if I save a simple test with a \show\START on windows and then test that on github I get the following diff:

*** 9,15 ****
  l. ...\show\START
  (test-errorstatus.aux)
  ***************
! Compilation 1 of test file completed with exit status 1
! Compilation 2 of test file completed with exit status 1
--- 9,15 ----
  l. ...\show\START
  (test-errorstatus.aux)
  ***************
! Compilation 1 of test file completed with exit status 256
! Compilation 2 of test file completed with exit status 256

Could l3build please normalize that message to something like with non-zero exit status?

@josephwright
Copy link
Member

I guess we should perhaps coerce status 256 to be the same as 1 - that's where the issue really lies. I'm wary of doing more - what if 1 vs 2 vs ... is important?

@zauguin
Copy link
Member

zauguin commented Sep 25, 2024

256 should not be a special case but we should use (0xFF00 & ret) >> 8 instead of the direct return code on Linux. The same or something similar is likely needed on Mac. The underlying issue is that LuaTeX fails to run the code through WERRORCODE, so we get it shifted.

@josephwright
Copy link
Member

@zauguin OK, I'll assign this one to you :)

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

No branches or pull requests

3 participants