Closed szpak closed 4 years ago
If you moved from 0.5.2 to 0.5.4, then this test is new, it was added in 0.5.3.
And I just realise I'm not testing at all with 32 bit anymore; all my builds are done with 64 bit. The overflow test is a bit hack-ish, I guess my assumption of overflow are not sound…
Yes, I've checked and the overflow check in the C code is basically broken, but passing on 64 bit. I'd suggest just commenting out this test for now.
By the way, I'm preparing a new upstream release dropping Python 2 compatibility; would that cause a problem for Fedora?
Thanks for your suggestion. I skipped that test and the build passed.
By the way, I'm preparing a new upstream release dropping Python 2 compatibility; would that cause a problem for Fedora?
Not at all. Actually, Fedora is removing the Python 2 packages in for the next Fedora version. Therefor, for Fedora itself it will perfectly fine :).
The overflow check, as implemented:
#include <stdio.h>
#include <sys/types.h>
int main() {
gid_t gid;
long l;
l = -5;
gid = l;
if((long)gid != l) printf("!=\n");
else printf("==\n");
return 0;
}
$ gcc -m32 test.c -o 32
$ gcc -m64 test.c -o 64
$ ./64
!=
$ ./32
==
Yes, that's what I found in my testing as well. It works well for positive overflow (long is bigger than uid_t which is int) but not for negative. I will fix this by switching negative test to Python built-in, and keep the current one for positive.
While trying to fix this, I found out that—on systems where uid_t
/gid_t
are unsigned, such a Linux—not only setting, but also retrieving the qualifier has bugs related to signedness and values outside the range of the signed values. Fun!
This is fixed in git head, the fix will be released in 0.6 - I expect a couple of weeks.
Upgrading the pylibacl package in Fedora to 0.5.4 I've got:
for the build on i686 and armv7hl. Other builds work fine. The build for 0.5.2 was fine 3 months ago, but there could be some dependency upgraded in the meantime, so I may re-request the 0.5.2 build with current rawhide (if needed to verify anything).
I wonder if it is only some problem with tests or something more serious.