-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-124083: Skip test_strsignal on NetBSD due to TypeError #124084
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
Conversation
I think we need to link this PR to the NetBSD community. We don't know whether this issue is caused by the NetBSD in a specific version or this is a wide exist bug. I think we need to hold on this PR before we confirm the bug scope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If strsignal
is not supported on this platform, then the configure
check must have detected it. However, it appears that your C program works correctly (namely that strsignal
is present), so HAVE_STRSIGNAL
should be defined. This also means that the following somehow returns None.
errno = 0;
res = strsignal(signalnum);
if (errno || res == NULL || strstr(res, "Unknown signal") != NULL)
Py_RETURN_NONE;
Either errno
is actually set differently or res
is NULL. But this seems quite weird that res
is NULL since the C program works. So errno
is somewhat modified.
If HAVE_STRSIGNAL
is not specified, then the switch
we are using is wrong. We should also check that the constants being check are actually the correct ones. I don't have access to a NetBSD machine but something more delicate could be hidden.
I'm working on the root cause. This is a little bit wired |
@Zheaoli: There are more details in the issue: #124083 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @furkanonder for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…H-124084) Skip test_strsignal() on NetBSD due to TypeError. (cherry picked from commit 36682c0) Co-authored-by: Furkan Onder <[email protected]>
GH-124223 is a backport of this pull request to the 3.13 branch. |
…H-124084) Skip test_strsignal() on NetBSD due to TypeError. (cherry picked from commit 36682c0) Co-authored-by: Furkan Onder <[email protected]>
GH-124224 is a backport of this pull request to the 3.12 branch. |
Merged, thanks for the fix @furkanonder. |
) (#124224) gh-124083: Skip test_signal.test_strsignal() on NetBSD (GH-124084) Skip test_strsignal() on NetBSD due to TypeError. (cherry picked from commit 36682c0) Co-authored-by: Furkan Onder <[email protected]>
You are welcome! |
I'm still convinced that the fact it returns None is something that should be investigated. But I can live with this fix for now |
strsignal() is basically not implemented on NetBSD: #124083 (comment) What do you want to investigate? |
Then why does it work with the C example on the issue? The function seems present and it returns a non-NULL result! (or am I misunderstanding something?) |
If fails with errno |
Oh! I thought the result would be NULL in this case! My bad. Ok so nothing to investigate. Sorry for the noise :') |
No need to be sorry, strsignal() on NetBSD has a strange behavior (return a string and report an error). IMO it's easier to skip the test, there is no need to spend too much time on it until NetBSD is fixed. |
…124084) Skip test_strsignal() on NetBSD due to TypeError.
) (#124223) gh-124083: Skip test_signal.test_strsignal() on NetBSD (GH-124084) Skip test_strsignal() on NetBSD due to TypeError. (cherry picked from commit 36682c0) Co-authored-by: Furkan Onder <[email protected]> Co-authored-by: T. Wouters <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.