• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rewrite unit tests
#21
Since the latest commit I can't reproduce the earlier segfault (corrupted double-linked list) on the openSUSE 13.2 machine (will test Leap 42.2 machine soon). However, I'm getting a segfault in test_mail now:

Code:
martin@linux-027e:~/builds/pilight/rewrite>  gdb ./pilight-unittest
GNU gdb (GDB; openSUSE 13.2) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...

warning: /etc/gdbinit.d/gdb-heap.py: No such file or directory
Reading symbols from ./pilight-unittest...done.
(gdb) run
Starting program: /home/martin/builds/pilight/rewrite/pilight-unittest
Got object file from memory but can't read symbols: File truncated.
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.19-16.28.1.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[ test_explode                                     ]
[ test_nrcpu                                       ]
[ test_isrunning                                   ]
[ test_isnummeric                                  ]
[ test_name2uid                                    ]
[ test_strstr                                      ]
[ test_ishex                                       ]
[ test_urldecode                                   ]
[ test_urlencode                                   ]
[ test_base64decode                                ]
[ test_base64encode                                ]
[ test_hostname                                    ]
[ test_distroname                                  ]
[ test_file_exists                                 ]
[ test_path_exists                                 ]
[ test_vercmp                                      ]
[ test_uniq_space                                  ]
[ test_str_replace                                 ]
[ test_stricmp                                     ]
[ test_file_get_contents                           ]
[ test_inet_devs                                   ]
[ test_dev2mac                                     ]
[ test_host2ip                                     ]
[ test_whitelist_check                             ]
[ test_binary                                      ]
[ test_coord2tz                                    ]
[ test_datetime2ts                                 ]
[ test_localtime_l                                 ]
[ test_datefix                                     ]
[ test_json_encode                                 ]
[ test_json_decode                                 ]
[ test_sha256cache                                 ]
[ test_strptime                                    ]
[ test_options_valid                               ]
[ test_options_invalid                             ]
[ test_options_merge                               ]
[ test_dso                                         ]
[ test_eventpool_callback_nothreads                ]
[New Thread 0x7ffff56c9700 (LWP 24055)]
[ test_eventpool_callback_threaded                 ]
[Thread 0x7ffff56c9700 (LWP 24055) exited]
[New Thread 0x7ffff56c9700 (LWP 24056)]
[Thread 0x7ffff56c9700 (LWP 24056) exited]
[New Thread 0x7ffff4ec8700 (LWP 24058)]
[New Thread 0x7fffeffff700 (LWP 24059)]
[New Thread 0x7fffef7fe700 (LWP 24060)]
[New Thread 0x7fffeeffd700 (LWP 24061)]
[ test_log                                         ]
[New Thread 0x7ffff56c9700 (LWP 24062)]
(/home/martin/builds/pilight/rewrite/tests/log.c #42) [Jan 06 19:21:28:120302] emergency
(/home/martin/builds/pilight/rewrite/tests/log.c #43) [Jan 06 19:21:28:120416] alert
(/home/martin/builds/pilight/rewrite/tests/log.c #44) [Jan 06 19:21:28:120459] critical
(/home/martin/builds/pilight/rewrite/tests/log.c #45) [Jan 06 19:21:28:120487] ERROR: test
(/home/martin/builds/pilight/rewrite/tests/log.c #46) [Jan 06 19:21:28:120509] WARNING: test
(/home/martin/builds/pilight/rewrite/tests/log.c #47) [Jan 06 19:21:28:120518] NOTICE: test
(/home/martin/builds/pilight/rewrite/tests/log.c #48) [Jan 06 19:21:28:120528] INFO: test
(/home/martin/builds/pilight/rewrite/tests/log.c #49) [Jan 06 19:21:28:120540] DEBUG: test
DEBUG: garbage collected log library
[Thread 0x7ffff56c9700 (LWP 24062) exited]
[ test_ping_localhost                              ]
[ test_ping_timeout                                ]
[ test_ping_response                               ]
[ test_ssdp_client                                 ]
[New Thread 0x7ffff56c9700 (LWP 24063)]
[ test_ssdp_server                                 ]
[Thread 0x7ffff56c9700 (LWP 24063) exited]
[ test_ntp                                         ]
[ test_http                                        ]
[New Thread 0x7ffff56c9700 (LWP 24064)]
[Thread 0x7ffff56c9700 (LWP 24064) exited]
[New Thread 0x7ffff56c9700 (LWP 24065)]
[ test_mail                                        ]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff715b766 in uv__run_check (loop=0x4052b0 <free@plt>) at /home/martin/builds/pilight/rewrite/libs/libuv/unix/loop-watcher.c:67
67      UV_LOOP_WATCHER_DEFINE(check, CHECK)
Missing separate debuginfos, use: zypper install libdbus-1-3-debuginfo-1.8.22-19.1.x86_64 libnl3-200-debuginfo-3.2.25-2.1.2.x86_64 libpcap1-debuginfo-1.6.2-1.2.x86_64 libudev1-debuginfo-210.1477297097.83231f8-25.51.1.x86_64 libunwind-debuginfo-1.1-10.3.1.x86_64 libusb-1_0-0-debuginfo-1.0.19-2.1.2.x86_64
(gdb) bt full
#0  0x00007ffff715b766 in uv__run_check (loop=0x4052b0 <free@plt>) at /home/martin/builds/pilight/rewrite/libs/libuv/unix/loop-watcher.c:67
        q = 0x1d680021ccba25ff
        h = 0x1
        queue = {0x7fffffffa930, 0xfffffe10e9000000}
        q = 0x0
#1  0x00007ffff714f987 in uv_run (loop=0x4052b0 <free@plt>, mode=UV_RUN_DEFAULT) at /home/martin/builds/pilight/rewrite/libs/libuv/unix/core.c:355
        timeout = 0
        r = 0
        ran_pending = 0
#2  0x0000000000413e74 in test_mail (tc=0x665230) at /home/martin/builds/pilight/rewrite/tests/mail.c:533
        __FUNCTION__ = "test_mail"
#3  0x00007ffff716e9da in CuTestRun (tc=0x665230) at /home/martin/builds/pilight/rewrite/libs/pilight/core/CuTest.c:143
        buf = {{__jmpbuf = {19, 3477440324760421925, 4219040, 140737488346144, 0, 0, -3477440325898287579, -3477421436088826331}, __mask_was_saved = 0, __saved_mask = {__val = {
                140737351949559, 1, 0, 0, 140737337894552, 19, 0, 4219040, 140737351975397, 6578560, 6739296, 0, 6739296, 6578560, 3, 1048576}}}}
#4  0x00007ffff716f066 in CuSuiteRun (testSuite=0x642140) at /home/martin/builds/pilight/rewrite/libs/pilight/core/CuTest.c:298
        testCase = 0x665230
        i = 47
#5  0x000000000040683b in RunAllTests () at /home/martin/builds/pilight/rewrite/tests/alltests.c:203
        i = 20
        r = 0
#6  0x0000000000406952 in main (argc=1, argv=0x7fffffffdc28) at /home/martin/builds/pilight/rewrite/tests/alltests.c:226
        f = 0x642010
(gdb)

Hope it's not so obscure either Smile


Edit: backtrace from the other machine is similar (so the previous segfault seems to be solved now!)

Code:
(gdb) bt full
#0  0x00007ffff715b896 in uv__run_check (loop=0x7ffff71655e8 <uv_thread_create+118>) at /home/linoM6400/git/pilight/rewrite/libs/libuv/unix/loop-watcher.c:67
        q = 0x0
        h = 0x63f128 <pth>
        queue = {0x0, 0x0}
        q = 0x29270002
#1  0x00007fffe8109e90 in ?? ()
No symbol table info available.
#2  0x000000000041d568 in ?? ()
No symbol table info available.
#3  0x0000000000413d4b in test () at /home/linoM6400/git/pilight/rewrite/tests/mail.c:513
No locals.
#4  0x0000000000413ed7 in test_mail (tc=0x665230) at /home/linoM6400/git/pilight/rewrite/tests/mail.c:539
        __FUNCTION__ = "test_mail"
#5  0x00007ffff717a7ee in CuTestRun (tc=0x665230) at /home/linoM6400/git/pilight/rewrite/libs/pilight/core/CuTest.c:143
        buf = {{__jmpbuf = {19, 2558182266820671711, 4219008, 140737488346384, 0, 0, -2558182265919325985, -2558164329700869921}, __mask_was_saved = 0, __saved_mask = {__val = {140737351976464, 0, 140737337895920, 19, 0, 4219008, 140737351976464, 140737488346384,
                140737338910435, 6578560, 6739296, 0, 6739296, 6578560, 3, 140737325864568}}}}
#6  0x00007ffff717ae7a in CuSuiteRun (testSuite=0x642140) at /home/linoM6400/git/pilight/rewrite/libs/pilight/core/CuTest.c:298
        testCase = 0x665230
        i = 47
#7  0x000000000040681b in RunAllTests () at /home/linoM6400/git/pilight/rewrite/tests/alltests.c:203
        i = 20
        r = 0
#8  0x0000000000406932 in main (argc=1, argv=0x7fffffffdd18) at /home/linoM6400/git/pilight/rewrite/tests/alltests.c:226
        f = 0x642010
 
Reply
#22
What happens if you disable all ssl related stuff (mail and ssl_init())?
 
Reply
#23
Compiling without WEBSERVER_HTTPS in cmake options gives me this

Code:
/home/martin/builds/pilight/rewrite/libs/pilight/core/webserver.c: In function ‘server_write_cb’:
/home/martin/builds/pilight/rewrite/libs/pilight/core/webserver.c:1444:12: error: invalid storage class for function ‘webserver_init’
static int webserver_init(int port, int is_ssl) {
            ^
/home/martin/builds/pilight/rewrite/libs/pilight/core/webserver.c:1584:1: error: expected declaration or statement at end of input
}
^
CMakeFiles/pilight.dir/build.make:3925: recipe for target 'CMakeFiles/pilight.dir/libs/pilight/core/webserver.c.o' failed
make[2]: *** [CMakeFiles/pilight.dir/libs/pilight/core/webserver.c.o] Error 1
 
Reply
#24
What i'm asking is, try to thinker with the mail test until the error is gone by disabling stuf step by step. Don't change the rest, just focus on the mail test issue.
 
Reply
#25
Hmm, a couple of weeks and an upgrade to openSUSE Leap 42.2 later, the mail test magically passes Big Grin
Now, I've got this core dump and a number of warnings regarding unfreed pointers:
Code:
martin@linux-4ih5:~/git/pilight/rewrite>  ./pilight-unittest
[ test_explode                                     ]
[ test_nrcpu                                       ]
[ test_isrunning                                   ]
[ test_isnummeric                                  ]
[ test_name2uid                                    ]
[ test_strstr                                      ]
[ test_ishex                                       ]
[ test_urldecode                                   ]
[ test_urlencode                                   ]
[ test_base64decode                                ]
[ test_base64encode                                ]
[ test_hostname                                    ]
[ test_distroname                                  ]
[ test_file_exists                                 ]
[ test_path_exists                                 ]
[ test_vercmp                                      ]
[ test_uniq_space                                  ]
[ test_str_replace                                 ]
[ test_stricmp                                     ]
[ test_file_get_contents                           ]
[ test_calc_time_interval                          ]
[ test_inet_devs                                   ]
[ test_dev2mac                                     ]
[ test_host2ip                                     ]
[ test_whitelist_check                             ]
[ test_binary                                      ]
[ test_coord2tz                                    ]
[ test_datetime2ts                                 ]
[ test_localtime_l                                 ]
[ test_datefix                                     ]
[ test_json_encode                                 ]
[ test_json_decode                                 ]
[ test_sha256cache                                 ]
[ test_strptime                                    ]
[ test_options_valid                               ]
[ test_options_invalid                             ]
[ test_options_merge                               ]
[ test_dso                                         ]
[ test_eventpool_callback_nothreads                ]
[ test_eventpool_callback_threaded                 ]
[ test_log                                         ]
(/home/martin/git/pilight/rewrite/tests/log.c #42) [Mar 05 20:01:43:414617] emergency
(/home/martin/git/pilight/rewrite/tests/log.c #43) [Mar 05 20:01:43:414707] alert
(/home/martin/git/pilight/rewrite/tests/log.c #44) [Mar 05 20:01:43:414729] critical
(/home/martin/git/pilight/rewrite/tests/log.c #45) [Mar 05 20:01:43:414749] ERROR: test
(/home/martin/git/pilight/rewrite/tests/log.c #46) [Mar 05 20:01:43:414765] WARNING: test
(/home/martin/git/pilight/rewrite/tests/log.c #47) [Mar 05 20:01:43:414780] NOTICE: test
(/home/martin/git/pilight/rewrite/tests/log.c #48) [Mar 05 20:01:43:414803] INFO: test
(/home/martin/git/pilight/rewrite/tests/log.c #49) [Mar 05 20:01:43:414818] DEBUG: test
DEBUG: garbage collected log library
[ test_ping_localhost                              ]
[ test_ping_timeout                                ]
[ test_ping_response                               ]
[ test_ping_localhost_threaded                     ]
[ test_ping_timeout_threaded                       ]
[ test_ping_response_threaded                      ]
[ test_ssdp_client                                 ]
[ test_ssdp_server                                 ]
[ test_ntp                                         ]
[ test_ntp_threaded                                ]
[ test_http                                        ]
[ test_http_threaded                               ]
[ test_mail                                        ]
[ test_mail_threaded                               ]
[ test_webserver_get                               ]
[ test_webserver_auth                              ]
[ test_webserver_websocket1                        ]
[ test_webserver_websocket2                        ]
[ test_socket_client                               ]
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/json.c at line #188
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c at line #425
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c at line #422
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/json.c at line #188
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c at line #425
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c at line #422
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/json.c at line #188
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c at line #425
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c at line #422
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/json.c at line #188
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c at line #425
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c at line #422
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #83
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #60
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #491
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/json.c at line #188
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c at line #425
WARNING: unfreed pointer in /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c at line #422
[ test_socket_server                               ]
[ test_socket_large_content                        ]
[ test_socket_reject_client                        ]
[ test_protocols_433_alecto_ws1700                 ]
[ test_protocols_433_alecto_wx500                  ]
[ test_protocols_433_arctech_contact               ]
[ test_protocols_433_arctech_dimmer                ]
[ test_protocols_433_arctech_dusk                  ]
[ test_protocols_api_cpu_temp                      ]
[ test_protocols_api_datetime                      ]
[ test_protocols_api_sunriseset_amsterdam          ]
[ test_protocols_api_sunriseset_new_york           ]
[ test_protocols_api_sunriseset_beijing            ]
[ test_protocols_api_sunriseset_rise               ]
[ test_protocols_api_sunriseset_set                ]
[ test_protocols_api_sunriseset_midnight           ]
[ test_protocols_api_lirc                          ]
[ test_protocols_api_xbmc                          ]
[ - round 1                                        ]
[ - round 2                                        ]
[ test_protocols_api_openweathermap_update         ]
[ - waiting for update message                     ]
[ - waiting for openweathermap notification        ]
[ test_protocols_api_openweathermap_sunrise        ]
[ - waiting for first openweathermap notification  ]
[ - waiting for openweathermap sunrise             ]
[ test_protocols_api_openweathermap_sunset         ]
[ - waiting for first openweathermap notification  ]
[ - waiting for openweathermap sunset              ]
[ test_protocols_api_openweathermap_midnight       ]
[ - waiting for first openweathermap notification  ]
[ - waiting for openweathermap midnight            ]
[ test_protocols_api_wunderground_update           ]
[ - waiting for update message                     ]
[ - waiting for wunderground notification          ]
[ test_protocols_api_wunderground_sunrise          ]
[ - waiting for first wunderground notification    ]
[ - waiting for wunderground sunrise               ]
[ test_protocols_api_wunderground_sunset           ]
[ - waiting for first wunderground notification    ]
[ - waiting for wunderground sunset                ]
[ test_protocols_api_wunderground_midnight         ]
[ - waiting for first wunderground notification    ]
[ - waiting for wunderground midnight              ]
[ test_protocols_core_raw                          ]
[ test_protocols_generic_dimmer                    ]
[ test_protocols_generic_label                     ]
[ test_protocols_generic_screen                    ]
[ test_protocols_generic_switch                    ]
[ test_protocols_generic_weather                   ]
[ test_protocols_generic_webcam                    ]
[ test_event_operator_and                          ]
[ test_event_operator_divide                       ]
[ test_event_operator_eq                           ]
[ test_event_operator_ge                           ]
[ test_event_operator_gt                           ]
[ test_event_operator_intdivide                    ]
[ test_event_operator_is                           ]
[ test_event_operator_le                           ]
[ test_event_operator_lt                           ]
[ test_event_operator_minus                        ]
[ test_event_operator_modulus                      ]
[ test_event_operator_multiply                     ]
[ test_event_operator_ne                           ]
[ test_event_operator_or                           ]
[ test_event_operator_plus                         ]
[ test_event_function_date_add                     ]
[ test_event_function_date_format                  ]
[ test_event_function_random                       ]
[ test_event_actions_switch_check_parameters       ]
ERROR: trying to free an unknown pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #432
*** Error in `./pilight-unittest': free(): invalid pointer: 0x0000000000db5a40 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x721af)[0x7f7845f631af]
/lib64/libc.so.6(+0x779d6)[0x7f7845f689d6]
/lib64/libc.so.6(+0x78723)[0x7f7845f69723]
./libpilight.so(_free+0x19b)[0x7f7846f177d7]
./libpilight.so(json_delete+0xbc)[0x7f7846f1ab2e]
./libpilight.so(storage_gc+0xc9)[0x7f7846f2aab8]
./pilight-unittest[0x40af82]
./libpilight.so(CuTestRun+0x4a)[0x7f7846efee7a]
./libpilight.so(CuSuiteRun+0x36)[0x7f7846eff506]
./pilight-unittest(RunAllTests+0x502)[0x40827f]
./pilight-unittest(main+0x58)[0x408396]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f7845f116e5]
./pilight-unittest(_start+0x29)[0x407cb9]
======= Memory map: ========
00400000-00446000 r-xp 00000000 08:03 2764642                            /home/martin/git/pilight/rewrite/pilight-unittest
00645000-00646000 r--p 00045000 08:03 2764642                            /home/martin/git/pilight/rewrite/pilight-unittest
00646000-00670000 rw-p 00046000 08:03 2764642                            /home/martin/git/pilight/rewrite/pilight-unittest
00670000-00674000 rw-p 00000000 00:00 0
00d61000-00e39000 rw-p 00000000 00:00 0                                  [heap]
7f7828000000-7f7828101000 rw-p 00000000 00:00 0
7f7828101000-7f782c000000 ---p 00000000 00:00 0
7f7830000000-7f7830021000 rw-p 00000000 00:00 0
7f7830021000-7f7834000000 ---p 00000000 00:00 0
7f7834000000-7f7834021000 rw-p 00000000 00:00 0
7f7834021000-7f7838000000 ---p 00000000 00:00 0
7f7838000000-7f7838021000 rw-p 00000000 00:00 0
7f7838021000-7f783c000000 ---p 00000000 00:00 0
7f783dffc000-7f783dffd000 ---p 00000000 00:00 0
7f783dffd000-7f783e7fd000 rw-p 00000000 00:00 0
7f783e7fd000-7f783e7fe000 ---p 00000000 00:00 0
7f783e7fe000-7f783effe000 rw-p 00000000 00:00 0
7f783effe000-7f783efff000 ---p 00000000 00:00 0
7f783efff000-7f783f7ff000 rw-p 00000000 00:00 0
7f783f7ff000-7f783f800000 ---p 00000000 00:00 0
7f783f800000-7f7840000000 rw-p 00000000 00:00 0
7f7840000000-7f7840021000 rw-p 00000000 00:00 0
7f7840021000-7f7844000000 ---p 00000000 00:00 0
7f7844184000-7f784419a000 r-xp 00000000 08:02 522328                     /lib64/libgcc_s.so.1
7f784419a000-7f7844399000 ---p 00016000 08:02 522328                     /lib64/libgcc_s.so.1
7f7844399000-7f784439a000 r--p 00015000 08:02 522328                     /lib64/libgcc_s.so.1
7f784439a000-7f784439b000 rw-p 00016000 08:02 522328                     /lib64/libgcc_s.so.1
7f784439b000-7f784439c000 ---p 00000000 00:00 0
7f784439c000-7f7844b9c000 rw-p 00000000 00:00 0
7f7844b9c000-7f7844c0a000 r-xp 00000000 08:02 656773                     /usr/lib64/libpcre.so.1.2.7
7f7844c0a000-7f7844e09000 ---p 0006e000 08:02 656773                     /usr/lib64/libpcre.so.1.2.7
7f7844e09000-7f7844e0a000 r--p 0006d000 08:02 656773                     /usr/lib64/libpcre.so.1.2.7
7f7844e0a000-7f7844e0b000 rw-p 0006e000 08:02 656773                     /usr/lib64/libpcre.so.1.2.7
7f7844e0b000-7f7844e1f000 r-xp 00000000 08:02 522284                     /lib64/libresolv-2.22.so
7f7844e1f000-7f784501e000 ---p 00014000 08:02 522284                     /lib64/libresolv-2.22.so
7f784501e000-7f784501f000 r--p 00013000 08:02 522284                     /lib64/libresolv-2.22.so
7f784501f000-7f7845020000 rw-p 00014000 08:02 522284                     /lib64/libresolv-2.22.so
7f7845020000-7f7845022000 rw-p 00000000 00:00 0
7f7845022000-7f7845026000 r-xp 00000000 08:02 522313                     /lib64/libcap.so.2.22
7f7845026000-7f7845225000 ---p 00004000 08:02 522313                     /lib64/libcap.so.2.22
7f7845225000-7f7845226000 r--p 00003000 08:02 522313                     /lib64/libcap.so.2.22
7f7845226000-7f7845227000 rw-p 00004000 08:02 522313                     /lib64/libcap.so.2.22
7f7845227000-7f784524a000 r-xp 00000000 08:02 522342                     /lib64/libselinux.so.1
7f784524a000-7f7845449000 ---p 00023000 08:02 522342                     /lib64/libselinux.so.1
7f7845449000-7f784544a000 r--p 00022000 08:02 522342                     /lib64/libselinux.so.1
7f784544a000-7f784544b000 rw-p 00023000 08:02 522342                     /lib64/libselinux.so.1
7f784544b000-7f784544d000 rw-p 00000000 00:00 0
7f784544d000-7f784546c000 r-xp 00000000 08:02 666761                     /usr/lib64/libudev.so.1.6.4
7f784546c000-7f784566b000 ---p 0001f000 08:02 666761                     /usr/lib64/libudev.so.1.6.4
7f784566b000-7f784566c000 r--p 0001e000 08:02 666761                     /usr/lib64/libudev.so.1.6.4
7f784566c000-7f784566d000 rw-p 0001f000 08:02 666761                     /usr/lib64/libudev.so.1.6.4
7f784566d000-7f78456b3000 r-xp 00000000 08:02 522307                     /lib64/libdbus-1.so.3.8.14
7f78456b3000-7f78458b2000 ---p 00046000 08:02 522307                     /lib64/libdbus-1.so.3.8.14
7f78458b2000-7f78458b3000 r--p 00045000 08:02 522307                     /lib64/libdbus-1.so.3.8.14
7f78458b3000-7f78458b4000 rw-p 00046000 08:02 522307                     /lib64/libdbus-1.so.3.8.14
7f78458b4000-7f78458d0000 r-xp 00000000 08:02 655702                     /usr/lib64/libnl-3.so.200.18.0
7f78458d0000-7f7845acf000 ---p 0001c000 08:02 655702                     /usr/lib64/libnl-3.so.200.18.0
7f7845acf000-7f7845ad1000 r--p 0001b000 08:02 655702                     /usr/lib64/libnl-3.so.200.18.0
7f7845ad1000-7f7845ad2000 rw-p 0001d000 08:02 655702                     /usr/lib64/libnl-3.so.200.18.0
7f7845ad2000-7f7845ad7000 r-xp 00000000 08:02 655706                     /usr/lib64/libnl-genl-3.so.200.18.0
7f7845ad7000-7f7845cd7000 ---p 00005000 08:02 655706                     /usr/lib64/libnl-genl-3.so.200.18.0
7f7845cd7000-7f7845cd8000 r--p 00005000 08:02 655706                     /usr/lib64/libnl-genl-3.so.200.18.0
7f7845cd8000-7f7845cd9000 rw-p 00006000 08:02 655706                     /usr/lib64/libnl-genl-3.so.200.18.0
7f7845cd9000-7f7845cf0000 r-xp 00000000 08:02 670503                     /usr/lib64/libusb-1.0.so.0.1.0
7f7845cf0000-7f7845eef000 ---p 00017000 08:02 670503                     /usr/lib64/libusb-1.0.so.0.1.0
7f7845eef000-7f7845ef0000 r--p 00016000 08:02 670503                     /usr/lib64/libusb-1.0.so.0.1.0
7f7845ef0000-7f7845ef1000 rw-p 00017000 08:02 670503                     /usr/lib64/libusb-1.0.so.0.1.0
7f7845ef1000-7f784608b000 r-xp 00000000 08:02 522252                     /lib64/libc-2.22.so
7f784608b000-7f784628a000 ---p 0019a000 08:02 522252                     /lib64/libc-2.22.so
7f784628a000-7f784628e000 r--p 00199000 08:02 522252                     /lib64/libc-2.22.so
7f784628e000-7f7846290000 rw-p 0019d000 08:02 522252                     /lib64/libc-2.22.so
7f7846290000-7f7846294000 rw-p 00000000 00:00 0
7f7846294000-7f784629e000 r-xp 00000000 08:02 522300                     /lib64/libunwind.so.8.0.1
7f784629e000-7f784649d000 ---p 0000a000 08:02 522300                     /lib64/libunwind.so.8.0.1
7f784649d000-7f784649e000 r--p 00009000 08:02 522300                     /lib64/libunwind.so.8.0.1
7f784649e000-7f784649f000 rw-p 0000a000 08:02 522300                     /lib64/libunwind.so.8.0.1
7f784649f000-7f78464ad000 rw-p 00000000 00:00 0
7f78464ad000-7f78464ef000 r-xp 00000000 08:02 670896                     /usr/lib64/libpcap.so.1.5.3
7f78464ef000-7f78466ee000 ---p 00042000 08:02 670896                     /usr/lib64/libpcap.so.1.5.3
7f78466ee000-7f78466f0000 r--p 00041000 08:02 670896                     /usr/lib64/libpcap.so.1.5.3
7f78466f0000-7f78466f1000 rw-p 00043000 08:02 670896                     /usr/lib64/libpcap.so.1.5.3
7f78466f1000-7f78466f2000 rw-p 00000000 00:00 0
7f78466f2000-7f78466f9000 r-xp 00000000 08:02 522286                     /lib64/librt-2.22.so
7f78466f9000-7f78468f8000 ---p 00007000 08:02 522286                     /lib64/librt-2.22.so
7f78468f8000-7f78468f9000 r--p 00006000 08:02 522286                     /lib64/librt-2.22.so
7f78468f9000-7f78468fa000 rw-p 00007000 08:02 522286                     /lib64/librt-2.22.so
7f78468fa000-7f78469f6000 r-xp 00000000 08:02 522260                     /lib64/libm-2.22.so
7f78469f6000-7f7846bf5000 ---p 000fc000 08:02 522260                     /lib64/libm-2.22.so
7f7846bf5000-7f7846bf6000 r--p 000fb000 08:02 522260                     /lib64/libm-2.22.so
7f7846bf6000-7f7846bf7000 rw-p 000fc000 08:02 522260                     /lib64/libm-2.22.so
7f7846bf7000-7f7846bf9000 r-xp 00000000 08:02 522258                     /lib64/libdl-2.22.so
7f7846bf9000-7f7846df9000 ---p 00002000 08:02 522258                     /lib64/libdl-2.22.so
7f7846df9000-7f7846dfa000 r--p 00002000 08:02 522258                     /lib64/libdl-2.22.so
7f7846dfa000-7f7846dfb000 rw-p 00003000 08:02 522258                     /lib64/libdl-2.22.so
7f7846dfb000-7f7846fdf000 r-xp 00000000 08:03 2761297                    /home/martin/git/pilight/rewrite/libpilight.so
7f7846fdf000-7f78471de000 ---p 001e4000 08:03 2761297                    /home/martin/git/pilight/rewrite/libpilight.so
7f78471de000-7f78471f3000 r--p 001e3000 08:03 2761297                    /home/martin/git/pilight/rewrite/libpilight.so
7f78471f3000-7f784793f000 rw-p 001f8000 08:03 2761297                    /home/martin/git/pilight/rewrite/libpilight.so
7f784793f000-7f7847948000 rw-p 00000000 00:00 0
7f7847948000-7f7847960000 r-xp 00000000 08:02 522282                     /lib64/libpthread-2.22.so
7f7847960000-7f7847b5f000 ---p 00018000 08:02 522282                     /lib64/libpthread-2.22.so
7f7847b5f000-7f7847b60000 r--p 00017000 08:02 522282                     /lib64/libpthread-2.22.so
7f7847b60000-7f7847b61000 rw-p 00018000 08:02 522282                     /lib64/libpthread-2.22.so
7f7847b61000-7f7847b65000 rw-p 00000000 00:00 0
7f7847b65000-7f7847b86000 r-xp 00000000 08:02 522244                     /lib64/ld-2.22.so
7f7847cdc000-7f7847d11000 r--s 00000000 00:13 19583                      /run/nscd/dbJIzyK0 (deleted)
7f7847d11000-7f7847d46000 r--s 00000000 00:13 19581                      /run/nscd/passwd
7f7847d46000-7f7847d50000 rw-p 00000000 00:00 0
7f7847d82000-7f7847d85000 rw-p 00000000 00:00 0
7f7847d85000-7f7847d86000 r--p 00020000 08:02 522244                     /lib64/ld-2.22.so
7f7847d86000-7f7847d87000 rw-p 00021000 08:02 522244                     /lib64/ld-2.22.so
7f7847d87000-7f7847d88000 rw-p 00000000 00:00 0
7fff5769d000-7fff576be000 rw-p 00000000 00:00 0                          [stack]
7fff577a5000-7fff577a8000 r--p 00000000 00:00 0                          [vvar]
7fff577a8000-7fff577aa000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)

GDB output for the above crash:
Code:
[ test_event_actions_switch_check_parameters       ]
ERROR: trying to free an unknown pointer in /home/martin/git/pilight/rewrite/libs/pilight/core/json.c at line #432
*** Error in `/home/martin/git/pilight/rewrite/pilight-unittest': free(): invalid pointer: 0x00000000006c8a70 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x721af)[0x7ffff61da1af]
/lib64/libc.so.6(+0x779d6)[0x7ffff61df9d6]
/lib64/libc.so.6(+0x78723)[0x7ffff61e0723]
./libpilight.so(_free+0x19b)[0x7ffff718e7d7]
./libpilight.so(json_delete+0xbc)[0x7ffff7191b2e]
./libpilight.so(storage_gc+0xc9)[0x7ffff71a1ab8]
/home/martin/git/pilight/rewrite/pilight-unittest[0x40af82]
./libpilight.so(CuTestRun+0x4a)[0x7ffff7175e7a]
./libpilight.so(CuSuiteRun+0x36)[0x7ffff7176506]
/home/martin/git/pilight/rewrite/pilight-unittest(RunAllTests+0x502)[0x40827f]
/home/martin/git/pilight/rewrite/pilight-unittest(main+0x58)[0x408396]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7ffff61886e5]
/home/martin/git/pilight/rewrite/pilight-unittest(_start+0x29)[0x407cb9]
======= Memory map: ========
00400000-00446000 r-xp 00000000 08:03 2764642                            /home/martin/git/pilight/rewrite/pilight-unittest
00645000-00646000 r--p 00045000 08:03 2764642                            /home/martin/git/pilight/rewrite/pilight-unittest
00646000-00670000 rw-p 00046000 08:03 2764642                            /home/martin/git/pilight/rewrite/pilight-unittest
00670000-0074c000 rw-p 00000000 00:00 0                                  [heap]
7fffd8000000-7fffd8101000 rw-p 00000000 00:00 0
7fffd8101000-7fffdc000000 ---p 00000000 00:00 0
7fffe0000000-7fffe0021000 rw-p 00000000 00:00 0
7fffe0021000-7fffe4000000 ---p 00000000 00:00 0
7fffe4000000-7fffe4021000 rw-p 00000000 00:00 0
7fffe4021000-7fffe8000000 ---p 00000000 00:00 0
7fffe8000000-7fffe8021000 rw-p 00000000 00:00 0
7fffe8021000-7fffec000000 ---p 00000000 00:00 0
7fffedffc000-7fffedffd000 ---p 00000000 00:00 0
7fffedffd000-7fffee7fd000 rw-p 00000000 00:00 0
7fffee7fd000-7fffee7fe000 ---p 00000000 00:00 0
7fffee7fe000-7fffeeffe000 rw-p 00000000 00:00 0
7fffeeffe000-7fffeefff000 ---p 00000000 00:00 0
7fffeefff000-7fffef7ff000 rw-p 00000000 00:00 0
7fffef7ff000-7fffef800000 ---p 00000000 00:00 0
7fffef800000-7ffff0000000 rw-p 00000000 00:00 0
7ffff0000000-7ffff0021000 rw-p 00000000 00:00 0
7ffff0021000-7ffff4000000 ---p 00000000 00:00 0
7ffff43fb000-7ffff4411000 r-xp 00000000 08:02 522328                     /lib64/libgcc_s.so.1
7ffff4411000-7ffff4610000 ---p 00016000 08:02 522328                     /lib64/libgcc_s.so.1
7ffff4610000-7ffff4611000 r--p 00015000 08:02 522328                     /lib64/libgcc_s.so.1
7ffff4611000-7ffff4612000 rw-p 00016000 08:02 522328                     /lib64/libgcc_s.so.1
7ffff4612000-7ffff4613000 ---p 00000000 00:00 0
7ffff4613000-7ffff4e13000 rw-p 00000000 00:00 0
7ffff4e13000-7ffff4e81000 r-xp 00000000 08:02 656773                     /usr/lib64/libpcre.so.1.2.7
7ffff4e81000-7ffff5080000 ---p 0006e000 08:02 656773                     /usr/lib64/libpcre.so.1.2.7
7ffff5080000-7ffff5081000 r--p 0006d000 08:02 656773                     /usr/lib64/libpcre.so.1.2.7
7ffff5081000-7ffff5082000 rw-p 0006e000 08:02 656773                     /usr/lib64/libpcre.so.1.2.7
7ffff5082000-7ffff5096000 r-xp 00000000 08:02 522284                     /lib64/libresolv-2.22.so
7ffff5096000-7ffff5295000 ---p 00014000 08:02 522284                     /lib64/libresolv-2.22.so
7ffff5295000-7ffff5296000 r--p 00013000 08:02 522284                     /lib64/libresolv-2.22.so
7ffff5296000-7ffff5297000 rw-p 00014000 08:02 522284                     /lib64/libresolv-2.22.so
7ffff5297000-7ffff5299000 rw-p 00000000 00:00 0
7ffff5299000-7ffff529d000 r-xp 00000000 08:02 522313                     /lib64/libcap.so.2.22
7ffff529d000-7ffff549c000 ---p 00004000 08:02 522313                     /lib64/libcap.so.2.22
7ffff549c000-7ffff549d000 r--p 00003000 08:02 522313                     /lib64/libcap.so.2.22
7ffff549d000-7ffff549e000 rw-p 00004000 08:02 522313                     /lib64/libcap.so.2.22
7ffff549e000-7ffff54c1000 r-xp 00000000 08:02 522342                     /lib64/libselinux.so.1
7ffff54c1000-7ffff56c0000 ---p 00023000 08:02 522342                     /lib64/libselinux.so.1
7ffff56c0000-7ffff56c1000 r--p 00022000 08:02 522342                     /lib64/libselinux.so.1
7ffff56c1000-7ffff56c2000 rw-p 00023000 08:02 522342                     /lib64/libselinux.so.1
7ffff56c2000-7ffff56c4000 rw-p 00000000 00:00 0
7ffff56c4000-7ffff56e3000 r-xp 00000000 08:02 666761                     /usr/lib64/libudev.so.1.6.4
7ffff56e3000-7ffff58e2000 ---p 0001f000 08:02 666761                     /usr/lib64/libudev.so.1.6.4
7ffff58e2000-7ffff58e3000 r--p 0001e000 08:02 666761                     /usr/lib64/libudev.so.1.6.4
7ffff58e3000-7ffff58e4000 rw-p 0001f000 08:02 666761                     /usr/lib64/libudev.so.1.6.4
7ffff58e4000-7ffff592a000 r-xp 00000000 08:02 522307                     /lib64/libdbus-1.so.3.8.14
7ffff592a000-7ffff5b29000 ---p 00046000 08:02 522307                     /lib64/libdbus-1.so.3.8.14
7ffff5b29000-7ffff5b2a000 r--p 00045000 08:02 522307                     /lib64/libdbus-1.so.3.8.14
7ffff5b2a000-7ffff5b2b000 rw-p 00046000 08:02 522307                     /lib64/libdbus-1.so.3.8.14
7ffff5b2b000-7ffff5b47000 r-xp 00000000 08:02 655702                     /usr/lib64/libnl-3.so.200.18.0
7ffff5b47000-7ffff5d46000 ---p 0001c000 08:02 655702                     /usr/lib64/libnl-3.so.200.18.0
7ffff5d46000-7ffff5d48000 r--p 0001b000 08:02 655702                     /usr/lib64/libnl-3.so.200.18.0
7ffff5d48000-7ffff5d49000 rw-p 0001d000 08:02 655702                     /usr/lib64/libnl-3.so.200.18.0
7ffff5d49000-7ffff5d4e000 r-xp 00000000 08:02 655706                     /usr/lib64/libnl-genl-3.so.200.18.0
7ffff5d4e000-7ffff5f4e000 ---p 00005000 08:02 655706                     /usr/lib64/libnl-genl-3.so.200.18.0
7ffff5f4e000-7ffff5f4f000 r--p 00005000 08:02 655706                     /usr/lib64/libnl-genl-3.so.200.18.0
7ffff5f4f000-7ffff5f50000 rw-p 00006000 08:02 655706                     /usr/lib64/libnl-genl-3.so.200.18.0
7ffff5f50000-7ffff5f67000 r-xp 00000000 08:02 670503                     /usr/lib64/libusb-1.0.so.0.1.0
7ffff5f67000-7ffff6166000 ---p 00017000 08:02 670503                     /usr/lib64/libusb-1.0.so.0.1.0
7ffff6166000-7ffff6167000 r--p 00016000 08:02 670503                     /usr/lib64/libusb-1.0.so.0.1.0
7ffff6167000-7ffff6168000 rw-p 00017000 08:02 670503                     /usr/lib64/libusb-1.0.so.0.1.0
7ffff6168000-7ffff6302000 r-xp 00000000 08:02 522252                     /lib64/libc-2.22.so
7ffff6302000-7ffff6501000 ---p 0019a000 08:02 522252                     /lib64/libc-2.22.so
7ffff6501000-7ffff6505000 r--p 00199000 08:02 522252                     /lib64/libc-2.22.so
7ffff6505000-7ffff6507000 rw-p 0019d000 08:02 522252                     /lib64/libc-2.22.so
7ffff6507000-7ffff650b000 rw-p 00000000 00:00 0
7ffff650b000-7ffff6515000 r-xp 00000000 08:02 522300                     /lib64/libunwind.so.8.0.1
7ffff6515000-7ffff6714000 ---p 0000a000 08:02 522300                     /lib64/libunwind.so.8.0.1
7ffff6714000-7ffff6715000 r--p 00009000 08:02 522300                     /lib64/libunwind.so.8.0.1
7ffff6715000-7ffff6716000 rw-p 0000a000 08:02 522300                     /lib64/libunwind.so.8.0.1
7ffff6716000-7ffff6724000 rw-p 00000000 00:00 0
7ffff6724000-7ffff6766000 r-xp 00000000 08:02 670896                     /usr/lib64/libpcap.so.1.5.3
7ffff6766000-7ffff6965000 ---p 00042000 08:02 670896                     /usr/lib64/libpcap.so.1.5.3
7ffff6965000-7ffff6967000 r--p 00041000 08:02 670896                     /usr/lib64/libpcap.so.1.5.3
7ffff6967000-7ffff6968000 rw-p 00043000 08:02 670896                     /usr/lib64/libpcap.so.1.5.3
7ffff6968000-7ffff6969000 rw-p 00000000 00:00 0
7ffff6969000-7ffff6970000 r-xp 00000000 08:02 522286                     /lib64/librt-2.22.so
7ffff6970000-7ffff6b6f000 ---p 00007000 08:02 522286                     /lib64/librt-2.22.so
7ffff6b6f000-7ffff6b70000 r--p 00006000 08:02 522286                     /lib64/librt-2.22.so
7ffff6b70000-7ffff6b71000 rw-p 00007000 08:02 522286                     /lib64/librt-2.22.so
7ffff6b71000-7ffff6c6d000 r-xp 00000000 08:02 522260                     /lib64/libm-2.22.so
7ffff6c6d000-7ffff6e6c000 ---p 000fc000 08:02 522260                     /lib64/libm-2.22.so
7ffff6e6c000-7ffff6e6d000 r--p 000fb000 08:02 522260                     /lib64/libm-2.22.so
7ffff6e6d000-7ffff6e6e000 rw-p 000fc000 08:02 522260                     /lib64/libm-2.22.so
7ffff6e6e000-7ffff6e70000 r-xp 00000000 08:02 522258                     /lib64/libdl-2.22.so
7ffff6e70000-7ffff7070000 ---p 00002000 08:02 522258                     /lib64/libdl-2.22.so
7ffff7070000-7ffff7071000 r--p 00002000 08:02 522258                     /lib64/libdl-2.22.so
7ffff7071000-7ffff7072000 rw-p 00003000 08:02 522258                     /lib64/libdl-2.22.so
7ffff7072000-7ffff7256000 r-xp 00000000 08:03 2761297                    /home/martin/git/pilight/rewrite/libpilight.so
7ffff7256000-7ffff7455000 ---p 001e4000 08:03 2761297                    /home/martin/git/pilight/rewrite/libpilight.so
7ffff7455000-7ffff746a000 r--p 001e3000 08:03 2761297                    /home/martin/git/pilight/rewrite/libpilight.so
7ffff746a000-7ffff7bb6000 rw-p 001f8000 08:03 2761297                    /home/martin/git/pilight/rewrite/libpilight.so
7ffff7bb6000-7ffff7bbf000 rw-p 00000000 00:00 0
7ffff7bbf000-7ffff7bd7000 r-xp 00000000 08:02 522282                     /lib64/libpthread-2.22.so
7ffff7bd7000-7ffff7dd6000 ---p 00018000 08:02 522282                     /lib64/libpthread-2.22.so
7ffff7dd6000-7ffff7dd7000 r--p 00017000 08:02 522282                     /lib64/libpthread-2.22.so
7ffff7dd7000-7ffff7dd8000 rw-p 00018000 08:02 522282                     /lib64/libpthread-2.22.so
7ffff7dd8000-7ffff7ddc000 rw-p 00000000 00:00 0
7ffff7ddc000-7ffff7dfd000 r-xp 00000000 08:02 522244                     /lib64/ld-2.22.so
7ffff7f4e000-7ffff7f83000 r--s 00000000 00:13 19583                      /run/nscd/dbJIzyK0 (deleted)
7ffff7f83000-7ffff7fb8000 r--s 00000000 00:13 19581                      /run/nscd/passwd
7ffff7fb8000-7ffff7fc2000 rw-p 00000000 00:00 0
7ffff7ff4000-7ffff7ff7000 rw-p 00000000 00:00 0
7ffff7ff7000-7ffff7ffa000 r--p 00000000 00:00 0                          [vvar]
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0                          [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 00020000 08:02 522244                     /lib64/ld-2.22.so
7ffff7ffd000-7ffff7ffe000 rw-p 00021000 08:02 522244                     /lib64/ld-2.22.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Thread 1 "pilight-unittes" received signal SIGABRT, Aborted.
0x00007ffff619c8d7 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: zypper install libcap2-debuginfo-2.22-16.55.x86_64 libdbus-1-3-debuginfo-1.8.22-1.1.x86_64 libgcc_s1-gcc6-debuginfo-6.2.1+r239768-3.3.x86_64 libnl3-200-debuginfo-3.2.23-4.5.x86_64 libpcap1-debuginfo-1.5.3-6.1.x86_64 libpcre1-debuginfo-8.39-6.1.x86_64 libselinux1-debuginfo-2.5-2.12.x86_64 libudev1-debuginfo-228-22.1.x86_64 libunwind-debuginfo-1.1-12.5.x86_64 libusb-1_0-0-debuginfo-1.0.20-3.4.x86_64
(gdb) bt full
#0  0x00007ffff619c8d7 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007ffff619dcaa in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00007ffff61da1b4 in __libc_message () from /lib64/libc.so.6
No symbol table info available.
#3  0x00007ffff61df9d6 in malloc_printerr () from /lib64/libc.so.6
No symbol table info available.
#4  0x00007ffff61e0723 in _int_free () from /lib64/libc.so.6
No symbol table info available.
#5  0x00007ffff718e7d7 in _free (a=0x6c8a70, file=0x7ffff721a460 "/home/martin/git/pilight/rewrite/libs/pilight/core/json.c", line=432)
    at /home/martin/git/pilight/rewrite/libs/pilight/core/mem.c:290
        currP = 0x0
        prevP = 0x6c6e10
        match = 0
#6  0x00007ffff7191b2e in json_delete (node=0x6c8a70) at /home/martin/git/pilight/rewrite/libs/pilight/core/json.c:432
No locals.
#7  0x00007ffff71a1ab8 in storage_gc () at /home/martin/git/pilight/rewrite/libs/pilight/storage/storage.c:2930
        tmp_storage = 0x0
#8  0x000000000040af82 in test_event_actions_switch_check_parameters (tc=0x6b2940) at /home/martin/git/pilight/rewrite/tests/event_actions_switch.c:460
        __FUNCTION__ = "test_event_actions_switch_check_parameters"
#9  0x00007ffff7175e7a in CuTestRun (tc=0x6b2940) at /home/martin/git/pilight/rewrite/libs/pilight/core/CuTest.c:143
        buf = {{__jmpbuf = {32, -4480700767192753261, 4226192, 140737488346480, 0, 0, 4480700768391256979, 4480716913060207507}, __mask_was_saved = 0, __saved_mask = {__val = {
                140737351976464, 0, 140737337879360, 32, 0, 4226192, 140737351976464, 140737488346480, 140737338891631, 6783360, 7057424, 0, 7057424, 6783360, 3, 140737325848184}}}}
#10 0x00007ffff7176506 in CuSuiteRun (testSuite=0x674140) at /home/martin/git/pilight/rewrite/libs/pilight/core/CuTest.c:298
        testCase = 0x6b2940
        i = 107
#11 0x000000000040827f in RunAllTests () at /home/martin/git/pilight/rewrite/tests/alltests.c:140
        i = 33
        __PRETTY_FUNCTION__ = "RunAllTests"
        r = 0
#12 0x0000000000408396 in main (argc=1, argv=0x7fffffffdd78) at /home/martin/git/pilight/rewrite/tests/alltests.c:163
        f = 0x674010
(gdb)

Edit: now with backtrace! Smile it seems the previous output was too long, and the post was simply cut off by MyBB.
 
Reply
#26
Where is the backtrace?
 
Reply
#27
uhh... copy-paste error, will fix in a minute (have to get a new one and it takes a while)

Seems it's getting cut off by MyBB... I'll cut out the first part of it...
 
Reply
#28
Some of my previous issues have been fixed, but I'm still running into a couple of problems with the unittests.

  1. The arp test always hangs. pilight-unittest never terminates, stopped with ^C
  2. The network_ping test also always hangs. pilight-unittest never terminates, stopped with ^C
  3. The test_event_actions_mail_run segfaults. Backtrace below.
  4. (Running as regular user) there are 3 unfreed pointers in the i2c protocols test. This causes every following test to fail, because the number of unfreed pointers stays at 3, so the GC asserts never pass. Logs below.
  5. (Running with sudo) pilight-unittest segfaults when it reaches the i2c unittests. Log & backtrace below.
  6. (regular user)3 test failures: ssdp_client, ssdp_server, and test_protocols_api_lirc. Logs below.
  7. (sudo)Lirc test works with root, still 2 test failures remaining though; ssdp_client and ssdp_server. Logs basically the same as for #6., just without he lirc test failure.

After every point, the failing test was commented out in alltests.c to see what other tests also fail. The same results were always achieved with both sudo and non-sudo, except points 4&5 and 6&7 where the behaviour differed as noted.



Backtrace for #3. above
Code:
(gdb) bt full
#0  0x00007ffff6c65901 in pthread_join () from /lib64/libpthread.so.0
No symbol table info available.
#1  0x00007ffff73c824d in uv_thread_join (tid=0x797b70 <pth>) at /home/linoM6400/git/pilight/rewrite/libs/libuv/unix/thread.c:89
No locals.
#2  0x000000000041ef04 in test_event_actions_mail_run (tc=0x7f94d0) at /home/linoM6400/git/pilight/rewrite/tests/event_actions_mail.c:744
        __FUNCTION__ = "test_event_actions_mail_run"
        f = 0x81ad60
#3  0x00007ffff73df4c9 in CuTestRun (tc=0x7f94d0) at /home/linoM6400/git/pilight/rewrite/libs/pilight/core/CuTest.c:143
        buf = {{__jmpbuf = {36, -1534070881410104474, 4230880, 140737488346496, 0, 0, 1534070882367423334, 1534052722042192742}, __mask_was_saved = 0, __saved_mask = {__val = {140737351976608, 0, 140737341045872, 36, 0, 4230880, 140737351976608, 140737488346496,
                140737341420478, 8061312, 8369488, 0, 8369488, 8061312, 3, 140737319667320}}}}
#4  0x00007ffff73dfb55 in CuSuiteRun (testSuite=0x7ac140) at /home/linoM6400/git/pilight/rewrite/libs/pilight/core/CuTest.c:298
        testCase = 0x7f94d0
        i = 135
#5  0x0000000000409572 in RunAllTests () at /home/linoM6400/git/pilight/rewrite/tests/alltests.c:171
        i = 37
        pth_cur_id = 140737353856832
        r = 0
#6  0x0000000000409689 in main (argc=1, argv=0x7fffffffdd88) at /home/linoM6400/git/pilight/rewrite/tests/alltests.c:194
        f = 0x7ac010
Doesn't seem very useful though…



Log for #4. above:
Code:
[ test_protocols_i2c_lm75                          ]
[ test_protocols_i2c_lm76                          ]
[ test_protocols_i2c_bmp180                        ]
WARNING: unfreed pointer in /home/linoM6400/git/pilight/rewrite/tests/protocols_i2c.c at line #131
WARNING: unfreed pointer in /home/linoM6400/git/pilight/rewrite/tests/protocols_i2c.c at line #131
WARNING: unfreed pointer in /home/linoM6400/git/pilight/rewrite/tests/protocols_i2c.c at line #131
Which then leads to this:
Code:
............................................FF...............................F................FFFFFFFFFFFFFFFFFFFFFF.....FFFFFFF......F

There were 33 failures:
1) test_ssdp_client: /home/linoM6400/git/pilight/rewrite/tests/ssdp.c:228: expected <1> but was <0>
2) test_ssdp_server: /home/linoM6400/git/pilight/rewrite/tests/ssdp.c:284: expected <1> but was <0>
3) test_protocols_api_lirc: /home/linoM6400/git/pilight/rewrite/tests/protocols_api_lirc.c:161: expected <0> but was <-13>
4) test_protocols_i2c_lm75: /home/linoM6400/git/pilight/rewrite/tests/protocols_i2c.c:263: expected <0> but was <-1>
5) test_protocols_i2c_lm76: /home/linoM6400/git/pilight/rewrite/tests/protocols_i2c.c:340: expected <0> but was <-1>
6) test_protocols_i2c_bmp180: /home/linoM6400/git/pilight/rewrite/tests/protocols_i2c.c:417: expected <0> but was <-1>
7) test_protocols_gpio_ds18s20: /home/linoM6400/git/pilight/rewrite/tests/protocols_gpio_ds18x20.c:116: expected <0> but was <3>
8) test_protocols_gpio_ds18b20: /home/linoM6400/git/pilight/rewrite/tests/protocols_gpio_ds18x20.c:165: expected <0> but was <3>
9) test_event_operator_and: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:139: expected <0> but was <3>
10) test_event_operator_divide: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:230: expected <0> but was <3>
11) test_event_operator_eq: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:357: expected <0> but was <3>
12) test_event_operator_ge: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:485: expected <0> but was <3>
13) test_event_operator_gt: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:613: expected <0> but was <3>
14) test_event_operator_intdivide: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:726: expected <0> but was <3>
15) test_event_operator_le: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:889: expected <0> but was <3>
16) test_event_operator_lt: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:1017: expected <0> but was <3>
17) test_event_operator_minus: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:1109: expected <0> but was <3>
18) test_event_operator_modulus: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:1236: expected <0> but was <3>
19) test_event_operator_multiply: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:1328: expected <0> but was <3>
20) test_event_operator_ne: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:1455: expected <0> but was <3>
21) test_event_operator_or: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:1563: expected <0> but was <3>
22) test_event_operator_plus: /home/linoM6400/git/pilight/rewrite/tests/event_operators.c:1655: expected <0> but was <3>
23) test_event_function_date_add: /home/linoM6400/git/pilight/rewrite/tests/event_functions.c:221: expected <0> but was <3>
24) test_event_function_date_format: /home/linoM6400/git/pilight/rewrite/tests/event_functions.c:340: expected <0> but was <3>
25) test_event_function_random: /home/linoM6400/git/pilight/rewrite/tests/event_functions.c:444: expected <0> but was <3>
26) test_event_actions_toggle_check_parameters: /home/linoM6400/git/pilight/rewrite/tests/event_actions_toggle.c:288: expected <0> but was <3>
27) test_event_actions_toggle_run: /home/linoM6400/git/pilight/rewrite/tests/event_actions_toggle.c:396: expected <0> but was <3>
28) test_event_actions_label_check_parameters: /home/linoM6400/git/pilight/rewrite/tests/event_actions_label.c:505: expected <0> but was <3>
29) test_event_actions_label_run: /home/linoM6400/git/pilight/rewrite/tests/event_actions_label.c:593: expected <0> but was <3>
30) test_event_actions_label_run_delayed: /home/linoM6400/git/pilight/rewrite/tests/event_actions_label.c:657: expected <0> but was <3>
31) test_event_actions_label_run_overlapped: /home/linoM6400/git/pilight/rewrite/tests/event_actions_label.c:756: expected <0> but was <3>
32) test_event_actions_label_run_override: /home/linoM6400/git/pilight/rewrite/tests/event_actions_label.c:841: expected <0> but was <3>
33) test_events: /home/linoM6400/git/pilight/rewrite/tests/events.c:592: expected <0> but was <3>

!!!FAILURES!!!
Runs: 135 Passes: 102 Fails: 33



Log for #5. above
Code:
…snip…
[ test_protocols_core_raw                          ]
[ test_protocols_generic_dimmer                    ]
[ test_protocols_generic_label                     ]
[ test_protocols_generic_screen                    ]
[ test_protocols_generic_switch                    ]
[ test_protocols_generic_weather                   ]
[ test_protocols_generic_webcam                    ]
[ test_protocols_i2c_lm75                          ]
martin@linux-s7ea:~/git/pilight/rewrite/build>

backtrace:
Code:
(gdb) bt full
#0  0x0000000000000000 in ?? ()
No symbol table info available.
#1  0x00007ffff6829ce3 in wiringXI2CSetup () from /usr/lib/libwiringx.so
No symbol table info available.
#2  0x0000000000439154 in test_protocols_i2c_lm75 (tc=0x7e84c0) at /home/linoM6400/git/pilight/rewrite/tests/protocols_i2c.c:266
        __FUNCTION__ = "test_protocols_i2c_lm75"
        utsname = {sysname = "Linux", '\000' <repeats 59 times>, nodename = "linux-s7ea.suse", '\000' <repeats 49 times>, release = "4.4.73-18.17-default", '\000' <repeats 44 times>, version = "#1 SMP Fri Jun 23 20:25:06 UTC 2017 (f462a66)", '\000' <repeats 19 times>,
          machine = "x86_64", '\000' <repeats 58 times>, __domainname = "(none)", '\000' <repeats 58 times>}
        path = "/lib/modules/4.4.73-18.17-default\000ocol library\n\000\000\230\316\365\377\177\000\000\b\000\000\000\060\000\000\000\260\345\377\377\377\177\000\000\360\344\377\377\377\177\000\000\300\312\306\366\377\177\000\000\200\022\362\365\377\177", '\000' <repeats 18 times>, " \006\362\365\000\004\000\000\"\000\000\000\002", '\000' <repeats 15 times>, "\220", '\000' <repeats 11 times>, "#", '\000' <repeats 15 times>, "\340\216@", '\000' <repeats 13 times>, "x\006\362\365\377\177\000\000\000\000\000\000\000\000\000\000"...
        file = "/lib/modules/4.4.73-18.17-default/kernel/drivers/i2c//i2c-stub.ko", '\000' <repeats 1983 times>
        p = 0x0
        len = 20794
        ret = 0
        add = 0x7fded0 "\200\354\177"
#3  0x00007ffff73df4c9 in CuTestRun (tc=0x7e84c0) at /home/linoM6400/git/pilight/rewrite/libs/pilight/core/CuTest.c:143
        buf = {{__jmpbuf = {35, 6155236456624169291, 4230880, 140737488350256, 0, 0, -6155236457092079285, -6155254616107638453}, __mask_was_saved = 0, __saved_mask = {__val = {140737351976608, 0, 140737341045872, 35, 0, 4230880, 140737351976608, 140737488350256,
                140737341420478, 8061312, 8361056, 0, 8361056, 8061312, 3, 140737319667320}}}}
#4  0x00007ffff73dfb55 in CuSuiteRun (testSuite=0x7ac140) at /home/linoM6400/git/pilight/rewrite/libs/pilight/core/CuTest.c:298
        testCase = 0x7e84c0
        i = 94
#5  0x0000000000409551 in RunAllTests () at /home/linoM6400/git/pilight/rewrite/tests/alltests.c:171
        i = 36
        pth_cur_id = 140737353856832
        r = 0
#6  0x0000000000409668 in main (argc=1, argv=0x7fffffffec38) at /home/linoM6400/git/pilight/rewrite/tests/alltests.c:194
        f = 0x7ac010



Logs for #6.
Code:
............................................FF...............................F......................................................

There were 3 failures:
1) test_ssdp_client: /home/linoM6400/git/pilight/rewrite/tests/ssdp.c:228: expected <1> but was <0>
2) test_ssdp_server: /home/linoM6400/git/pilight/rewrite/tests/ssdp.c:284: expected <1> but was <0>
3) test_protocols_api_lirc: /home/linoM6400/git/pilight/rewrite/tests/protocols_api_lirc.c:161: expected <0> but was <-13>

!!!FAILURES!!!
Runs: 132 Passes: 129 Fails: 3
 
Reply
#29
1. ARP: Was this run as root?
2. Ping: was this run as root?
3. Will check
5. Do you have the i2c-stub kernel module available?

4. 6. 7. pilight-unittest requires root for the reasons described in the travis PR. I will add a check for root in the program and let it terminate when you aren't.

General. I need to add a check that aborts the test when one of the test fail. When one test fails, it affects the others too much, so no need to continue.

For ARP, can you post an ifconfig?
 
Reply
#30
(07-16-2017, 09:18 PM)curlymo Wrote: 1. ARP: Was this run as root?

For ARP, can you post an ifconfig?
Yes, it was run as both root and non-root, but both hang indefinitely. ifconfig:
Code:
em1       Link encap:Ethernet  HWaddr B8:AC:6F:54:BF:48
          inet addr:10.0.0.27  Bcast:10.0.0.63  Mask:255.255.255.192
          inet6 addr: fe80::baac:6fff:fe54:bf48/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:525 errors:0 dropped:0 overruns:0 frame:0
          TX packets:541 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:419629 (409.7 Kb)  TX bytes:111032 (108.4 Kb)
          Interrupt:17

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


(07-16-2017, 09:18 PM)curlymo Wrote: 2. Ping: was this run as root?
Hmm, seems I missed running that one as root. Works now.

(07-16-2017, 09:18 PM)curlymo Wrote: 5. Do you have the i2c-stub kernel module available?
It's available
Code:
martin@linux-s7ea:~>  find /lib/modules/$(uname -r) -type f -name \*.ko | grep i2c-stub
/lib/modules/4.4.73-18.17-default/kernel/drivers/i2c/i2c-stub.ko
but not loaded according to
Code:
martin@linux-s7ea:~>  cat /proc/modules | grep i2c
i2c_algo_bit 16384 1 nouveau, Live 0x0000000000000000
i2c_i801 28672 0 - Live 0x0000000000000000

(07-16-2017, 09:18 PM)curlymo Wrote: General. I need to add a check that aborts the test when one of the test fail. When one test fails, it affects the others too much, so no need to continue.
I would prefer if the test suite kept running regardless of which tests fail, that's how most unittesting frameworks work. So far I've only noticed that the unfreed pointer counter is not reset between tests, and that was running as non-root. Running as root, the test suite works well (after commenting out the tests that hang or segfault), and nicely reports the only two test failures.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)