IntelliTree / perl-IO-SocketAlarm

Perform asynchronous actions when a socket connection is lost
https://metacpan.org/pod/IO::SocketAlarm
0 stars 0 forks source link

t/04-poll-diagnostics.t and t/20-detect-event-eof.t fail (freebsd) #1

Open eserte opened 1 month ago

eserte commented 1 month ago

On my freebsd 13 and 14 smokers the test suite fails:

...
t/03-render_fd_table.t ... ok
Use of uninitialized value in subroutine entry at t/04-poll-diagnostics.t line 24.

# Failed test 'new connection can write'
# at t/04-poll-diagnostics.t line 51.
# +------+---------+---------+------------------+
# | PATH | GOT     | OP      | CHECK            |
# +------+---------+---------+------------------+
# | [0]  | POLLIN  | eq      | POLLOUT          |
# | [1]  | POLLOUT | !exists | <DOES NOT EXIST> |
# +------+---------+---------+------------------+
(If this table is too small, you can use the TABLE_TERM_SIZE=### env var to set a larger size, detected size is '78')

Use of uninitialized value in subroutine entry at t/04-poll-diagnostics.t line 24.
Use of uninitialized value in subroutine entry at t/04-poll-diagnostics.t line 24.
Use of uninitialized value in subroutine entry at t/04-poll-diagnostics.t line 24.

# Failed test 'POLLRDHUP when client SHUT_RDWR'
# at t/04-poll-diagnostics.t line 72.
# +------+------------------+-----------+
# | PATH | GOT              | CHECK     |
# +------+------------------+-----------+
# | [2]  | <DOES NOT EXIST> | POLLRDHUP |
# +------+------------------+-----------+
(If this table is too small, you can use the TABLE_TERM_SIZE=### env var to set a larger size, detected size is '78')

Use of uninitialized value in subroutine entry at t/04-poll-diagnostics.t line 24.

# Failed test 'POLLRDHUP when client closes connection'
# at t/04-poll-diagnostics.t line 75.
# +------+------------------+-----------+
# | PATH | GOT              | CHECK     |
# +------+------------------+-----------+
# | [2]  | <DOES NOT EXIST> | POLLRDHUP |
# +------+------------------+-----------+
(If this table is too small, you can use the TABLE_TERM_SIZE=### env var to set a larger size, detected size is '78')

# Seeded srand with seed '20241015' from local date.
t/04-poll-diagnostics.t .. 
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/7 subtests 
t/10-constructor.t ....... ok
accept: Resource temporarily unavailable at t/20-detect-event-eof.t line 71.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 35 after test #4.
# Seeded srand with seed '20241015' from local date.
t/20-detect-event-eof.t .. 
Dubious, test returned 35 (wstat 8960, 0x2300)
All 4 subtests passed 
...
nrdvana commented 1 month ago

Do you have a VM image I could download of that FreeBSD? I tried an older FreeBSD but couldn't install any of the ports collection because the URLs to download the packages are broken. I already debugged on the current/supported FreeBSD versions and have my module working correctly there.

eserte commented 4 weeks ago

You can utilitze GitHub Actions to run FreeBSD. I have a generic action for running any CPAN distribution, and you can see the results with your module here: https://github.com/eserte/ci-helper-cpan-pm/actions/runs/11649249114 Here it fails also on FreeBSD, however the test failure looks somehow different. Interestingly the failures on macos look more similar to my test reports.

nrdvana commented 3 weeks ago

Oh nice, I didn't realize GitHub had the other OSes. Any advice for how to convert that workflow file to be part of this repo?

I think the freebsd fails on that report are just a race condition that I can fix easily. The MacOS one (and older freebsd like your smoker) look harder, and it would be nice to get a shell in one of those environments so I could do some experiments.