-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
test_ioctl
fails on macOS
#119770
Comments
Yes, the same happens for me on m2 |
Unfortunately, this commit breaks backward compatibility. Previously, it was allowed to pass negative values for the |
This test is strange. Why passing negative request if its type is unsigned long? The value should be positive. test_ioctl was always skipped until recently. I fixed regrtest to test it: #119275 |
Yes, I agree with you that this is strange. Our documentation does not mention that the |
This line from the
Is there any chance that |
darwin-xnu uses uint32_t with the MSB bit set: #define IOC_IN (__uint32_t)0x80000000
#define _IOC(inout, group, num, len) \
(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
#define _IOW(g, n, t) _IOC(IOC_IN, (g), (n), sizeof(t))
#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ Source:
Python termios module stores the constant as The value may be negative or not depending on how C treats the integers. I would prefer to have a more reliable value. |
I wrote PR gh-119840 to make termios ioctl() constants positive and to update test_ioctl. |
…9840) (cherry picked from commit 64ff1e2) Co-authored-by: Victor Stinner <[email protected]>
…9840) (cherry picked from commit 64ff1e2) Co-authored-by: Victor Stinner <[email protected]>
Fixed by 64ff1e2 |
Bug report
Bug description:
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: