Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH: Test comp/use.t fails on Tru64 #7474

Closed
p5pRT opened this issue Aug 23, 2004 · 5 comments
Closed

PATCH: Test comp/use.t fails on Tru64 #7474

p5pRT opened this issue Aug 23, 2004 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 23, 2004

Migrated from rt.perl.org#31295 (status was 'resolved')

Searchable as RT31295$

@p5pRT
Copy link
Author

p5pRT commented Aug 23, 2004

From Nikola.Milutinovic@ev.co.yu

Hi.

I have run into a minor bug in tests.

OS​: Tru64 UNIX 5.1B + SP4
PERL​: 5.8.5, Multi-threading (ithreads), long double

Failed test was 3/28 of "t/comp/use.t" suite. The error output looks
like this​:

Typhoon​:/usr/users/root/work/perl-5.8.5/t# ./perl comp/use.t.orig
1..28
ok 1
ok 2
Perl v5.8.10 required--this is only v5.8.5, stopped at (eval 3) line 1.
BEGIN failed--compilation aborted at (eval 3) line 1.

not ok 3
ok 4
ok 5
...
[SNIP]
...
ok 28

I have traced this bug to the following​:

eval sprintf "use %.5f;", $];

The problem is that "$]" evaluates to "5.008005000..." and "%.5f" rounds
it to "5.00801", which gets (correctly) understood as 5.8.10 version.
Changing "%.5f" to "%.6f" corrects the problem. Initially, I used
"%.10f", but I think that 6 digits will do. I have attached a patch.

Nix.

@p5pRT
Copy link
Author

p5pRT commented Aug 23, 2004

From Nikola.Milutinovic@ev.co.yu

perl-5.8.5_test_use.diff
*** t/comp/use.t.orig	Mon Aug 23 11:54:38 2004
--- t/comp/use.t	Mon Aug 23 12:16:24 2004
***************
*** 22,28 ****
  }
  print "ok ",$i++,"\n";
  
! eval sprintf "use %.5f;", $];
  if ($@) {
      print STDERR $@,"\n";
      print "not ";
--- 22,28 ----
  }
  print "ok ",$i++,"\n";
  
! eval sprintf "use %.6f;", $];
  if ($@) {
      print STDERR $@,"\n";
      print "not ";
***************
*** 30,36 ****
  print "ok ",$i++,"\n";
  
  
! eval sprintf "use %.5f;", $] - 0.000001;
  if ($@) {
      print STDERR $@,"\n";
      print "not ";
--- 30,36 ----
  print "ok ",$i++,"\n";
  
  
! eval sprintf "use %.6f;", $] - 0.000001;
  if ($@) {
      print STDERR $@,"\n";
      print "not ";
***************
*** 37,49 ****
  }
  print "ok ",$i++,"\n";
  
! eval sprintf("use %.5f;", $] + 1);
  unless ($@) {
      print "not ";
  }
  print "ok ",$i++,"\n";
  
! eval sprintf "use %.5f;", $] + 0.00001;
  unless ($@) {
      print "not ";
  }
--- 37,49 ----
  }
  print "ok ",$i++,"\n";
  
! eval sprintf("use %.6f;", $] + 1);
  unless ($@) {
      print "not ";
  }
  print "ok ",$i++,"\n";
  
! eval sprintf "use %.6f;", $] + 0.00001;
  unless ($@) {
      print "not ";
  }

@p5pRT
Copy link
Author

p5pRT commented Aug 23, 2004

From @rgs

Nikola Milutinovic (via RT) wrote​:

I have traced this bug to the following​:

eval sprintf "use %.5f;", $];

The problem is that "$]" evaluates to "5.008005000..." and "%.5f" rounds
it to "5.00801", which gets (correctly) understood as 5.8.10 version.
Changing "%.5f" to "%.6f" corrects the problem. Initially, I used
"%.10f", but I think that 6 digits will do. I have attached a patch.

Thanks, I applied it to bleadperl as change #23235.

@p5pRT
Copy link
Author

p5pRT commented Aug 23, 2004

The RT System itself - Status changed from 'new' to 'open'

@p5pRT p5pRT closed this as completed Aug 23, 2004
@p5pRT
Copy link
Author

p5pRT commented Aug 23, 2004

@rgs - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant