houseabsolute / Log-Dispatch

Dispatches messages to one or more outputs
https://metacpan.org/release/Log-Dispatch/
Other
12 stars 29 forks source link

Windows 10, MSYS2: Test t/file-locked.t fails #63

Closed hakonhagland closed 4 years ago

hakonhagland commented 4 years ago

System info: Windows 10, MSYS2, perl version 5.32.0.

$ cpanm -v  Log::Dispatch
cpanm (App::cpanminus) 1.7044 on perl 5.032000 built for x86_64-msys-thread-multi
Work directory is /home/hakon/.cpanm/work/1595230026.26931
You have make /usr/bin/make
You have LWP 6.46
You have /usr/bin/tar: tar (GNU tar) 1.32
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
Searching Log::Dispatch () on cpanmetadb ...
--> Working on Log::Dispatch
Fetching http://www.cpan.org/authors/id/D/DR/DROLSKY/Log-Dispatch-2.69.tar.gz ... OK
Unpacking Log-Dispatch-2.69.tar.gz
Log-Dispatch-2.69/
Log-Dispatch-2.69/Makefile.PL
Log-Dispatch-2.69/META.yml
Log-Dispatch-2.69/Changes
Log-Dispatch-2.69/CONTRIBUTING.md
Log-Dispatch-2.69/LICENSE
Log-Dispatch-2.69/README.md
Log-Dispatch-2.69/perltidyrc
Log-Dispatch-2.69/META.json
Log-Dispatch-2.69/CODE_OF_CONDUCT.md
Log-Dispatch-2.69/lib/
Log-Dispatch-2.69/lib/Log/
Log-Dispatch-2.69/lib/Log/Dispatch/
Log-Dispatch-2.69/lib/Log/Dispatch/Conflicts.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Base.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Syslog.pm
Log-Dispatch-2.69/lib/Log/Dispatch/ApacheLog.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Email.pm
Log-Dispatch-2.69/lib/Log/Dispatch/File/
Log-Dispatch-2.69/lib/Log/Dispatch/File/Locked.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Null.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Email/
Log-Dispatch-2.69/lib/Log/Dispatch/Email/MIMELite.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Email/MailSend.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Email/MailSendmail.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Email/MailSender.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Handle.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Output.pm
Log-Dispatch-2.69/lib/Log/Dispatch/File.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Code.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Types.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Vars.pm
Log-Dispatch-2.69/lib/Log/Dispatch/Screen.pm
Log-Dispatch-2.69/lib/Log/Dispatch.pm
Log-Dispatch-2.69/xt/
Log-Dispatch-2.69/xt/release/
Log-Dispatch-2.69/xt/release/cpan-changes.t
Log-Dispatch-2.69/xt/release/meta-json.t
Log-Dispatch-2.69/xt/author/
Log-Dispatch-2.69/xt/author/pod-spell.t
Log-Dispatch-2.69/xt/author/no-tabs.t
Log-Dispatch-2.69/xt/author/portability.t
Log-Dispatch-2.69/xt/author/mojibake.t
Log-Dispatch-2.69/xt/author/test-version.t
Log-Dispatch-2.69/xt/author/test-dependents.t
Log-Dispatch-2.69/xt/author/pod-coverage.t
Log-Dispatch-2.69/xt/author/pod-syntax.t
Log-Dispatch-2.69/xt/author/eol.t
Log-Dispatch-2.69/xt/author/tidyall.t
Log-Dispatch-2.69/appveyor.yml
Log-Dispatch-2.69/weaver.ini
Log-Dispatch-2.69/perlcriticrc
Log-Dispatch-2.69/cpanfile
Log-Dispatch-2.69/tidyall.ini
Log-Dispatch-2.69/t/
Log-Dispatch-2.69/t/screen.t
Log-Dispatch-2.69/t/00-report-prereqs.dd
Log-Dispatch-2.69/t/close-after-write.t
Log-Dispatch-2.69/t/sendmail
Log-Dispatch-2.69/t/short-syntax.t
Log-Dispatch-2.69/t/file-locked.t
Log-Dispatch-2.69/t/00-report-prereqs.t
Log-Dispatch-2.69/t/lib/
Log-Dispatch-2.69/t/lib/Log/
Log-Dispatch-2.69/t/lib/Log/Dispatch/
Log-Dispatch-2.69/t/lib/Log/Dispatch/TestUtil.pm
Log-Dispatch-2.69/t/email-exit.t
Log-Dispatch-2.69/t/screen-helper.pl
Log-Dispatch-2.69/t/syslog-threads.t
Log-Dispatch-2.69/t/binmode.t
Log-Dispatch-2.69/t/syslog.t
Log-Dispatch-2.69/t/00-compile.t
Log-Dispatch-2.69/t/email-exit-helper.pl
Log-Dispatch-2.69/t/syslog-lock-without-preloaded-threads.t
Log-Dispatch-2.69/t/basic.t
Log-Dispatch-2.69/t/lazy-open.t
Log-Dispatch-2.69/MANIFEST
Log-Dispatch-2.69/INSTALL
Log-Dispatch-2.69/dist.ini
Entering Log-Dispatch-2.69
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.44)
Checking if you have Dist::CheckConflicts 0.02 ... Yes (0.11)
Running Makefile.PL
Configuring Log-Dispatch-2.69 ... Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Log::Dispatch
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have Params::ValidationCompiler 0 ... Yes (0.30)
Checking if you have PerlIO 0 ... Yes (1.11)
Checking if you have Specio 0.32 ... Yes (0.46)
Checking if you have File::Temp 0 ... Yes (0.2309)
Checking if you have FindBin 0 ... Yes (1.51)
Checking if you have Scalar::Util 0 ... Yes (1.55)
Checking if you have Test::More 0.96 ... Yes (1.302175)
Checking if you have Module::Runtime 0 ... Yes (0.016)
Checking if you have warnings 0 ... Yes (1.47)
Checking if you have Specio::Library::String 0 ... Yes (0.46)
Checking if you have Specio::Library::Numeric 0 ... Yes (0.46)
Checking if you have parent 0 ... Yes (0.238)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.44)
Checking if you have Carp 0 ... Yes (1.50)
Checking if you have Test::Fatal 0 ... Yes (0.014)
Checking if you have IPC::Run3 0 ... Yes (0.048)
Checking if you have strict 0 ... Yes (1.11)
Checking if you have base 0 ... Yes (2.27)
Checking if you have Specio::Exporter 0 ... Yes (0.46)
Checking if you have Exporter 0 ... Yes (5.74)
Checking if you have Try::Tiny 0 ... Yes (0.30)
Checking if you have File::Spec 0 ... Yes (3.78)
Checking if you have Devel::GlobalDestruction 0 ... Yes (0.14)
Checking if you have Fcntl 0 ... Yes (1.13)
Checking if you have Data::Dumper 0 ... Yes (2.174)
Checking if you have IO::Handle 0 ... Yes (1.42)
Checking if you have utf8 0 ... Yes (1.22)
Checking if you have Dist::CheckConflicts 0.02 ... Yes (0.11)
Checking if you have Test::Needs 0 ... Yes (0.002006)
Checking if you have namespace::autoclean 0 ... Yes (0.29)
Checking if you have Specio::Library::Builtins 0 ... Yes (0.46)
Checking if you have Sys::Syslog 0.28 ... Yes (0.36)
Checking if you have lib 0 ... Yes (0.65)
Checking if you have IO::File 0 ... Yes (1.41)
Checking if you have Encode 0 ... Yes (3.06)
Checking if you have Getopt::Long 0 ... Yes (2.51)
Checking if you have Specio::Declare 0 ... Yes (0.46)
Checking if you have POSIX 0 ... Yes (1.94)
Building and testing Log-Dispatch-2.69 ... cp lib/Log/Dispatch/Email/MIMELite.pm blib/lib/Log/Dispatch/Email/MIMELite.pm
cp lib/Log/Dispatch/Code.pm blib/lib/Log/Dispatch/Code.pm
cp lib/Log/Dispatch/Base.pm blib/lib/Log/Dispatch/Base.pm
cp lib/Log/Dispatch/Conflicts.pm blib/lib/Log/Dispatch/Conflicts.pm
cp lib/Log/Dispatch/Handle.pm blib/lib/Log/Dispatch/Handle.pm
cp lib/Log/Dispatch/Email/MailSendmail.pm blib/lib/Log/Dispatch/Email/MailSendmail.pm
cp lib/Log/Dispatch/ApacheLog.pm blib/lib/Log/Dispatch/ApacheLog.pm
cp lib/Log/Dispatch/Syslog.pm blib/lib/Log/Dispatch/Syslog.pm
cp lib/Log/Dispatch/Vars.pm blib/lib/Log/Dispatch/Vars.pm
cp lib/Log/Dispatch/Email.pm blib/lib/Log/Dispatch/Email.pm
cp lib/Log/Dispatch/File.pm blib/lib/Log/Dispatch/File.pm
cp lib/Log/Dispatch/Screen.pm blib/lib/Log/Dispatch/Screen.pm
cp lib/Log/Dispatch/Email/MailSend.pm blib/lib/Log/Dispatch/Email/MailSend.pm
cp lib/Log/Dispatch/Email/MailSender.pm blib/lib/Log/Dispatch/Email/MailSender.pm
cp lib/Log/Dispatch/Output.pm blib/lib/Log/Dispatch/Output.pm
cp lib/Log/Dispatch/Null.pm blib/lib/Log/Dispatch/Null.pm
cp lib/Log/Dispatch/File/Locked.pm blib/lib/Log/Dispatch/File/Locked.pm
cp lib/Log/Dispatch.pm blib/lib/Log/Dispatch.pm
cp lib/Log/Dispatch/Types.pm blib/lib/Log/Dispatch/Types.pm
Manifying 18 pod documents
PERL_DL_NONLAZY=1 "/usr/bin/perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-compile.t ............................. ok
t/00-report-prereqs.t ...................... 1/1 #
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
#     Module               Want Have
#     -------------------- ---- ----
#     Dist::CheckConflicts 0.02 0.11
#     ExtUtils::MakeMaker   any 7.44
#
# === Configure Suggests ===
#
#     Module      Want Have
#     -------- ------- ----
#     JSON::PP 2.27300 4.04
#
# === Build Requires ===
#
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.44
#
# === Test Requires ===
#
#     Module              Want     Have
#     ------------------- ---- --------
#     Data::Dumper         any    2.174
#     ExtUtils::MakeMaker  any     7.44
#     File::Spec           any     3.78
#     File::Temp           any   0.2309
#     FindBin              any     1.51
#     Getopt::Long         any     2.51
#     IO::File             any     1.41
#     IPC::Run3            any    0.048
#     POSIX                any     1.94
#     PerlIO               any     1.11
#     Test::Fatal          any    0.014
#     Test::More          0.96 1.302175
#     Test::Needs          any 0.002006
#     lib                  any     0.65
#     utf8                 any     1.22
#
# === Test Recommends ===
#
#     Module         Want     Have
#     ---------- -------- --------
#     CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
#     Module                     Want  Have
#     -------------------------- ---- -----
#     Carp                        any  1.50
#     Devel::GlobalDestruction    any  0.14
#     Dist::CheckConflicts       0.02  0.11
#     Encode                      any  3.06
#     Exporter                    any  5.74
#     Fcntl                       any  1.13
#     IO::Handle                  any  1.42
#     Module::Runtime             any 0.016
#     Params::ValidationCompiler  any  0.30
#     Scalar::Util                any  1.55
#     Specio                     0.32  0.46
#     Specio::Declare             any  0.46
#     Specio::Exporter            any  0.46
#     Specio::Library::Builtins   any  0.46
#     Specio::Library::Numeric    any  0.46
#     Specio::Library::String     any  0.46
#     Sys::Syslog                0.28  0.36
#     Try::Tiny                   any  0.30
#     base                        any  2.27
#     namespace::autoclean        any  0.29
#     parent                      any 0.238
#     strict                      any  1.11
#     warnings                    any  1.47
#
t/00-report-prereqs.t ...................... ok
t/basic.t .................................. ok
t/binmode.t ................................ ok
t/close-after-write.t ...................... ok
t/email-exit.t ............................. skipped: This test only runs for the maintainer
t/file-locked.t ............................
    #   Failed test '10 children exited'
    #   at t/file-locked.t line 109.
    #          got: '5'
    #     expected: '10'

    #   Failed test 'file contains expected content'
    #   at t/file-locked.t line 138.
    #     Structures begin differing at:
    #          $got->[17] = '3'
    #     $expected->[17] = '2'
    # 1
    # 1
    # 1
    # 1
    # 1
    # 2
    # 2
    # 2
    # 2
    # 3
    # 3
    # 3
    # 3
    # 2
    # 1
    # 1
    # 3
    # 1
    # 1
    # 2
    # 2
    # 1
t/file-locked.t ............................ 1/?     # Looks like you failed 2 tests of 8.

#   Failed test 'close_after_write = 0'
#   at t/file-locked.t line 21.
t/file-locked.t ............................ 2/?
    #   Failed test '10 children exited'
    #   at t/file-locked.t line 109.
    #          got: '5'
    #     expected: '10'

    #   Failed test 'file contains expected content'
    #   at t/file-locked.t line 138.
    #     Structures begin differing at:
    #          $got->[16] = '3'
    #     $expected->[16] = '2'
    # 1
    # 1
    # 1
    # 1
    # 1
    # 2
    # 2
    # 2
    # 3
    # 3
    # 3
    # 2
    # 2
    # 1
    # 3
    # 3
    # 1
    # 1
    # 1
    # 2
    # 1
    # Looks like you failed 2 tests of 8.

#   Failed test 'close_after_write = 1'
#   at t/file-locked.t line 21.
# Looks like you failed 2 tests of 2.
Cannot write to '/tmp/GooGpKXgE2/lock-test.log': No such file or directory at /home/hakon/.cpanm/work/1595230026.26931/Log-Dispatch-2.69/blib/lib/Log/Dispatch/File.pm line 101.
Cannot write to '/tmp/GooGpKXgE2/lock-test.log': No such file or directory at /home/hakon/.cpanm/work/1595230026.26931/Log-Dispatch-2.69/blib/lib/Log/Dispatch/File.pm line 101.
Cannot write to '/tmp/GooGpKXgE2/lock-test.log': No such file or directory at /home/hakon/.cpanm/work/1595230026.26931/Log-Dispatch-2.69/blib/lib/Log/Dispatch/File.pm line 101.
Cannot write to '/tmp/GooGpKXgE2/lock-test.log': No such file or directory at /home/hakon/.cpanm/work/1595230026.26931/Log-Dispatch-2.69/blib/lib/Log/Dispatch/File.pm line 101.
t/file-locked.t ............................ Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2 subtests
t/lazy-open.t .............................. ok
t/screen.t ................................. ok
t/short-syntax.t ........................... ok
t/syslog-lock-without-preloaded-threads.t .. ok
t/syslog-threads.t ......................... ok
t/syslog.t ................................. ok

Test Summary Report
-------------------
t/file-locked.t                          (Wstat: 512 Tests: 2 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
Files=13, Tests=84, 38 wallclock secs ( 0.08 usr  0.09 sys + 12.61 cusr  9.74 csys = 22.53 CPU)
Result: FAIL
Failed 1/13 test programs. 2/84 subtests failed.
make: *** [Makefile:996: test_dynamic] Error 255
FAIL
! Installing Log::Dispatch failed. See /home/hakon/.cpanm/work/1595230026.26931/build.log for details. Retry with --force to force install it.
hakonhagland commented 4 years ago

This seems to be fixed by increasing the period waiting for children to finish in t/file-locked.t. Using the value of 30 secs instead of 10 secs makes the test pass as proposed in PR #61. Please upload the fix to CPAN.

autarch commented 4 years ago

Done.