[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl5-changes
Subject:    [Perl/perl5] 0dcb31: Tie::File: use File::Temp in two test scripts
From:       iabyn via perl5-changes <perl5-changes () perl ! org>
Date:       2024-02-27 11:12:03
Message-ID: Perl/perl5/push/refs/heads/blead/8f7708-0dcb31 () github ! com
[Download RAW message or body]

  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 0dcb31c5c86b04e1b52bb0eb548d3430ae796dd5
      https://github.com/Perl/perl5/commit/0dcb31c5c86b04e1b52bb0eb548d3430ae796dd5
  Author: David Mitchell <davem@iabyn.com>
  Date:   2024-02-27 (Tue, 27 Feb 2024)

  Changed paths:
    M dist/Tie-File/t/29_downcopy.t
    M dist/Tie-File/t/29a_upcopy.t

  Log Message:
  -----------
  Tie::File: use File::Temp in two test scripts

t/29_downcopy.t and t/29a_upcopy.t intermittently timeout on some
smokers. This is speculated to be due to the current directory being on
a very slow USB drive, when lots of small test files are created,
modified and deleted by these tests. So making these tests I/O bound
rather than CPU bound.

Update these two test scripts to use File::Temp to create a temp subdir in
the OS's normal temp directory as a place for the temp files, rather
than just the current directory.

This has two potential advantages. First the OS's normal tempdir (e.g.
/tmp or wherever $TMPDIR points to) may be mounted as tmpfs or
similar, and thus won't actually write to a slow USB or network drive.
Second, each test file will be created in directory that's normally
empty, so there's potentially less manipulating of the directory
information on disk.

In this thread,

    http://nntp.perl.org/group/perl.perl5.porters/267991

the wallclock time taken for 29_downcopy.t on a raspberry pi reduced
from 55.29s to 0.91s with the application of this patch.



To unsubscribe from these emails, change your notification settings at \
https://github.com/Perl/perl5/settings/notifications


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic