lsds / ltp

Linux Test Project http://linux-test-project.github.io/
https://lists.linux.it/listinfo/ltp
GNU General Public License v2.0
0 stars 4 forks source link

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

Open hukoyu opened 4 years ago

hukoyu commented 4 years ago

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 commented 4 years ago

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

davidchisnall commented 4 years ago

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