You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by William A Rowe Jr <wr...@rowe-clan.net> on 2017/10/19 15:02:45 UTC

Revisiting odd test framework servername behaviors

# Failed test 56 in t/ssl/varlookup.t at line 109 fail #56
# Failed test 58 in t/ssl/varlookup.t at line 109 fail #58

# testing : SSL_SERVER_SAN_DNS_0
# expected: 'localhost'
# received: 'localhost.localdomain'
not ok 56
# testing : SSL_SERVER_SAN_OTHER_dnsSRV_0
# expected: '_https.localhost'
# received: '_https.localhost.localdomain'
not ok 58

This is something I just keep overlooking since I know it is a noop,
a difference between this FC config and a typical config. Wondering
if there isn't a trivial fix?



Original (untweaked) t/TEST prep stderr indicates;

The Subject's Distinguished Name is as follows
countryName           :PRINTABLE:'US'
stateOrProvinceName   :ASN.1 12:'California'
localityName          :ASN.1 12:'San Francisco'
organizationName      :ASN.1 12:'ASF'
organizationalUnitName:ASN.1 12:'httpd-test/rsa-test-2'
commonName            :ASN.1 12:'localhost.localdomain'
emailAddress          :IA5STRING:'test-dev@httpd.apache.org'
Certificate is to be certified until Oct 19 13:36:33 2018 GMT (365 days)

Write out database with 1 new entries
Data Base Updated

So the prep defaulted to the detected localhost.localdomain rather
than any arbitrary localhost.



Toggling -servername localhost (explicit)

t/modules/access.t                (Wstat: 0 Tests: 408 Failed: 31)
  Failed tests:  4, 20-21, 24, 26, 28, 30, 38, 55, 72, 89
                106-107, 123-124, 141, 154, 168, 170, 175
                192, 209, 226, 277, 290, 304, 306, 311
                328, 345, 362

So however we pick the default to populate the rest of the tests is at
odds with how sslvars chooses the default servername value.

And access.t can't handle an explict servername value, in 31 tests.



Toggling -servername host.domain.net, bouncing through the external
IP address results in several new failures in the test framework;

# Failed test 98 in t/apache/expr.t at line 298 fail #75
t/modules/access.t ..................
Failed 95/408 subtests

The test framework hangs at
t/modules/http2.t ...................
1..52
# Running under perl version 5.024003 for linux
# Current time local: Thu Oct 19 09:45:20 2017
# Current time GMT:   Thu Oct 19 14:45:20 2017
# Using Test.pm version 1.28_01
# Using Apache/Test.pm version 1.41
test case: TC0001, expecting 200: GET http://host.domain.net:8548/

These tests apparently can't handle an external facing port?

Re: Revisiting odd test framework servername behaviors

Posted by Stefan Eissing <st...@greenbytes.de>.
I can see the failures when I pass in a 

t/TEST -servername localhost.localdomain

as
-------------------
t/modules/access.t                (Wstat: 0 Tests: 408 Failed: 31)
  Failed tests:  4, 20-21, 24, 26, 28, 30, 38, 55, 72, 89
                106-107, 123-124, 141, 154, 168, 170, 175
                192, 209, 226, 277, 290, 304, 306, 311
                328, 345, 362
t/modules/http2.t                 (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 48 tests but ran 0.
t/ssl/varlookup.t                 (Wstat: 0 Tests: 83 Failed: 2)
  Failed tests:  56, 58

(I see no hanger in http2, but 0 tests ran. Some sort of connect problem, I assume, that aborts for me and hangs for you)

However, ping works on the name.
PING localhost.localdomain (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.038 ms

Did a -clean before, no change.
Did a rm -r t/conf/ssl/ca, no change.

Hmm, my http2.conf.in did use a fixed 'localhost' for one vhost. Just checked in a fix. However the http2 test cases still do not work with a "-servername localhost.localdomain". Very strange.

-Stefan

> Am 19.10.2017 um 17:02 schrieb William A Rowe Jr <wr...@rowe-clan.net>:
> 
> # Failed test 56 in t/ssl/varlookup.t at line 109 fail #56
> # Failed test 58 in t/ssl/varlookup.t at line 109 fail #58
> 
> # testing : SSL_SERVER_SAN_DNS_0
> # expected: 'localhost'
> # received: 'localhost.localdomain'
> not ok 56
> # testing : SSL_SERVER_SAN_OTHER_dnsSRV_0
> # expected: '_https.localhost'
> # received: '_https.localhost.localdomain'
> not ok 58
> 
> This is something I just keep overlooking since I know it is a noop,
> a difference between this FC config and a typical config. Wondering
> if there isn't a trivial fix?
> 
> 
> 
> Original (untweaked) t/TEST prep stderr indicates;
> 
> The Subject's Distinguished Name is as follows
> countryName           :PRINTABLE:'US'
> stateOrProvinceName   :ASN.1 12:'California'
> localityName          :ASN.1 12:'San Francisco'
> organizationName      :ASN.1 12:'ASF'
> organizationalUnitName:ASN.1 12:'httpd-test/rsa-test-2'
> commonName            :ASN.1 12:'localhost.localdomain'
> emailAddress          :IA5STRING:'test-dev@httpd.apache.org'
> Certificate is to be certified until Oct 19 13:36:33 2018 GMT (365 days)
> 
> Write out database with 1 new entries
> Data Base Updated
> 
> So the prep defaulted to the detected localhost.localdomain rather
> than any arbitrary localhost.
> 
> 
> 
> Toggling -servername localhost (explicit)
> 
> t/modules/access.t                (Wstat: 0 Tests: 408 Failed: 31)
>  Failed tests:  4, 20-21, 24, 26, 28, 30, 38, 55, 72, 89
>                106-107, 123-124, 141, 154, 168, 170, 175
>                192, 209, 226, 277, 290, 304, 306, 311
>                328, 345, 362
> 
> So however we pick the default to populate the rest of the tests is at
> odds with how sslvars chooses the default servername value.
> 
> And access.t can't handle an explict servername value, in 31 tests.
> 
> 
> 
> Toggling -servername host.domain.net, bouncing through the external
> IP address results in several new failures in the test framework;
> 
> # Failed test 98 in t/apache/expr.t at line 298 fail #75
> t/modules/access.t ..................
> Failed 95/408 subtests
> 
> The test framework hangs at
> t/modules/http2.t ...................
> 1..52
> # Running under perl version 5.024003 for linux
> # Current time local: Thu Oct 19 09:45:20 2017
> # Current time GMT:   Thu Oct 19 14:45:20 2017
> # Using Test.pm version 1.28_01
> # Using Apache/Test.pm version 1.41
> test case: TC0001, expecting 200: GET http://host.domain.net:8548/
> 
> These tests apparently can't handle an external facing port?