ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Custom debian builds fails on test suite

From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Tue, 22 May 2018 07:55:48 +0000

-----Original Message-----
From: Wireshark-dev <wireshark-dev-bounces@xxxxxxxxxxxxx> On Behalf Of Anders Broman
Sent: den 22 maj 2018 09:31
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Custom debian builds fails on test suite



-----Original Message-----
From: Wireshark-dev <wireshark-dev-bounces@xxxxxxxxxxxxx> On Behalf Of Gerald Combs
Sent: den 21 maj 2018 19:06
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Custom debian builds fails on test suite

On 5/21/18 1:27 AM, Anders Broman wrote:
> Hi,
> 
> Trying to do a Debian build it fails with: (Should we even run the 
> test suite here ?)

You should be able to skip tests by setting DEB_BUILD_OPTIONS=nocheck.

> test --> verify-results-type-add_pfield-time-local-1-260-1...passed
> 
> test --> verify-results-value-add_pfield-time-local-1-261-1...passed
> 
> add_pfield-time-local got:
> 
>                              results[2][2]='10'
> 
>                              matches[2][2]='10'
> 
> test --> verify-results-type-add_pfield-time-local-2-262-1...passed
> 
> test --> verify-results-value-add_pfield-time-local-2-263-1...passed

It looks like this is failing in lua/tvb.lua...

>   File "/home/ericsson/ewireshark/trunk/test/subprocesstest.py", line 
> 187, in run
> 
>     sys.stdout.write(line)
> 
> UnicodeEncodeError: 'ascii' codec can't encode character u'\u2192' in 
> position 31: ordinal not in range(128)

...unfortunately the test runner is failing instead of printing something useful. A fix is inbound.

I'm not sure why tvb.lua is failing. What does `locale` print on your system? 


locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=sv_SE.UTF-8
LC_TIME=sv_SE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=sv_SE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=sv_SE.UTF-8
LC_NAME=sv_SE.UTF-8
LC_ADDRESS=sv_SE.UTF-8
LC_TELEPHONE=sv_SE.UTF-8
LC_MEASUREMENT=sv_SE.UTF-8
LC_IDENTIFICATION=sv_SE.UTF-8
LC_ALL=

The output is now:
-------- Testing tree:add_packet_field Time string ENC_ISO_8601_TIME ---- for packet # 4 --------

timebase = 1527027288, timezone=0
test --> add_pfield-time-local-1029-4...passed
test --> add_pfield-time-local-1030-4...passed
test --> verify-fields-size-time.ABSOLUTE_UTC-1031-4...passed
time.ABSOLUTE_UTC got:	
	finfos [1]='0.000000000'	
	matches[1]='0.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-1-1032-4...passed
time.ABSOLUTE_UTC got:	
	finfos [2]='65295.016711695'	
	matches[2]='65295.016711695'
test --> verify-fields-value-time.ABSOLUTE_UTC-2-1033-4...passed
time.ABSOLUTE_UTC got:	
	finfos [3]='0.000000000'	
	matches[3]='0.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-3-1034-4...passed
time.ABSOLUTE_UTC got:	
	finfos [4]='268369920.251723520'	
	matches[4]='268369920.251723520'
test --> verify-fields-value-time.ABSOLUTE_UTC-4-1035-4...passed
time.ABSOLUTE_UTC got:	
	finfos [5]='0.000000000'	
	matches[5]='0.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-5-1036-4...passed
time.ABSOLUTE_UTC got:	
	finfos [6]='65295.016711695'	
	matches[6]='65295.016711695'
test --> verify-fields-value-time.ABSOLUTE_UTC-6-1037-4...passed
time.ABSOLUTE_UTC got:	
	finfos [7]='0.000000000'	
	matches[7]='0.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-7-1038-4...passed
time.ABSOLUTE_UTC got:	
	finfos [8]='268369920.251723520'	
	matches[8]='268369920.251723520'
test --> verify-fields-value-time.ABSOLUTE_UTC-8-1039-4...passed
time.ABSOLUTE_UTC got:	
	finfos [9]='1362176088.000000000'	
	matches[9]='1362176088.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-9-1040-4...passed
time.ABSOLUTE_UTC got:	
	finfos [10]='1362176088.000000000'	
	matches[10]='1362176088.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-10-1041-4...passed
time.ABSOLUTE_UTC got:	
	finfos [11]='1362176040.000000000'	
	matches[11]='1362176040.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-11-1042-4...passed
time.ABSOLUTE_UTC got:	
	finfos [12]='1362176040.000000000'	
	matches[12]='1362176040.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-12-1043-4...passed
time.ABSOLUTE_UTC got:	
	finfos [13]='1362176088.000000000'	
	matches[13]='1362176088.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-13-1044-4...passed
time.ABSOLUTE_UTC got:	
	finfos [14]='1362176040.000000000'	
	matches[14]='1362176040.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-14-1045-4...passed
time.ABSOLUTE_UTC got:	
	finfos [15]='1362096000.000000000'	
	matches[15]='1362096000.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-15-1046-4...passed
time.ABSOLUTE_UTC got:	
	finfos [16]='1362096000.000000000'	
	matches[16]='1362096000.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-16-1047-4...passed
time.ABSOLUTE_UTC got:	
	finfos [17]='1527027288.000000000'	
	matches[17]='1527027288.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-17-1048-4...passed
time.ABSOLUTE_UTC got:	
	finfos [18]='1527027288.000000000'	
	matches[18]='1527027288.000000000'
test --> verify-fields-value-time.ABSOLUTE_UTC-18-1049-4...passed
test --> verify-results-size-add_pfield-time-local-1050-4...passed
add_pfield-time-local got:	
	results[1][1]='1527027288.000000000'	
	matches[1][1]='1527027288.000000000'
test --> verify-results-type-add_pfield-time-local-1-1051-4...passed
test --> verify-results-value-add_pfield-time-local-1-1052-4...passed
add_pfield-time-local got:	
	results[1][2]='8'	
	matches[1][2]='8'
test --> verify-results-type-add_pfield-time-local-2-1053-4...passed
test --> verify-results-value-add_pfield-time-local-2-1054-4...passed
add_pfield-time-local got:	
	results[2][1]='1527027288.000000000'	
	matches[2][1]='1527027288.000000000'
test --> verify-results-type-add_pfield-time-local-1-1055-4...passed
test --> verify-results-value-add_pfield-time-local-1-1056-4...passed
add_pfield-time-local got:	
	results[2][2]='10'	
	matches[2][2]='10'
test --> verify-results-type-add_pfield-time-local-2-1057-4...passed
test --> verify-results-value-add_pfield-time-local-2-1058-4...passed

-------- Testing tree:add_packet_field Time string ENC_RFC_822 ---- for packet # 4 --------

test --> add_pfield-time-local-1059-4...failed!
Got the following error: 'did not get 3 return values from TreeItem.add_packet_field'
Frame 4: 540 bytes on wire (4320 bits), 540 bytes captured (4320 bits)
    Encapsulation type: Ethernet (1)
    Arrival Time: Sep 27, 2004 03:18:04.945618000 UTC
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1096255084.945618000 seconds
    [Time delta from previous captured frame: 0.006946000 seconds]
    [Time delta from previous displayed frame: 0.006946000 seconds]
    [Time since reference or first frame: 0.006946000 seconds]
    Frame Number: 4
    Frame Length: 540 bytes (4320 bits)
    Capture Length: 540 bytes (4320 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ethertype:ip:udp:test]
Ethernet II, Src: Cisco-Li_82:b2:53 (00:0c:41:82:b2:53), Dst: AmbitMic_6c:40:4e (00:d0:59:6c:40:4e)
    Destination: AmbitMic_6c:40:4e (00:d0:59:6c:40:4e)
        Address: AmbitMic_6c:40:4e (00:d0:59:6c:40:4e)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Source: Cisco-Li_82:b2:53 (00:0c:41:82:b2:53)
        Address: Cisco-Li_82:b2:53 (00:0c:41:82:b2:53)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 192.168.0.1, Dst: 192.168.50.50
    0100 .... = Version: 4
    .... 0101 = Header Length: 20 bytes (5)
    Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
        0000 00.. = Differentiated Services Codepoint: Default (0)
        .... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
    Total Length: 526
    Identification: 0x2153 (8531)
    Flags: 0x0000
        0... .... .... .... = Reserved bit: Not set
        .0.. .... .... .... = Don't fragment: Not set
        ..0. .... .... .... = More fragments: Not set
        ...0 0000 0000 0000 = Fragment offset: 0
    Time to live: 63
    Protocol: UDP (17)
    Header checksum: 0xa508 [validation disabled]
    [Header checksum status: Unverified]
    Source: 192.168.0.1
    Destination: 192.168.50.50
User Datagram Protocol, Src Port: 65346, Dst Port: 65282
    Source Port: 65346
    Destination Port: 65282
    Length: 506
    Checksum: 0xf9c8 [unverified]
    [Checksum Status: Unverified]
    [Stream index: 1]
Test Protocol
    Basic string: this is the string for the first test
    Basic string: this is the string for the first test
    .... .... .... ...1 = Basic boolean: yes
    .... .... .... ...1 = Basic boolean: yes
    .... .... .... ...0 = Basic boolean: no
    Basic uint16: 255
    Basic uint16: 1
    Basic uint16: 32768
    Basic uint16: 65280
    Basic uint16: 256
    Basic uint16: 128
    Basic uint24: 65280
    Basic uint24: 98304
    Basic uint24: 65280
    Basic uint24: 32769
    Basic Bytes: 00ff00018000
    Basic Bytes: 00ff00018000
    Basic Uint Bytes: 00ff00018000
    Basic Uint Bytes: 00ff00018000
    Basic OID: 0.0.16256.1.0 (itu-t.0.16256.1.0)
    Basic OID: 0.0.16256.1.0 (itu-t.0.16256.1.0)
    Basic Relative OID: .0.16256.1.0 (.0.16256.1.0)
    Basic Relative OID: .0.16256.1.0 (.0.16256.1.0)
    Basic ipv6 address: 2001:db8::ff00:42:8329
    Basic ipv4 address: 127.0.0.1
    Bytes: deadbeef0123456789deadbeefabcdef
    Bytes: deadbeef0123456789deadbeefabcdef
    OID:  (*** Malformed OID ***)
    OID:  (*** Malformed OID ***)
    Relative OID:  (*** Empty OID ***)
    Relative OID:  (*** Empty OID ***)
    Time absolute local: Jan  1, 1970 00:00:00.000000000 UTC
    Time absolute local: Jan  1, 1970 18:08:15.016711695 UTC
    Time absolute local: Jan  1, 1970 00:00:00.000000000 UTC
    Time absolute local: Jul  4, 1978 03:12:00.251723520 UTC
    Time absolute utc: Jan  1, 1970 00:00:00.000000000 UTC
    Time absolute utc: Jan  1, 1970 18:08:15.016711695 UTC
    Time absolute utc: Jan  1, 1970 00:00:00.000000000 UTC
    Time absolute utc: Jul  4, 1978 03:12:00.251723520 UTC
    Time absolute utc: Jan  1, 1970 00:00:00.000000000 UTC
    Time absolute utc: Jan  1, 1970 18:08:15.016711695 UTC
    Time absolute utc: Jan  1, 1970 00:00:00.000000000 UTC
    Time absolute utc: Jul  4, 1978 03:12:00.251723520 UTC
    Time absolute utc: Mar  1, 2013 22:14:48.000000000 UTC
    Time absolute utc: Mar  1, 2013 22:14:48.000000000 UTC
    Time absolute utc: Mar  1, 2013 22:14:00.000000000 UTC
    Time absolute utc: Mar  1, 2013 22:14:00.000000000 UTC
    Time absolute utc: Mar  1, 2013 22:14:48.000000000 UTC
    Time absolute utc: Mar  1, 2013 22:14:00.000000000 UTC
    Time absolute utc: Mar  1, 2013 00:00:00.000000000 UTC
    Time absolute utc: Mar  1, 2013 00:00:00.000000000 UTC
    Time absolute utc: May 22, 2018 22:14:48.000000000 UTC
    Time absolute utc: May 22, 2018 22:14:48.000000000 UTC
    Time absolute utc: Jan  1, 1970 00:00:00.000000000 UTC
Lua Error: [string "/home/ericsson/ewireshark/trunk/test/lua/tvb...."]:99: add_pfield-time-local test failed!
    [Expert Info (Error/Undecoded): Lua Error: [string "/home/ericsson/ewireshark/trunk/test/lua/tvb...."]:99: add_pfield-time-local test failed!]
        [Lua Error: [string "/home/e
======================================================================
FAIL: test_wslua_tvb_no_tree (suite_wslua.case_wslua)
wslua tvb without a tree
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ericsson/ewireshark/trunk/test/suite_wslua.py", line 269, in test_wslua_tvb_no_tree
    check_lua_script(self, 'tvb.lua', dns_port_pcap, True)
  File "/home/ericsson/ewireshark/trunk/test/suite_wslua.py", line 38, in check_lua_script
    self.assertTrue(self.grepOutput(r'All tests passed!'))
AssertionError: False is not true

======================================================================
FAIL: test_wslua_tvb_tree (suite_wslua.case_wslua)
wslua tvb with a tree
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ericsson/ewireshark/trunk/test/suite_wslua.py", line 265, in test_wslua_tvb_tree
    check_lua_script(self, 'tvb.lua', dns_port_pcap, True, '-V')
  File "/home/ericsson/ewireshark/trunk/test/suite_wslua.py", line 38, in check_lua_script
    self.assertTrue(self.grepOutput(r'All tests passed!'))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 26 tests in 12.300s

FAILED (failures=2, skipped=1)
ricsson/ewireshark/trunk/test/lua/tvb...."]:99: add_pfield-time-local test failed!]
        [Severity level: Error]
        [Group: Undecoded]


-----------------------------

Something didn't run or ran too much... tests failed!
Dissector type frame expected: 4 (1), but got: nil (0)
-- End stdout for command ['run/tshark', '-r', '/home/ericsson/ewireshark/trunk/test/captures/dns_port.pcap', '-X', 'lua_script:/home/ericsson/ewireshark/trunk/test/lua/tvb.lua', '-V'] --
-- Begin stderr for command ['run/tshark', '-r', '/home/ericsson/ewireshark/trunk/test/captures/dns_port.pcap', '-X', 'lua_script:/home/ericsson/ewireshark/trunk/test/lua/tvb.lua', '-V'] --
-- End stderr for command ['run/tshark', '-r', '/home/ericsson/ewireshark/trunk/test/captures/dns_port.pcap', '-X', 'lua_script:/home/ericsson/ewireshark/trunk/test/lua/tvb.lua', '-V'] --

12/12 Test  #4: suite_dfilter ....................   Passed   98.07 sec

83% tests passed, 2 tests failed out of 12

Total Test time (real) =  98.08 sec

The following tests FAILED:
	 11 - suite_unittests (Failed)
	 12 - suite_wslua (Failed)
Errors while running CTest
Makefile:96: recipe for target 'test' failed
make[2]: *** [test] Error 8
make[2]: Leaving directory '/home/ericsson/ewireshark/trunk/obj-x86_64-linux-gnu'
dh_auto_test: make -j6 test ARGS+=-j6 returned exit code 2
debian/rules:71: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 2
make[1]: Leaving directory '/home/ericsson/ewireshark/trunk'
debian/rules:27: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
ericsson@TCL-sniffer-2:~/ewireshark/trunk$ 
ericsson@TCL-sniffer-2:~/ewireshark/trunk$
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe