On Sat May 16 17:01:49 2020, jkeenan@pobox.com wrote:
Show quoted text> Please be aware of the following github issues and pull requests which
> have an impact on Test-Smoke's test suite.
Show quoted text> [snip]
>
> Test-Smoke maintainers should follow these tickets and anticipate a
> new
> CPAN release of HTTP::Daemon. I ask that you then revise
> t/poster-post.t as needed.
>
At
https://github.com/jkeenan/Test-Smoke/tree/adapt-t-poster-post, you will find a branch of Test-Smoke which is rebased on Test-Smoke-1.77 and which eliminates the "workaround" in t/poster-post.t.
I then built Test-Smoke against bleadperl. I then ran t/poster-post.t using the patched version of HTTP::Daemon proposed by skaji in
https://github.com/libwww-perl/HTTP-Daemon/pull/40.
I got different results on different operating systems.
On FreeBSD-11, I got:
#####
$ bleadprove -I/usr/home/jkeenan/learn/perl/HTTP-Daemon-6.07-patched/lib -vb t/poster-post.t
t/poster-post.t ..
# HTTP::Daemon 6.07_001
# HTTP::Response 6.22
# Temporary daemon at: http://[::1]:36990/
# LWP::UserAgent 6.44
ok 1 - An object of class 'Test::Smoke::Poster::LWP_UserAgent' isa 'Test::Smoke::Poster::LWP_UserAgent'
ok 2 - write_json
ok 3 - Got id
ok 4 - An object of class 'Test::Smoke::Poster::Curl' isa 'Test::Smoke::Poster::Curl'
ok 5 - write_json
ok 6 - Got id
# HTTP::Tiny 0.076
ok 7 - An object of class 'Test::Smoke::Poster::HTTP_Tiny' isa 'Test::Smoke::Poster::HTTP_Tiny'
ok 8 - write_json
ok 9 - Got id
# HTTP::Lite 2.44
ok 10 - An object of class 'Test::Smoke::Poster::HTTP_Lite' isa 'Test::Smoke::Poster::HTTP_Lite'
ok 11 - write_json
not ok 12 - Got id
# Failed test 'Got id'
# at t/poster-post.t line 171.
# got: '[]: CoreSmokeDB: at t/poster-post.t line 169.
# at /usr/home/jkeenan/gitwork/zzzothers/Test-Smoke/blib/lib/Test/Smoke/Poster/Base.pm line 147.
# Test::Smoke::Poster::Base::post(Test::Smoke::Poster::HTTP_Lite=HASH(0x801c61be8)) called at t/poster-post.t line 169
# eval {...} called at t/poster-post.t line 169
# '
# expected: '42'
not ok 13 - no warnings
# Failed test 'no warnings'
# at t/poster-post.t line 176.
# There were 1 warning(s)
# Previous test 11 'write_json'
# Use of uninitialized value $response_body in concatenation (.) or string at /usr/home/jkeenan/gitwork/zzzothers/Test-Smoke/blib/lib/Test/Smoke/Poster/Base.pm line 147.
# at /usr/home/jkeenan/gitwork/zzzothers/Test-Smoke/blib/lib/Test/Smoke/Poster/Base.pm line 147.
# Test::Smoke::Poster::Base::post(Test::Smoke::Poster::HTTP_Lite=HASH(0x801c61be8)) called at t/poster-post.t line 169
# eval {...} called at t/poster-post.t line 169
#
1..13
# tear down: 97685
# Looks like you failed 2 tests of 13.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/13 subtests
Test Summary Report
-------------------
t/poster-post.t (Wstat: 512 Tests: 13 Failed: 2)
Failed tests: 12-13
Non-zero exit status: 2
Files=1, Tests=13, 0 wallclock secs ( 0.05 usr 0.02 sys + 0.30 cusr 0.05 csys = 0.42 CPU)
Result: FAIL
#####
Note the URL for the temporary daemon, which I believe indicates IPV6 is being used. Note that all of the test blocks in t/poster-post.t now PASS *except* those based on HTTP::Lite.
I got the same results on Linux.
However, when I followed the same approach on OpenBSD -- where, I must stress, I am using a VM rather than bare-metal and where I have not tempered any of the VM author's default settings -- I got (a) a different output for the temporary daemon -- one suggesting IPV4; but (b) no test failures in any block.
#####
[openbsd66: Test-Smoke] $ bleadprove -I/home/jkeenan/learn/perl/HTTP-Daemon-6.07-patched/lib -vb t/>
t/poster-post.t ..
# HTTP::Daemon 6.07_001
# HTTP::Response 6.24
# Temporary daemon at:
http://127.0.0.1:9845/
# LWP::UserAgent 6.44
ok 1 - An object of class 'Test::Smoke::Poster::LWP_UserAgent' isa 'Test::Smoke::Poster::LWP_UserAgent'
ok 2 - write_json
ok 3 - Got id
ok 4 - An object of class 'Test::Smoke::Poster::Curl' isa 'Test::Smoke::Poster::Curl'
ok 5 - write_json
ok 6 - Got id
# HTTP::Tiny 0.076
ok 7 - An object of class 'Test::Smoke::Poster::HTTP_Tiny' isa 'Test::Smoke::Poster::HTTP_Tiny'
ok 8 - write_json
ok 9 - Got id
# HTTP::Lite 2.44
ok 10 - An object of class 'Test::Smoke::Poster::HTTP_Lite' isa 'Test::Smoke::Poster::HTTP_Lite'
ok 11 - write_json
ok 12 - Got id
ok 13 - no warnings
1..13
# tear down: 55710
ok
All tests successful.
Files=1, Tests=13, 1 wallclock secs ( 0.05 usr 0.02 sys + 0.39 cusr 0.23 csys = 0.69 CPU)
Result: PASS
#####
I have never used HTTP::Lite outside the context of its use in Test-Smoke's test suite, so I cannot say why it appears to "work" on OpenBSD and not on Linux or FreeBSD or why it appears to "work" with IPV4 but not IPV6.
Thank you very much.
Jim Keenan