public inbox for ccan@ozlabs.org
 help / color / mirror / Atom feed
* Test failure in rszshm
@ 2016-02-01 11:08 David Gibson
       [not found] ` <CACNkOJNJS=8MOqHQA-kGwJV6odXzYY3Tz2HjmWuaj_0tPg_yYQ@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: David Gibson @ 2016-02-01 11:08 UTC (permalink / raw)
  To: Dan Good; +Cc: ccan


[-- Attachment #1.1: Type: text/plain, Size: 548 bytes --]

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)

-- 
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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
ccan mailing list
ccan@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/ccan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Test failure in rszshm
       [not found] ` <CACNkOJNJS=8MOqHQA-kGwJV6odXzYY3Tz2HjmWuaj_0tPg_yYQ@mail.gmail.com>
@ 2016-02-02 13:36   ` David Gibson
  2016-02-03  5:52     ` Rusty Russell
  0 siblings, 1 reply; 3+ messages in thread
From: David Gibson @ 2016-02-02 13:36 UTC (permalink / raw)
  To: Dan Good; +Cc: ccan


[-- Attachment #1.1: Type: text/plain, Size: 1253 bytes --]

On Mon, Feb 01, 2016 at 04:15:06PM +0000, Dan Good wrote:
> That particular test is asking mmap to create a mapping of size UINT64_MAX
> and 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 :/.

> 
> On Mon, Feb 1, 2016 at 6:07 AM David Gibson <david@gibson.dropbear.id.au>
> wrote:
> 
> > 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)
> >
> >

-- 
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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
ccan mailing list
ccan@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/ccan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Test failure in rszshm
  2016-02-02 13:36   ` David Gibson
@ 2016-02-03  5:52     ` Rusty Russell
  0 siblings, 0 replies; 3+ messages in thread
From: Rusty Russell @ 2016-02-03  5:52 UTC (permalink / raw)
  To: David Gibson, Dan Good; +Cc: ccan

David Gibson <david@gibson.dropbear.id.au> writes:
> On Mon, Feb 01, 2016 at 04:15:06PM +0000, Dan Good wrote:
>> That particular test is asking mmap to create a mapping of size UINT64_MAX
>> and 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 :/.

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
ccan@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/ccan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-03  5:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-01 11:08 Test failure in rszshm David Gibson
     [not found] ` <CACNkOJNJS=8MOqHQA-kGwJV6odXzYY3Tz2HjmWuaj_0tPg_yYQ@mail.gmail.com>
2016-02-02 13:36   ` David Gibson
2016-02-03  5:52     ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox