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

[Confirm] Some waitid/waitpid tests unsupported due to single process limitation #39

Open
hukoyu opened this issue Jul 31, 2020 · 2 comments

Comments

@hukoyu
Copy link
Collaborator

hukoyu commented Jul 31, 2020

Below waitid and waitpid syscalls uses fork to create child process and waits on child process. sgx-lkl is single process and these tests are not applicable. We will categorize them as non-supported. @davidchisnall can you confirm please?

waitid01
waitid02
waitpid13
waitpid01
waitpid02
waitpid03
waitpid05

explanation for waitpid:
Test code check that when a child kills itself with a kill statement after determining its process id by using getpid, the parent receives a correct report of the cause of its death. This also indirectly checks that getpid returns the correct process id.
As fork is not supported it will not create a child process, so it will remain in parent itself. (Our fork patch doesn't create child process and returns 0 and remains in parent process)

As per linux documentation waitpid syscall block the calling process if we pass valid child pid. We tried creating below scenario to ensure.

  1. Created two threads and called waitpid syscall with pid argument -1 and current process pid. The waitpid returned immediately with return value -1 and error code ECHILD.
@hukoyu
Copy link
Collaborator Author

hukoyu commented Jul 31, 2020

@davidchisnall it is kind of trivial that this is not supported. Still creating this issue for tracking and for any feedback you might have.

@hukoyu hukoyu assigned hukoyu and unassigned hukoyu Jul 31, 2020
@davidchisnall
Copy link

Agreed. We probably could test these, but it’s not worth it. As before, please track these with the corresponding issues.

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

2 participants