Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Config-Model-OpenSsh CPAN distribution.

Report information
The Basics
Id:
93314
Status:
resolved
Priority:
Low/Low

People
Owner:
DDUMONT [...] cpan.org
Requestors:
shabble [...] gmail.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
1.234



Subject: Test failure in ssh_config.t related to UID=0 test count/skip?
Date: Mon, 24 Feb 2014 16:56:43 +0000
To: bug-Config-Model-OpenSsh@rt.cpan.org
From: Tom Feist <shabble@gmail.com>
Attempting to install Config::Model::OpenSsh via cpanm fails: $ sudo cpanm Config::Model::OpenSsh
Show quoted text
> Fetching http://search.cpan.org/CPAN/authors/id/D/DD/DDUMONT/Config-Model-OpenSsh-1.233.tar.gz ... OK > Configuring Config-Model-OpenSsh-1.233 ... OK > Building and testing Config-Model-OpenSsh-1.233 for Config::Model::OpenSsh ... FAIL > ! Installing Config::Model::OpenSsh failed. See /Users/shabble/.cpanm/build.log for details.
Interesting bit of the build.log is: Building and testing Config-Model-OpenSsh-1.233 for Config::Model::OpenSsh doing /opt/local/lib/perl5/site_perl/5.16.1/Config/Model/extensions/cme-gen-class-pod Checking doc for model Sshd Checking doc for model SystemSsh Building Config-Model-OpenSsh t/custom_sshd.t ........ ok t/custom_sshd_match.t .. ok Element 'AuthorizedKeysFile2' of node 'Sshd' is deprecated Unhandled type: REGEXP at /opt/local/lib/perl5/site_perl/5.16.1/Devel/Cycle.pm line 107. t/model_tests.t ........ ok t/pod.t ................ skipped: Test::Pod 1.00 required for testing POD # Looks like you planned 26 tests but ran 21. t/ssh_config.t ......... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 5/26 subtests (less 7 skipped subtests: 14 okay) Test Summary Report ------------------- t/ssh_config.t (Wstat: 65280 Tests: 21 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 26 tests but ran 21. Files=5, Tests=91, 3 wallclock secs ( 0.04 usr 0.02 sys + 2.75 cusr 0.14 csys = 2.95 CPU) Result: FAIL Failed 1/5 test programs. 0/91 subtests failed. If I switch to the build dir directly, and run 'prove -vlb t/ssh_config.t', it fails with a bunch of permission errors on wr_test/ and similar, because the build dir is owned by root (per original sudo invocation). If I chown the build dir to myself and rerun 'prove -lvb', all tests pass: t/ssh_config.t .. 1..26 ok 1 - compiled # Running test like root (no layered config) ok 2 - Read wr_test/ssh_test/etc/ssh_config and created instance ok 3 - check cipher list ok 4 - check global comment pattern ok 5 - check Ciphers comment ok 6 - check SendEnv comment ok 7 - check Host pattern ok 8 - check user LocalForward port ok 9 - check user LocalForward host ok 10 - check user LocalForward ipv6 ok 11 - check user LocalForward port ipv6 ok 12 - check user LocalForward host ipv6 ok 13 - wrote ssh_config data in wr_test/ssh_test ok 14 - check if both root_ssh dumps are identical # Running test like user with layered config ok 15 - Read user .ssh/config and created instance ok 16 - check root Host pattern ok 17 - check user Host pattern ok 18 - wrote user .ssh/config data in wr_test/ssh_test/Users/joe/.ssh/config ok 19 - Found wr_test/ssh_test/Users/joe/.ssh/config ok 20 - check user .ssh/config files ok 21 - check user .ssh/config files after modif ok 22 - too many fields warning ok 23 - bad fields warning ok 24 - check errors count ok 25 - check error message ok 26 - check error count after fix ok All tests successful. Files=1, Tests=26, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.66 cusr 0.03 csys = 0.72 CPU) Result: PASS However, if I leave permissions as-is, and run 'sudo prove -lvb t/ssh_config.t': t/ssh_config.t .. 1..26 ok 1 - compiled # Running test like root (no layered config) ok 2 - Read wr_test/ssh_test/etc/ssh_config and created instance ok 3 - check cipher list ok 4 - check global comment pattern ok 5 - check Ciphers comment ok 6 - check SendEnv comment ok 7 - check Host pattern ok 8 - check user LocalForward port ok 9 - check user LocalForward host ok 10 - check user LocalForward ipv6 ok 11 - check user LocalForward port ipv6 ok 12 - check user LocalForward host ipv6 ok 13 - wrote ssh_config data in wr_test/ssh_test ok 14 - check if both root_ssh dumps are identical ok 15 # skip user tests when test is run as root ok 16 # skip user tests when test is run as root ok 17 # skip user tests when test is run as root ok 18 # skip user tests when test is run as root ok 19 # skip user tests when test is run as root ok 20 # skip user tests when test is run as root ok 21 # skip user tests when test is run as root # Looks like you planned 26 tests but ran 21. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 5/26 subtests (less 7 skipped subtests: 14 okay) Test Summary Report ------------------- t/ssh_config.t (Wstat: 65280 Tests: 21 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 26 tests but ran 21. Files=1, Tests=21, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.52 cusr 0.03 csys = 0.58 CPU) Result: FAIL Not sure if it's down to the skip => 7 param being wrong, or the SKIP block covering too much, but it seems to be getting confused as to how many tests should run. Manually changing the preamble to 'use Test::More; # tests => 26;', and adding a 'done_testing()' at the end of the file makes it pass in both cases, but I'm not entirely clear if the 21+ tests should be skipped for root like that. Setup: $ which perl /opt/local/bin/perl [note: installed via MacPorts, port 'perl5.16 @5.16.1_3+universal (active)' apparently] $ perl -v This is perl 5, version 16, subversion 1 (v5.16.1) built for darwin-thread-multi-2level $ uname -a Darwin chompy.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 i386 MacBookPro8,2 Darwin Anything else useful to add? Cheers, Tom
Le Lun 24 Fév 2014 17:56:57, shabble@gmail.com a écrit :
Show quoted text
> Anything else useful to add?
No. You're right. There's indeed a problem in the skipped test count. I'll fix this and re-release soon. Thanks for the report. All the best
Test skip count is now fixed. Thanks for the report.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.