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

Gramine missing kernel fix for wait4(INT_MIN, ...) #1757

Open
anjalirai-intel opened this issue Feb 6, 2024 · 3 comments
Open

Gramine missing kernel fix for wait4(INT_MIN, ...) #1757

anjalirai-intel opened this issue Feb 6, 2024 · 3 comments

Comments

@anjalirai-intel
Copy link
Contributor

Description of the problem

The test checks for wait4(INT_MIN, ...) and the test fails with error ECHILD instead of ESRCH

Steps to reproduce

Compile the wait403 test and run with gramine-direct/gramine-sgx, c code and logs has been attached in zip

wait403.zip

Expected results

TPASS: wait4 fails with ESRCH : ESRCH (3)

Summary:
passed 1
failed 0
broken 0
skipped 0
warnings 0

Actual results

TFAIL: wait4 fails with ESRCH expected ESRCH: ECHILD (10)
[0.069]
[0.069] HINT: You MAY be missing kernel fixes:
[0.069]
[0.069] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dd83c161fbcc
[0.069]
[0.069] Summary:
[0.069] passed 0
[0.069] failed 1
[0.069] broken 0
[0.069] skipped 0
[0.069] warnings 0

Gramine commit hash

1cf1f46

@anjalirai-intel anjalirai-intel changed the title LTP test wait403 fails with error missing kernel fix Gramine missing kernel fix for wait4(INT_MIN, ...) Feb 6, 2024
@dimakuv
Copy link
Contributor

dimakuv commented Feb 6, 2024

I confirm that this is indeed a (tiny) bug in Gramine. We do not have special casing of INT_MIN in the wait family of syscalls.

@mkow
Copy link
Member

mkow commented May 6, 2024

I don't see such a test in our LTP?

@dimakuv
Copy link
Contributor

dimakuv commented May 6, 2024

Yep, we have https://github.com/linux-test-project/ltp/tree/da2f34028f046a208aa2fed5e287df2538e69f91 (version LTP 20200930).

This test wait403 was added in LTP 20210927.

So @anjalirai-intel was enabling this newer version of LTP (I think), and hit this case.

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