Menu

#135 Test suite fails in upnp/test_url

branch-1.6.x
closed-fixed
None
5
2017-01-21
2017-01-13
No

Running the test suite for libupnp 1.6.21 built on Linux (CentOS 5+6, 32- and 64-bit) produces a failure for upnp/test_url - from upnp/test-suite.log:

=========================================
   libupnp 1.6.21: upnp/test-suite.log
=========================================

# TOTAL: 2
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test_url
==============

test/test_url.c:60:  'http://www.libupnp.org/path1/' | 'http://www.libupnp.org/path1/path1' -> '(null)' != 'http://www.libupnp.org/path1/path1' (-108)
test/test_url.c:61:  'http://www.libupnp.org/path1/' | '' -> '(null)' != 'http://www.libupnp.org/path1/' (-108)
test/test_url.c:62:  'http://www.libupnp.org/path1/' | '//localhost/path2' -> '(null)' != 'http://localhost/path2' (-108)
test/test_url.c:63:  'http://www.libupnp.org/path1/path1' | '//localhost/path2' -> '(null)' != 'http://localhost/path2' (-108)
test/test_url.c:64:  'http://www.libupnp.org/path1/' | '/path3' -> '(null)' != 'http://www.libupnp.org/path3' (-108)
test/test_url.c:65:  'http://www.libupnp.org/path1/path1' | '/path3' -> '(null)' != 'http://www.libupnp.org/path3' (-108)
test/test_url.c:66:  'http://www.libupnp.org/path1/' | 'path4' -> '(null)' != 'http://www.libupnp.org/path1/path4' (-108)
test/test_url.c:67:  'http://www.libupnp.org/path1/path1' | 'path4' -> '(null)' != 'http://www.libupnp.org/path1/path4' (-108)
test/test_url.c:68:  'http://www.libupnp.org/path1/' | '../path5' -> '(null)' != 'http://www.libupnp.org/path5' (-108)
test/test_url.c:69:  'http://www.libupnp.org/path1/path1' | '../path5' -> '(null)' != 'http://www.libupnp.org/path5' (-108)
test/test_url.c:70:  'http://www.libupnp.org/path1/' | '#frag1' -> '(null)' != 'http://www.libupnp.org/path1/#frag1' (-108)
test/test_url.c:71:  'http://www.libupnp.org/path1/path1' | '#frag1' -> '(null)' != 'http://www.libupnp.org/path1/path1#frag1' (-108)

Build log attached.

1 Attachments

Discussion

  • Marcelo Roberto Jimenez

    Seems like we need a patch for those unit tests. I can't remember having compiled them even once, they must be really ancient code.

    Regards,
    Marcelo.

     
  • Peter Pramberger

    Can't be that ancient, because that particular test appeared somewhen after 1.6.19. ;-)

     
  • Peter Pramberger

    Well, you really should run your test suite yourself to detect such problems before...

    The issue is as follows:

    test_url.c:result() ->
    upnptools.c:UpnpResolveURL2() ->
    uri.c:resolve_rel_url() ->
    uri.c:parse_uri() ->
    uri.c:parse_hostport()
    

    And parse_hostport() tries to resolve www.libupnp.org, where the domain libupnp.org does not exists anymore:

    ; <<>> DiG 9.X <<>> libupnp.org any
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 33566
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;libupnp.org.                   IN      ANY
    
    ;; AUTHORITY SECTION:
    org.                    900     IN      SOA     a0.org.afilias-nst.info. noc.afilias-nst.info. 2012333106 1800 900 604800 86400
    
    ;; Query time: 275 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Fri Jan 20 22:47:57 2017
    ;; MSG SIZE  rcvd: 92
    

    So either change all URLs in test_url.c to localhost, or choose something which will last, e.g. www.iana.org or the like.

     

    Last edit: Peter Pramberger 2017-01-20
  • Marcelo Roberto Jimenez

    • status: open --> closed-fixed
    • assigned_to: Marcelo Roberto Jimenez
     
  • Marcelo Roberto Jimenez

    Fixed, thanks.

     
Auth0 Logo