Ticket #1267 (closed bug: done)

Opened 5 years ago

Last modified 5 years ago

t/op/bitwise.t: Test failure subsequent to skip BigInt

Reported by: jkeenan Owned by: jkeenan
Priority: normal Milestone:
Component: testing Version: 1.7.0
Severity: medium Keywords:
Cc: dukeleto Language:
Patch status: applied Platform:

Description

parrot] 512 $ prove -v t/op/bitwise.t 
t/op/bitwise....1..68
ok 1 - shr_i_i_i (>>)
ok 2 - shr_i_i_i (>>)
...
ok 67 #skip no BigInt lib found
FAILED test 68
	Failed 1/68 tests, 98.53% okay (less 1 skipped test: 66 okay, 97.06%)
Failed Test    Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/op/bitwise.t               68    1  68
1 subtest skipped.
Failed 1/1 test scripts. 1/68 subtests failed.
Files=1, Tests=68,  2 wallclock secs ( 0.03 cusr +  0.03 csys =  0.06 CPU)
Failed 1/1 test programs. 1/68 subtests failed.

File was changed today.

[parrot] 513 $ head -v t/op/bitwise.t 
==> t/op/bitwise.t <==
#!parrot
# Copyright (C) 2001-2009, Parrot Foundation.
# $Id: bitwise.t 42478 2009-11-13 07:18:14Z dukeleto $

=head1 NAME

t/op/bitwise.t - Bitwise Ops

Attachments

arithmetics_pmc_t.patch Download (398 bytes) - added by bubaflub 5 years ago.
patch for t/op/arithemtics_pmc.t
bitwise_t.patch Download (463 bytes) - added by bubaflub 5 years ago.
v2 - actually fixes the problem with t/op/bitwise.t

Change History

  Changed 5 years ago by dukeleto

This from the conversion of this file from Perl to PIR. Currently looking into it.

  Changed 5 years ago by bubaflub

This should fix the test. Apply it and let me know if it works.

  Changed 5 years ago by bubaflub

If that works, this next patch should fix the same problem in t/op/arithmetics_pmc.t

Changed 5 years ago by bubaflub

patch for t/op/arithemtics_pmc.t

follow-up: ↓ 6   Changed 5 years ago by bubaflub

Ok, ignore the arithmetics_pmc_t.patch... the problem wasn't that we need to check the config has with an int and not a string, but that the test in t/op/bitwise.t needs to skip two tests and not one. I've updated the patch, did a make realclean, configured Parrot without gmp, patched it and it runs.

Changed 5 years ago by bubaflub

v2 - actually fixes the problem with t/op/bitwise.t

  Changed 5 years ago by jkeenan

  • status changed from new to assigned
  • owner set to jkeenan
  • patch set to applied

Applied bitwise_t.patch in r42491.

This properly skipped tests on an box where BigInt was not installed:

ok 66 - rot_i_i_ic_ic
ok 67 #skip no BigInt lib found
ok 68 #skip no BigInt lib found
ok
        2/68 skipped: various reasons
All tests successful, 2 subtests skipped.
Files=1, Tests=68,  1 wallclock secs ( 0.04 cusr +  0.02 csys =  0.06 CPU)

in reply to: ↑ 4   Changed 5 years ago by jkeenan

Replying to bubaflub:

Ok, ignore the arithmetics_pmc_t.patch... the problem wasn't that we need to check the config has with an int and not a string, but that the test in t/op/bitwise.t needs to skip two tests and not one. I've updated the patch, did a make realclean, configured Parrot without gmp, patched it and it runs.

A question of clarification: If during configuration, I am told that a particular box has GMP installed ...

auto::gmp -           Does your platform support GMP......................yes.

... does it follow that the BigInt library referred to in this testfile is therefore present?

If so, then why am I getting:

ok 67 #skip no BigInt lib found
ok 68 #skip no BigInt lib found

on both my Linux/i386 and Darwin/PPC setups where Configure.pl tells me I have GMP?

If not, then what would I have to do install to get a box where this test file would not hit the skip case?

Thank you very much.

kid51

follow-up: ↓ 8   Changed 5 years ago by dukeleto

The relevant bit of code is:

    .include "iglobals.pasm"
    .local pmc interp     # a handle to our interpreter object.
    interp = getinterp
    .local pmc config
    config = interp[.IGLOBALS_CONFIG_HASH]
    .local int gmp
    gmp = config['gmp']

    if gmp, runtest
    skip( 2, 'no BigInt lib found' )
    goto END

This seems to be correct at first glance, but GMP detection at test-time is definitely b0rked in some way, at least on some platforms.

in reply to: ↑ 7 ; follow-up: ↓ 9   Changed 5 years ago by jkeenan

Replying to dukeleto:

This seems to be correct at first glance, but GMP detection at test-time is definitely b0rked in some way, at least on some platforms.

I agree. I just looked at Smolder reports for several OS/platform/C-compiler combinations. In every case, tests 67 and 68 in this test were SKIP-ped on the grounds of:

ok 67 #skip no BigInt lib found
ok 68 #skip no BigInt lib found

I suspect that at least one of these smoke-testers has GMP installed. So I further suspect that the tests in t/op/bitwise.t are never detecting the libraries for BigInt.

The implication for me is that I don't know whether I can safely apply patches in other TTs that refer to bigint (e.g., TT #1350) or bignum (e.g., TT #1351).

Can anyone else shed light on these issues? Thank you very much.

kid51

in reply to: ↑ 8   Changed 5 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to done

Replying to jkeenan:

> The implication for me is that I don't know whether 
> I can safely apply patches in '''other''' TTs that 
> refer to bigint (e.g., TT #1350) or bignum (e.g., TT #1351).
> 
> Can anyone else shed light on these issues?  Thank you very much.

Well, since Cotto applied the patches in TT #1350 and TT #1351 and closed those tickets, there's not much point in keeping this ticket open. Resolving.

Thank you very much.

kid51

Note: See TracTickets for help on using tickets.