Test failure in rszshm
So, for me at least, ccanlint is failing on the rszshm module (and therefore make check is failing as well). I only see one commit for that module, so I think it must have always been broken.
not ok 13 - rszshm_mk(&t, 4096, NULL, scan) == NULL && errno == ENOMEM
# Failed test (/home/dwg/src/ccan/ccan/rszshm/test/run.c:main() at
line 96)
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan
A message that is not in the archive (sent off-list or not yet received): CACNkOJNJS=8MOqHQA-kGwJV6odXzYY3Tz2HjmWuaj_0tPg_yYQ@mail.gmail.com
Quoted 3 lines · Dan Good
That particular test is asking mmap to create a mapping of size
UINT64_MAXand expecting it to fail with ENOMEM. Are you getting a different errno?
Yes, it seems I'm getting EINVAL. But the EINVAL is coming from the mmap() call, *not* the initial tests in rszshm_mk() which explicitly set EINVAL.
But what's *really* weird, is I get it when I run ccanlint directly, but not when it then re-runs the tests under gdb. And as far as I can tell mmap() is getting exactly the same arguments :/.
Quoted 13 lines
Quoted 9 lines · David Gibson
So, for me at least, ccanlint is failing on the rszshm module (and therefore make check is failing as well). I only see one commit for that module, so I think it must have always been broken.
not ok 13 -
rszshm_mk(&t, 4096, NULL, scan)== NULL && errno == ENOMEM
# Failed test (/home/dwg/src/ccan/ccan/rszshm/test/run.c:main() at
line 96)
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan
Quoted 5 lines · David Gibson
Quoted 3 lines · Dan Good
That particular test is asking mmap to create a mapping of size
UINT64_MAXand expecting it to fail with ENOMEM. Are you getting a different errno?
Quoted 7 lines
Yes, it seems I'm getting EINVAL. But the EINVAL is coming from the
mmap()call, *not* the initial tests inrszshm_mk()which explicitly set EINVAL.But what's *really* weird, is I get it when I run ccanlint directly, but not when it then re-runs the tests under gdb. And as far as I can tell
mmap()is getting exactly the same arguments :/.
I get no error when I run it directly, and error under ccanlint, and success under GDB.
Ah, valgrind! In particular, it returns EINVAL instead of ENOMEM when you ask it to mmap 18446744073709547520 bytes address.
And then it fails due to:
==29368== Invalid read of size 4
==29368== at 0x4033BC: main (run.c:138)
==29368== Address 0x400000000018 is not stack'd, malloc'd or (recently) free'd
So, this needs valgrind disabled as well.
Assuming that's OK, I've pushed that for now.
Cheers,
Rusty.
_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan