Skip to content

Cygwin: Test failure - winsup.api /semtest.c #328

@thiru-mcw

Description

@thiru-mcw

Description

  • In the semtest, the failure occurs because the make_request function in sem.cc returns -1. Initially, we couldn’t step into the cygserver code, but after adding the -g -Og flags to the cygserver Makefile, we were able to trace into the failing make_request call.

  • Inside make_request, cygserver_running is set to CYGSERVER_UNAVAIL, causing the function to return -1. This value is assigned in cygserver_init due to a request failure in cygserver_available. The cygserver_available check fails because transport->connect fails, which in turn is caused by CreateFileW returning INVALID_HANDLE_VALUE in transport_pipes.cc file when the pipe file is not created properly.

  • When cygserver is started manually in the test directory, semtest, msgtest, and shmtest pass since they depend on cygserver. Even after placing cygserver in the same directory (winsup.api) as the tests, the testsuite still fails. In the testsuite run, failures appear with exit code 124 (timeout) though all cases pass except for one mismatch related to file mode which is similar to umask where mode support is missing. This shows SIGCHLD is not being delivered or handled so the parent never detects the child’s exit and times out. In both x86 native and cross builds, all three tests pass which confirms the issue is due to missing signal implementation and should be resolved once signals are implemented.

Acceptance criteria

  • winsup.api/semtest should pass in aarch64 cygwin build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions