aboutsummaryrefslogtreecommitdiff
path: root/src/cmocka.c
AgeCommit message (Collapse)AuthorFilesLines
2019-11-19cmocka: Fix indentationArnaud Gelas1-2/+2
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-10-22cmocka: Cast return to int in _cmocka_run_group_tests()Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2019-10-22Fix MSVC warning on conversion from 'time_t' to 'double'Paolo Teti1-1/+1
Fixes the following MSVC warning: warning C4244: '=': conversion from 'time_t' to 'double', possible loss of data Signed-off-by: Paolo Teti <paolo.teti@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-10-22Fix possible loss of data reported by MSVCPaolo Teti1-1/+1
Fixes the following warning: warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data Signed-off-by: Paolo Teti <paolo.teti@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-08-21cmocka: Fix C4703 build error on UWPmyd73491-1/+1
2019-03-29cmocka: check MALLOC_ALIGNMENT macroJanusz Jankowski1-0/+2
Some compilers already define this macro in standard libary headers, for example GCC for Xtensa Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-03-28cmocka: Add cmocka_set_skip_filter() to skip testsAnderson Toshiyuki Sasaki1-3/+18
The introduced cmocka_set_skip_filter() allows setting a filter for tests to be skipped. It supports the same wildcards allowed for cmocka_set_test_filter() (i.e. '*' or '?'). Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-01-25cmocka: Use calloc for allocating memoryAndreas Schneider1-6/+7
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2019-01-22include: Add new assert macros to compare 2 floats given an epsilon.Arnaud Gelas1-0/+77
assert_float_equal and assert_float_not_equal
2018-11-08cmocka: Use string formatAndreas Schneider1-2/+2
2018-11-08cmocka: Fix typoAndreas Schneider1-1/+1
Fixes #11 Thanks to pavelxdd.
2018-09-26cmocka: Silence clang analyzer warningAndreas Schneider1-2/+6
It has no way to mark things as false postivies or teach it that things abort. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-26cmocka: Initialize some pointers with NULLAndreas Schneider1-6/+6
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-26cmocka: Initialize the group_stateAndreas Schneider1-1/+3
2018-09-17cmocka: Do not abort if a test is skippedAndreas Schneider1-2/+8
Thans to Jeff Olivier. Fixes #3
2018-09-06cmocka: Remove emtpy newline at the end of the fileAndreas Schneider1-1/+0
2018-08-29cmocka: Fix subunit output on failuresAndreas Schneider1-1/+1
Fixes #1 Thanks to Jeff Rizzo!
2018-08-29cmocka: Update copyrightAndreas Schneider1-1/+1
2018-08-24cmocka: Fix size type of check_for_leftover_values return valueAndreas Schneider1-3/+3
2018-08-23cmocka: Use a union for MallocBlockInfoAndreas Schneider1-35/+49
This fixes alignment issues which could be an issue e.g. on MIPS. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-23cmocka: Fix size typeAndreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-22cmocka: Use memcpy as we do not care about NUL terminationAndreas Schneider1-1/+1
2018-06-21cmocka: Check for possible overflow in test_malloc()Andreas Schneider1-5/+10
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-12cmocka: Improve print outputAndreas Schneider1-2/+3
2018-06-11cmocka: Add cmocka_set_test_filter() to filter testsAndreas Schneider1-0/+15
2018-06-11cmocka: Add c_strmatch() functionAndreas Schneider1-0/+58
2018-06-11src: Use correct size type for check_for_leftover_values_list()Andreas Schneider1-5/+5
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-07cmocka: Fix filling the cm_tests array.Andreas Schneider1-1/+1
2018-06-07cmocka: Limit the display of memory if it is not equalAndreas Schneider1-3/+8
The buffer we have available is 1K, make sure we do not print more than that.
2018-05-30cmocka: Add checks for sane arguments and allocationAndreas Schneider1-2/+11
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-03-21src: Fix size type for allocated_blocksAndreas Schneider1-7/+7
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-08-11cmocka: Print the error message of a fixture if it failsAndreas Schneider1-1/+7
This adds error information to the output.
2017-06-22src: Initialize teardown_name to fix a build warningAndreas Schneider1-1/+1
BUG #60
2017-04-07cmocka: Change define to HAVE_CLOCK_REALTIMEAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-04-05src: Do not use C++ keywords as local variablesAndreas Schneider1-5/+5
2017-04-05Fix TAP output and summary.Stas Kobzar1-7/+7
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-12src: Add support for compile flag -Wstrict-prototypesAdrian Friedli1-2/+2
2016-11-07cmocka: Leave if expected_call is NULLAndreas Schneider1-2/+3
CID 1365415 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-10-04Fixed xUnit output durationsAdrien Marc1-2/+2
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-09-21cmocka: Do not add xml headers twiceAndreas Schneider1-4/+29
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-09-21cmocka: Add file pattern to create xml file for each groupAndreas Schneider1-0/+46
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-09-21Fixed format specifier width mismatchJoseph Ates1-6/+14
On some platforms PRIu64 is not necessarily the width of the LargestIntegralType. A new decimal format specifier for LargestIntegralType was added and replaces the invocations of PRIu64.
2016-09-21cmocka: Use defines for WILL_RETURN valuesAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-06-02vcm_print_error: fix segfault on long messagesAris Adamantiadis1-5/+7
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Add will_return_maybe() for ignoring mock returnsJoseph Ates1-2/+4
As both parameter and function call order checking allow for ignoring cases where they are never invoked, the mock return values are at somewhat of a mismatch in that they must always be returned at least once (even in the case of will_return_always()). Therefore, the ability to set the count to -2 on will_return_count was added with a new macro (will_return_maybe) that indicates that that the value field may never be returned and still allow a successful test. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Fix indentationJoseph Ates1-3/+3
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Include strings.h for strcasecmpEmil Velikov1-0/+4
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Print group setup and teardown errorsAndreas Schneider1-1/+15
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-12-18cmocka: Add support to verify call orderingJoseph Ates1-12/+179
2015-10-05src: Fix some compiler warningsAndreas Schneider1-5/+5
BUG: https://open.cryptomilk.org/issues/43