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

perl 5.40.1 build: Possibly XML::XML2JSON test t/XML-XML2JSON.t will fail #239

Closed
twata1 opened this issue Feb 11, 2025 · 4 comments
Closed

Comments

@twata1
Copy link

twata1 commented Feb 11, 2025

Hello,

I split my issue with #231 .

Sample fail report:
http://www.cpantesters.org/cpan/report/d295c9d6-6eb8-1014-8029-cbde69c54bed

That test passes in perl 5.40.0 build .

Thank you,

@shawnlaffan
Copy link
Contributor

I see the same errors locally but the final result is a pass.

"C:\perls\5.40.1.1_PDL_dev\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/XML-XML2JSON.t
t/XML-XML2JSON.t .. 1/2 #
# Checking for compatible JSON modules (you need at least one):
# checking for JSON::Syck...
loaded module: JSON::Syck at C:\perls\5401~1.1_P\data\.cpanm\work\1739243860.38024\XML-XML2JSON-0.06\blib\lib/XML/XML2JSON.pm line 164.
# JSON from JSON::Syck: {"@encoding":"UTF-8","@version":"1.0","test":{"array":{"@perl":"awesome","item":[{"@index":"0"},{"@index":"1"},{"@index":"2"}]},"test$nstest":{"@attr1":"bar"},"data":{"$t":"some test text","@attr1":"test"},"@xmlns:test":"http://test.example/test","censored":{},"empty":{"inner":{"@c":"d"}}}}
# FAILED: Problem creating root element @encoding: bad name at C:\perls\5401~1.1_P\data\.cpanm\work\1739243860.38024\XML-XML2JSON-0.06\blib\lib/XML/XML2JSON.pm line 760.
# checking for JSON::XS...
loaded module: JSON::XS at C:\perls\5401~1.1_P\data\.cpanm\work\1739243860.38024\XML-XML2JSON-0.06\blib\lib/XML/XML2JSON.pm line 164.
# JSON from JSON::XS: {"@version":"1.0","test":{"empty":{"inner":{"@c":"d"}},"@xmlns:test":"http://test.example/test","censored":{},"test$nstest":{"@attr1":"bar"},"data":{"$t":"some test text","@attr1":"test"},"array":{"@perl":"awesome","item":[{"@index":"0"},{"@index":"1"},{"@index":"2"}]}},"@encoding":"UTF-8"}
# FAILED: Problem creating root element @encoding: bad name at C:\perls\5401~1.1_P\data\.cpanm\work\1739243860.38024\XML-XML2JSON-0.06\blib\lib/XML/XML2JSON.pm line 760.
# checking for JSON...
loaded module: JSON at C:\perls\5401~1.1_P\data\.cpanm\work\1739243860.38024\XML-XML2JSON-0.06\blib\lib/XML/XML2JSON.pm line 164.
# JSON from JSON: {"@encoding":"UTF-8","test":{"@xmlns:test":"http://test.example/test","censored":{},"empty":{"inner":{"@c":"d"}},"array":{"item":[{"@index":"0"},{"@index":"1"},{"@index":"2"}],"@perl":"awesome"},"test$nstest":{"@attr1":"bar"},"data":{"$t":"some test text","@attr1":"test"}},"@version":"1.0"}
# Reconstructed XML: <?xml version="1.0" encoding="UTF-8"?>
# <test xmlns:test="http://test.example/test"><data attr1="test">some test text</data><test:nstest attr1="bar"/><empty><inner c="d"/></empty><array perl="awesome"><item index="0"/><item index="1"/><item index="2"/></array><censored/></test>
# OK
# checking for JSON::DWIW...
# NOT FOUND
# compatible JSON modules found: 1
t/XML-XML2JSON.t .. ok
All tests successful.
Files=1, Tests=2,  1 wallclock secs ( 0.00 usr +  0.02 sys =  0.02 CPU)
Result: PASS

FWIW, the makefile needed to be generated with perl -I. Makefile.PL.

@shawnlaffan
Copy link
Contributor

The results are more-or-less the same with SP 5.40.0.

perl -I. Makefile.PL && gmake test
Cannot determine perl version info from lib/XML/XML2JSON.pm
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
[Core Features]
- Test::More  ...loaded. (1.302200)
- XML::LibXML ...loaded. (2.0210 >= 1.59)
[JSON::Syck]
- JSON::Syck  ...loaded. (1.34)
[JSON::XS]
- JSON::XS    ...loaded. (4.03)
[JSON]
- JSON        ...loaded. (4.10)
[JSON::DWIW]
- JSON::DWIW  ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for XML::XML2JSON
Writing MYMETA.yml and MYMETA.json
cp lib/XML/XML2JSON.pm blib\lib\XML\XML2JSON.pm
"C:\perls\5.40.0.1_PDL\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/XML-XML2JSON.t
t/XML-XML2JSON.t .. 1/2 #
# Checking for compatible JSON modules (you need at least one):
# checking for JSON::Syck...
loaded module: JSON::Syck at C:\perls\5400~2.1_P\data\.cpanm\work\1739244386.14136\XML-XML2JSON-0.06\blib\lib/XML/XML2JSON.pm line 164.
# JSON from JSON::Syck: {"@encoding":"UTF-8","@version":"1.0","test":{"censored":{},"data":{"@attr1":"test","$t":"some test text"},"@xmlns:test":"http://test.example/test","test$nstest":{"@attr1":"bar"},"array":{"@perl":"awesome","item":[{"@index":"0"},{"@index":"1"},{"@index":"2"}]},"empty":{"inner":{"@c":"d"}}}}
# Reconstructed XML: <?xml version="1.0" encoding="UTF-8"?>
# <test xmlns:test="http://test.example/test"><censored/><data attr1="test">some test text</data><array perl="awesome"><item index="0"/><item index="1"/><item index="2"/></array><empty><inner c="d"/></empty><test:nstest attr1="bar"/></test>
# OK
# checking for JSON::XS...
loaded module: JSON::XS at C:\perls\5400~2.1_P\data\.cpanm\work\1739244386.14136\XML-XML2JSON-0.06\blib\lib/XML/XML2JSON.pm line 164.
# JSON from JSON::XS: {"@encoding":"UTF-8","@version":"1.0","test":{"data":{"@attr1":"test","$t":"some test text"},"censored":{},"test$nstest":{"@attr1":"bar"},"array":{"item":[{"@index":"0"},{"@index":"1"},{"@index":"2"}],"@perl":"awesome"},"empty":{"inner":{"@c":"d"}},"@xmlns:test":"http://test.example/test"}}
# Reconstructed XML: <?xml version="1.0" encoding="UTF-8"?>
# <test xmlns:test="http://test.example/test"><array perl="awesome"><item index="0"/><item index="1"/><item index="2"/></array><empty><inner c="d"/></empty><test:nstest attr1="bar"/><censored/><data attr1="test">some test text</data></test>
# OK
# checking for JSON...
loaded module: JSON at C:\perls\5400~2.1_P\data\.cpanm\work\1739244386.14136\XML-XML2JSON-0.06\blib\lib/XML/XML2JSON.pm line 164.
# JSON from JSON: {"test":{"data":{"$t":"some test text","@attr1":"test"},"censored":{},"@xmlns:test":"http://test.example/test","test$nstest":{"@attr1":"bar"},"array":{"item":[{"@index":"0"},{"@index":"1"},{"@index":"2"}],"@perl":"awesome"},"empty":{"inner":{"@c":"d"}}},"@encoding":"UTF-8","@version":"1.0"}
# Reconstructed XML: <?xml version="1.0" encoding="UTF-8"?>
# <test xmlns:test="http://test.example/test"><array perl="awesome"><item index="0"/><item index="1"/><item index="2"/></array><empty><inner c="d"/></empty><test:nstest attr1="bar"/><data attr1="test">some test text</data><censored/></test>
# OK
# checking for JSON::DWIW...
# NOT FOUND
# compatible JSON modules found: 3
t/XML-XML2JSON.t .. ok
All tests successful.
Files=1, Tests=2,  0 wallclock secs ( 0.00 usr +  0.01 sys =  0.01 CPU)
Result: PASS

@shawnlaffan
Copy link
Contributor

Although repeatedly calling gmake test several times can trigger the fail on some runs. Tested with SP 5.40.0.1, 5.40.1.1 and 5.32.1.1.

This is perhaps the same as this RT ticket from 2014, which is related to hash randomisation: https://rt.cpan.org/Public/Bug/Display.html?id=94335

CPAN testers has plenty of red on it, across multiple operating systems, starting from perl 5.18. A check of a recent one for linux shows the same errors.

I think this can be closed as "not strawberry-related". I'll do so in a few days, but feel free to close it yourself.

Thanks for the report, though.

@twata1
Copy link
Author

twata1 commented Feb 11, 2025

@shawnlaffan

Thank you too for investigating and responding!

I will close the issue.

Thank you,

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