[asterisk-dev] [Code Review] 4555: clang compiler warning: fixes for tests to be compiled using clang

Diederik de Groot reviewboard at asterisk.org
Sun Mar 29 17:46:38 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4555/#review14960
-----------------------------------------------------------



/branches/13/tests/test_strings.c
<https://reviewboard.asterisk.org/r/4555/#comment25581>

    If buflen being 0 is allowed in these tests, then ast_escape_semicolons returning NULL should also be allowed to make this test a valid case



/branches/13/main/utils.c
<https://reviewboard.asterisk.org/r/4555/#comment25580>

    If buflen 0 is supposed to be allowed (as suggested by the tests), then this should be checked and not raise a problem in the assert


- Diederik de Groot


On March 30, 2015, 12:43 a.m., Diederik de Groot wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4555/
> -----------------------------------------------------------
> 
> (Updated March 30, 2015, 12:43 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24917
>     https://issues.asterisk.org/jira/browse/ASTERISK-24917
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> clang's static analyzer will throw quite a number warnings / errors during compilation, some of which can be very helpfull in finding corner-case bugs. 
> 
> fixes for tests to be compiled using clang
> 
> 
> Diffs
> -----
> 
>   /branches/13/tests/test_strings.c 433444 
>   /branches/13/tests/test_stringfields.c 433444 
>   /branches/13/tests/test_sched.c 433444 
>   /branches/13/tests/test_linkedlists.c 433444 
>   /branches/13/tests/test_acl.c 433444 
>   /branches/13/main/utils.c 433444 
> 
> Diff: https://reviewboard.asterisk.org/r/4555/diff/
> 
> 
> Testing
> -------
> 
> executing the tests one-by-one works fine (completes to end) (skipping /main/stdtime) -> 
> test show results failed:
> 
> 
> =================== /main/message/ ====== 
> FAIL   test_message_queue_handler_nom /main/message/             31036ms
> [test_message.c:int handler_wait_for_message(struct ast_test *):244]: Test timed out while waiting for handler to get message
> 
> 
> =================== /main/strings/ ====== 
> FAIL   escape_semicolons              /main/strings/             1ms     
> [Mar 29 20:13:43] ERROR[2521]: utils.c:493 char *ast_escape_semicolons(const char *, char *, int): FRACK!, Failed assertion string != NULL && outbuf != NULL (0)
> -> explainable by the change made to the source. ast_alloca(0) is not being executed -> test2 = NULL: need to resolv the open question how to handle ast_alloca(0) before making any further changes.
> 
> 
> =================== /main/stdtime ====== 
> "test execute all" fails, caused by the /main/stdtime/ test. 
> START  /main/stdtime/ - timezone_watch 
> [test_time.c:enum ast_test_result_state test_timezone_watch(struct ast_test_info *, enum ast_test_command, struct ast_test *):84]: Executing deletion test...
> j62747*CLI> 
> CLI becomes unresponsive / no further command completion for example.
> Guess this will need a little further investigation. Maybe the source changes made to main/stdtime/ where not completely correct.
> 
> 
> File Attachments
> ----------------
> 
> tests results xml (except /main/stdtime)
>   https://reviewboard.asterisk.org/media/uploaded/files/2015/03/29/4a17471b-4952-43cd-b015-92d00da2338b__tests.xml
> 
> 
> Thanks,
> 
> Diederik de Groot
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150329/d1a2b383/attachment-0001.html>


More information about the asterisk-dev mailing list