Skip Menu |

This queue is for tickets about the Google-ProtocolBuffers-Dynamic CPAN distribution.

Report information
The Basics
Id: 113201
Status: resolved
Priority: 0/
Queue: Google-ProtocolBuffers-Dynamic

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.03
Fixed in: (no value)



Subject: t/040_messages.t fails on freebsd 9.2
On a freebsd 9.2 (with standard compiler gcc 4.2.1) t/040_messages.t fails: # Failed test at t/040_messages.t line 60. # +----+------------------------------+----+------------------------------+ # | Elt|Got | Elt|Expected | # +----+------------------------------+----+------------------------------+ # | 0|bless( { | 0|bless( { | # | 1| optional_inner => bless( { | 1| optional_inner => bless( { | # | 2| other => 7, | 2| other => 7, | # | 3| value => 2 | 3| value => 2 | # * 4| }, 'Inner' ), * 4| }, 'Inner' ) * # * 5| repeated_inner => undef * | | # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) | # +----+------------------------------+----+------------------------------+ # Looks like you failed 1 test of 6. t/040_messages.t ............ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/6 subtests
On Sun Mar 20 09:51:44 2016, SREZIC wrote: Show quoted text
> On a freebsd 9.2 (with standard compiler gcc 4.2.1) t/040_messages.t fails: > > # Failed test at t/040_messages.t line 60. > # +----+------------------------------+----+------------------------------+ > # | Elt|Got | Elt|Expected | > # +----+------------------------------+----+------------------------------+ > # | 0|bless( { | 0|bless( { | > # | 1| optional_inner => bless( { | 1| optional_inner => bless( { | > # | 2| other => 7, | 2| other => 7, | > # | 3| value => 2 | 3| value => 2 | > # * 4| }, 'Inner' ), * 4| }, 'Inner' ) * > # * 5| repeated_inner => undef * | | > # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) | > # +----+------------------------------+----+------------------------------+ > # Looks like you failed 1 test of 6. > t/040_messages.t ............ > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/6 subtests
Could you try re-running the test with this patch aplied and attach the output? diff --git a/src/mapper.cpp b/src/mapper.cpp index c23cb37..1095971 100644 --- a/src/mapper.cpp +++ b/src/mapper.cpp @@ -95,7 +95,7 @@ bool Mapper::DecoderHandlers::apply_defaults_and_check() { for (int i = 0, n = fields.size(); i < n; ++i) { const Mapper::Field &field = fields[i]; bool field_seen = seen[i]; - + printf("%s %d %d\n", field.full_name().c_str(), field_seen, field.has_default); if (!field_seen && decode_explict_defaults && field.has_default) { SV *target = get_target(&i);
On 2016-03-25 10:36:20, MBARBON wrote: Show quoted text
> On Sun Mar 20 09:51:44 2016, SREZIC wrote:
> > On a freebsd 9.2 (with standard compiler gcc 4.2.1) t/040_messages.t > > fails: > > > > # Failed test at t/040_messages.t line 60. > > # +----+------------------------------+---- > > +------------------------------+ > > # | Elt|Got | Elt|Expected > > | > > # +----+------------------------------+---- > > +------------------------------+ > > # | 0|bless( { | 0|bless( { > > | > > # | 1| optional_inner => bless( { | 1| optional_inner => > > bless( { | > > # | 2| other => 7, | 2| other => 7, > > | > > # | 3| value => 2 | 3| value => 2 > > | > > # * 4| }, 'Inner' ), * 4| }, 'Inner' ) > > * > > # * 5| repeated_inner => undef * | > > | > > # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) > > | > > # +----+------------------------------+---- > > +------------------------------+ > > # Looks like you failed 1 test of 6. > > t/040_messages.t ............ > > Dubious, test returned 1 (wstat 256, 0x100) > > Failed 1/6 subtests
> > Could you try re-running the test with this patch aplied and attach > the output? > > diff --git a/src/mapper.cpp b/src/mapper.cpp > index c23cb37..1095971 100644 > --- a/src/mapper.cpp > +++ b/src/mapper.cpp > @@ -95,7 +95,7 @@ bool > Mapper::DecoderHandlers::apply_defaults_and_check() { > for (int i = 0, n = fields.size(); i < n; ++i) { > const Mapper::Field &field = fields[i]; > bool field_seen = seen[i]; > - > + printf("%s %d %d\n", field.full_name().c_str(), field_seen, > field.has_default); > if (!field_seen && decode_explict_defaults && > field.has_default) { > SV *target = get_target(&i); >
Output fragment of ./Build test verbose=1: t/040_messages.t ............ ok 1 ok 2 ok 3 ok 4 not ok 5 # Failed test at t/040_messages.t line 60. # +----+------------------------------+----+------------------------------+ # | Elt|Got | Elt|Expected | # +----+------------------------------+----+------------------------------+ # | 0|bless( { | 0|bless( { | # | 1| optional_inner => bless( { | 1| optional_inner => bless( { | # | 2| other => 7, | 2| other => 7, | # | 3| value => 2 | 3| value => 2 | # * 4| }, 'Inner' ), * 4| }, 'Inner' ) * # * 5| repeated_inner => undef * | | # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) | # +----+------------------------------+----+------------------------------+ ok 6 1..6 # Looks like you failed 1 test of 6. test.Inner.value 1 1 test.Inner.other 0 1 test.Inner.value 1 1 test.Inner.other 0 1 test.Inner.value 1 1 test.Inner.other 0 1 test.OuterWithMessage.optional_inner 1 255 test.OuterWithMessage.repeated_inner 1 255 test.OuterWithGroup.Inner.value 1 1 test.OuterWithGroup.Inner.value 1 1 test.OuterWithGroup.inner 1 8 test.Inner.value 1 1 test.Inner.other 0 1 test.Inner.value 0 1 test.Inner.other 1 1 test.OuterWithMessage.optional_inner 1 255 test.OuterWithMessage.repeated_inner 0 255 Dubious, test returned 1 (wstat 256, 0x100) Failed 1/6 subtests For some reason this test does not fail if it's executed directly using "perl -Mblib t/040_messages.t".
On Fri Mar 25 12:30:12 2016, SREZIC wrote: Show quoted text
> On 2016-03-25 10:36:20, MBARBON wrote:
> > On Sun Mar 20 09:51:44 2016, SREZIC wrote:
> > > On a freebsd 9.2 (with standard compiler gcc 4.2.1) > > > t/040_messages.t > > > fails: > > > > > > # Failed test at t/040_messages.t line 60. > > > # +----+------------------------------+---- > > > +------------------------------+ > > > # | Elt|Got | Elt|Expected > > > | > > > # +----+------------------------------+---- > > > +------------------------------+ > > > # | 0|bless( { | 0|bless( { > > > | > > > # | 1| optional_inner => bless( { | 1| optional_inner => > > > bless( { | > > > # | 2| other => 7, | 2| other => 7, > > > | > > > # | 3| value => 2 | 3| value => 2 > > > | > > > # * 4| }, 'Inner' ), * 4| }, 'Inner' ) > > > * > > > # * 5| repeated_inner => undef * | > > > | > > > # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) > > > | > > > # +----+------------------------------+---- > > > +------------------------------+ > > > # Looks like you failed 1 test of 6. > > > t/040_messages.t ............ > > > Dubious, test returned 1 (wstat 256, 0x100) > > > Failed 1/6 subtests
> > > > Could you try re-running the test with this patch aplied and attach > > the output? > > > > diff --git a/src/mapper.cpp b/src/mapper.cpp > > index c23cb37..1095971 100644 > > --- a/src/mapper.cpp > > +++ b/src/mapper.cpp > > @@ -95,7 +95,7 @@ bool > > Mapper::DecoderHandlers::apply_defaults_and_check() { > > for (int i = 0, n = fields.size(); i < n; ++i) { > > const Mapper::Field &field = fields[i]; > > bool field_seen = seen[i]; > > - > > + printf("%s %d %d\n", field.full_name().c_str(), field_seen, > > field.has_default); > > if (!field_seen && decode_explict_defaults && > > field.has_default) { > > SV *target = get_target(&i); > >
> > Output fragment of ./Build test verbose=1: > > t/040_messages.t ............ > ok 1 > ok 2 > ok 3 > ok 4 > not ok 5 > > # Failed test at t/040_messages.t line 60. > # +----+------------------------------+---- > +------------------------------+ > # | Elt|Got | Elt|Expected > | > # +----+------------------------------+---- > +------------------------------+ > # | 0|bless( { | 0|bless( { > | > # | 1| optional_inner => bless( { | 1| optional_inner => bless( > { | > # | 2| other => 7, | 2| other => 7, > | > # | 3| value => 2 | 3| value => 2 > | > # * 4| }, 'Inner' ), * 4| }, 'Inner' ) > * > # * 5| repeated_inner => undef * | > | > # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) > | > # +----+------------------------------+---- > +------------------------------+ > ok 6 > 1..6 > # Looks like you failed 1 test of 6. > test.Inner.value 1 1 > test.Inner.other 0 1 > test.Inner.value 1 1 > test.Inner.other 0 1 > test.Inner.value 1 1 > test.Inner.other 0 1 > test.OuterWithMessage.optional_inner 1 255 > test.OuterWithMessage.repeated_inner 1 255 > test.OuterWithGroup.Inner.value 1 1 > test.OuterWithGroup.Inner.value 1 1 > test.OuterWithGroup.inner 1 8 > test.Inner.value 1 1 > test.Inner.other 0 1 > test.Inner.value 0 1 > test.Inner.other 1 1 > test.OuterWithMessage.optional_inner 1 255 > test.OuterWithMessage.repeated_inner 0 255 > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/6 subtests > > > For some reason this test does not fail if it's executed directly > using "perl -Mblib t/040_messages.t".
diff --git a/src/mapper.cpp b/src/mapper.cpp index c23cb37..b2e9ce9 100644 --- a/src/mapper.cpp +++ b/src/mapper.cpp @@ -441,6 +441,7 @@ Mapper::Mapper(pTHX_ Dynamic *_registry, const MessageDef *_message_def, HV *_st field.name = newSVpvn_share(field_def->name(), strlen(field_def->name()), 0); } field.name_hash = SvSHARED_HASH(field.name); + field.has_default = false; field.mapper = NULL; field.oneof_index = -1; This should fix it. Cheers, Mattia
On 2016-03-25 13:22:00, MBARBON wrote: Show quoted text
> On Fri Mar 25 12:30:12 2016, SREZIC wrote:
> > On 2016-03-25 10:36:20, MBARBON wrote:
> > > On Sun Mar 20 09:51:44 2016, SREZIC wrote:
> > > > On a freebsd 9.2 (with standard compiler gcc 4.2.1) > > > > t/040_messages.t > > > > fails: > > > > > > > > # Failed test at t/040_messages.t line 60. > > > > # +----+------------------------------+---- > > > > +------------------------------+ > > > > # | Elt|Got | Elt|Expected > > > > | > > > > # +----+------------------------------+---- > > > > +------------------------------+ > > > > # | 0|bless( { | 0|bless( { > > > > | > > > > # | 1| optional_inner => bless( { | 1| optional_inner => > > > > bless( { | > > > > # | 2| other => 7, | 2| other => 7, > > > > | > > > > # | 3| value => 2 | 3| value => 2 > > > > | > > > > # * 4| }, 'Inner' ), * 4| }, 'Inner' ) > > > > * > > > > # * 5| repeated_inner => undef * | > > > > | > > > > # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) > > > > | > > > > # +----+------------------------------+---- > > > > +------------------------------+ > > > > # Looks like you failed 1 test of 6. > > > > t/040_messages.t ............ > > > > Dubious, test returned 1 (wstat 256, 0x100) > > > > Failed 1/6 subtests
> > > > > > Could you try re-running the test with this patch aplied and attach > > > the output? > > > > > > diff --git a/src/mapper.cpp b/src/mapper.cpp > > > index c23cb37..1095971 100644 > > > --- a/src/mapper.cpp > > > +++ b/src/mapper.cpp > > > @@ -95,7 +95,7 @@ bool > > > Mapper::DecoderHandlers::apply_defaults_and_check() { > > > for (int i = 0, n = fields.size(); i < n; ++i) { > > > const Mapper::Field &field = fields[i]; > > > bool field_seen = seen[i]; > > > - > > > + printf("%s %d %d\n", field.full_name().c_str(), > > > field_seen, > > > field.has_default); > > > if (!field_seen && decode_explict_defaults && > > > field.has_default) { > > > SV *target = get_target(&i); > > >
> > > > Output fragment of ./Build test verbose=1: > > > > t/040_messages.t ............ > > ok 1 > > ok 2 > > ok 3 > > ok 4 > > not ok 5 > > > > # Failed test at t/040_messages.t line 60. > > # +----+------------------------------+---- > > +------------------------------+ > > # | Elt|Got | Elt|Expected > > | > > # +----+------------------------------+---- > > +------------------------------+ > > # | 0|bless( { | 0|bless( { > > | > > # | 1| optional_inner => bless( { | 1| optional_inner => bless( > > { | > > # | 2| other => 7, | 2| other => 7, > > | > > # | 3| value => 2 | 3| value => 2 > > | > > # * 4| }, 'Inner' ), * 4| }, 'Inner' ) > > * > > # * 5| repeated_inner => undef * | > > | > > # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) > > | > > # +----+------------------------------+---- > > +------------------------------+ > > ok 6 > > 1..6 > > # Looks like you failed 1 test of 6. > > test.Inner.value 1 1 > > test.Inner.other 0 1 > > test.Inner.value 1 1 > > test.Inner.other 0 1 > > test.Inner.value 1 1 > > test.Inner.other 0 1 > > test.OuterWithMessage.optional_inner 1 255 > > test.OuterWithMessage.repeated_inner 1 255 > > test.OuterWithGroup.Inner.value 1 1 > > test.OuterWithGroup.Inner.value 1 1 > > test.OuterWithGroup.inner 1 8 > > test.Inner.value 1 1 > > test.Inner.other 0 1 > > test.Inner.value 0 1 > > test.Inner.other 1 1 > > test.OuterWithMessage.optional_inner 1 255 > > test.OuterWithMessage.repeated_inner 0 255 > > Dubious, test returned 1 (wstat 256, 0x100) > > Failed 1/6 subtests > > > > > > For some reason this test does not fail if it's executed directly > > using "perl -Mblib t/040_messages.t".
> > diff --git a/src/mapper.cpp b/src/mapper.cpp > index c23cb37..b2e9ce9 100644 > --- a/src/mapper.cpp > +++ b/src/mapper.cpp > @@ -441,6 +441,7 @@ Mapper::Mapper(pTHX_ Dynamic *_registry, const > MessageDef *_message_def, HV *_st > field.name = newSVpvn_share(field_def->name(), > strlen(field_def->name()), 0); > } > field.name_hash = SvSHARED_HASH(field.name); > + field.has_default = false; > field.mapper = NULL; > field.oneof_index = -1; > > This should fix it. >
Yes! Regards, Slaven
On 2016-03-25 13:32:42, SREZIC wrote: Show quoted text
> On 2016-03-25 13:22:00, MBARBON wrote:
> > On Fri Mar 25 12:30:12 2016, SREZIC wrote:
> > > On 2016-03-25 10:36:20, MBARBON wrote:
> > > > On Sun Mar 20 09:51:44 2016, SREZIC wrote:
> > > > > On a freebsd 9.2 (with standard compiler gcc 4.2.1) > > > > > t/040_messages.t > > > > > fails: > > > > > > > > > > # Failed test at t/040_messages.t line 60. > > > > > # +----+------------------------------+---- > > > > > +------------------------------+ > > > > > # | Elt|Got | Elt|Expected > > > > > | > > > > > # +----+------------------------------+---- > > > > > +------------------------------+ > > > > > # | 0|bless( { | 0|bless( { > > > > > | > > > > > # | 1| optional_inner => bless( { | 1| optional_inner => > > > > > bless( { | > > > > > # | 2| other => 7, | 2| other => 7, > > > > > | > > > > > # | 3| value => 2 | 3| value => 2 > > > > > | > > > > > # * 4| }, 'Inner' ), * 4| }, 'Inner' ) > > > > > * > > > > > # * 5| repeated_inner => undef * | > > > > > | > > > > > # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) > > > > > | > > > > > # +----+------------------------------+---- > > > > > +------------------------------+ > > > > > # Looks like you failed 1 test of 6. > > > > > t/040_messages.t ............ > > > > > Dubious, test returned 1 (wstat 256, 0x100) > > > > > Failed 1/6 subtests
> > > > > > > > Could you try re-running the test with this patch aplied and attach > > > > the output? > > > > > > > > diff --git a/src/mapper.cpp b/src/mapper.cpp > > > > index c23cb37..1095971 100644 > > > > --- a/src/mapper.cpp > > > > +++ b/src/mapper.cpp > > > > @@ -95,7 +95,7 @@ bool > > > > Mapper::DecoderHandlers::apply_defaults_and_check() { > > > > for (int i = 0, n = fields.size(); i < n; ++i) { > > > > const Mapper::Field &field = fields[i]; > > > > bool field_seen = seen[i]; > > > > - > > > > + printf("%s %d %d\n", field.full_name().c_str(), > > > > field_seen, > > > > field.has_default); > > > > if (!field_seen && decode_explict_defaults && > > > > field.has_default) { > > > > SV *target = get_target(&i); > > > >
> > > > > > Output fragment of ./Build test verbose=1: > > > > > > t/040_messages.t ............ > > > ok 1 > > > ok 2 > > > ok 3 > > > ok 4 > > > not ok 5 > > > > > > # Failed test at t/040_messages.t line 60. > > > # +----+------------------------------+---- > > > +------------------------------+ > > > # | Elt|Got | Elt|Expected > > > | > > > # +----+------------------------------+---- > > > +------------------------------+ > > > # | 0|bless( { | 0|bless( { > > > | > > > # | 1| optional_inner => bless( { | 1| optional_inner => bless( > > > { | > > > # | 2| other => 7, | 2| other => 7, > > > | > > > # | 3| value => 2 | 3| value => 2 > > > | > > > # * 4| }, 'Inner' ), * 4| }, 'Inner' ) > > > * > > > # * 5| repeated_inner => undef * | > > > | > > > # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) > > > | > > > # +----+------------------------------+---- > > > +------------------------------+ > > > ok 6 > > > 1..6 > > > # Looks like you failed 1 test of 6. > > > test.Inner.value 1 1 > > > test.Inner.other 0 1 > > > test.Inner.value 1 1 > > > test.Inner.other 0 1 > > > test.Inner.value 1 1 > > > test.Inner.other 0 1 > > > test.OuterWithMessage.optional_inner 1 255 > > > test.OuterWithMessage.repeated_inner 1 255 > > > test.OuterWithGroup.Inner.value 1 1 > > > test.OuterWithGroup.Inner.value 1 1 > > > test.OuterWithGroup.inner 1 8 > > > test.Inner.value 1 1 > > > test.Inner.other 0 1 > > > test.Inner.value 0 1 > > > test.Inner.other 1 1 > > > test.OuterWithMessage.optional_inner 1 255 > > > test.OuterWithMessage.repeated_inner 0 255 > > > Dubious, test returned 1 (wstat 256, 0x100) > > > Failed 1/6 subtests > > > > > > > > > For some reason this test does not fail if it's executed directly > > > using "perl -Mblib t/040_messages.t".
> > > > diff --git a/src/mapper.cpp b/src/mapper.cpp > > index c23cb37..b2e9ce9 100644 > > --- a/src/mapper.cpp > > +++ b/src/mapper.cpp > > @@ -441,6 +441,7 @@ Mapper::Mapper(pTHX_ Dynamic *_registry, const > > MessageDef *_message_def, HV *_st > > field.name = newSVpvn_share(field_def->name(), > > strlen(field_def->name()), 0); > > } > > field.name_hash = SvSHARED_HASH(field.name); > > + field.has_default = false; > > field.mapper = NULL; > > field.oneof_index = -1; > > > > This should fix it. > >
> > Yes! > > Regards, > Slaven
Current releases look good, resolving...