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

Test bug in ExtUtils::Command - mtime checks on NFS #14734

Open
p5pRT opened this issue Jun 4, 2015 · 5 comments
Open

Test bug in ExtUtils::Command - mtime checks on NFS #14734

p5pRT opened this issue Jun 4, 2015 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 4, 2015

Migrated from rt.perl.org#125329 (status was 'open')

Searchable as RT125329$

@p5pRT
Copy link
Author

p5pRT commented Jun 4, 2015

From h.kelly@ucl.ac.uk

Trying to install perl-5.22.0 via perlbrew 0.74. Our install area is on NFS and perlbrew's build directory is too.

The test is cpan/ExtUtils-Command/t/cp.t and is meant to flag up whether cp works in a Windows fashion by keeping the same last modified time as the original file.

But that's not what the test actually tests - it creates the source file, ages it backward using utime, copies it to dest, and then checks that the absolute difference between the modification time of dest and the current time is less than or equal to 1. (Why doesn't it check the difference between the mtimes of source and dest?)

The problem here is that the mtime of dest is an NFS time, which uses a different clock than the rest of the machine. So I'm getting a difference between dest and now of 52 or 53, so the test fails.

I could change where perlbrew's build directory is, but this test does appear to be badly-designed and is checking the wrong thing to find the bug it wants to find.

@p5pRT
Copy link
Author

p5pRT commented Jun 24, 2015

From @iabyn

On Thu, Jun 04, 2015 at 04​:24​:42AM -0700, hkelly wrote​:

Trying to install perl-5.22.0 via perlbrew 0.74. Our install area is on
NFS and perlbrew's build directory is too.

The test is cpan/ExtUtils-Command/t/cp.t and is meant to flag up whether
cp works in a Windows fashion by keeping the same last modified time as
the original file.

But that's not what the test actually tests - it creates the source
file, ages it backward using utime, copies it to dest, and then checks
that the absolute difference between the modification time of dest and
the current time is less than or equal to 1. (Why doesn't it check the
difference between the mtimes of source and dest?)

The problem here is that the mtime of dest is an NFS time, which uses a
different clock than the rest of the machine. So I'm getting a
difference between dest and now of 52 or 53, so the test fails.

I could change where perlbrew's build directory is, but this test does
appear to be badly-designed and is checking the wrong thing to find the
bug it wants to find.

Hmmm, ExtUtils​::Command is officially maintained upstream now, with its
META.yml listing its repository as
git​://github.com/Perl-Toolchain-Gang/extutils-command.git;
yet META.yml still lists its bug tracker as being the perl bugtracker
(http​://rt.perl.org/rt3/).

Anyone know where this ticket should be redirected to?

--
Nothing ventured, nothing lost.

@p5pRT
Copy link
Author

p5pRT commented Jun 24, 2015

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

@p5pRT
Copy link
Author

p5pRT commented Jun 24, 2015

From @Leont

On Wed, Jun 24, 2015 at 12​:32 PM, Dave Mitchell <davem@​iabyn.com> wrote​:

On Thu, Jun 04, 2015 at 04​:24​:42AM -0700, hkelly wrote​:

Trying to install perl-5.22.0 via perlbrew 0.74. Our install area is on
NFS and perlbrew's build directory is too.

The test is cpan/ExtUtils-Command/t/cp.t and is meant to flag up whether
cp works in a Windows fashion by keeping the same last modified time as
the original file.

But that's not what the test actually tests - it creates the source
file, ages it backward using utime, copies it to dest, and then checks
that the absolute difference between the modification time of dest and
the current time is less than or equal to 1. (Why doesn't it check the
difference between the mtimes of source and dest?)

The problem here is that the mtime of dest is an NFS time, which uses a
different clock than the rest of the machine. So I'm getting a
difference between dest and now of 52 or 53, so the test fails.

I could change where perlbrew's build directory is, but this test does
appear to be badly-designed and is checking the wrong thing to find the
bug it wants to find.

Hmmm, ExtUtils​::Command is officially maintained upstream now, with its
META.yml listing its repository as
git​://github.com/Perl-Toolchain-Gang/extutils-command.git;
yet META.yml still lists its bug tracker as being the perl bugtracker
(http​://rt.perl.org/rt3/).

Anyone know where this ticket should be redirected to?

It has been merged into ExtUtils-MakeMaker, but there hasn't been a stable
release since that merge.

Leon

@p5pRT
Copy link
Author

p5pRT commented Jun 24, 2015

From @iabyn

On Wed, Jun 24, 2015 at 02​:00​:46PM +0200, Leon Timmermans wrote​:

It has been merged into ExtUtils-MakeMaker, but there hasn't been a stable
release since that merge.

So should the OP send a new bug report to bug-ExtUtils-MakeMaker [at]
rt.cpan.org ?

--
Nothing ventured, nothing lost.

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

2 participants