mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-23 22:35:19 +00:00
fix unittests
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
$ECHO "$BLUE[*] Execution cmocka Unit-Tests $GREY"
|
||||
unset AFL_CC
|
||||
make -C .. unit || CODE=1 INCOMPLETE=1 :
|
||||
rm -rf unittests/unit_hash unittests/unit_rand
|
||||
|
||||
. ./test-post.sh
|
||||
|
||||
rm -rf unittests/unit_hash unittests/unit_rand
|
||||
|
@ -49,16 +49,16 @@ typedef struct prealloc_me
|
||||
|
||||
u8 *content[128];
|
||||
|
||||
} prealloc_me_t;
|
||||
} element_t;
|
||||
|
||||
#define PREALLOCED_BUF_SIZE (64)
|
||||
prealloc_me_t prealloc_me_buf[PREALLOCED_BUF_SIZE];
|
||||
element_t prealloc_me_buf[PREALLOCED_BUF_SIZE];
|
||||
s32 prealloc_me_size = 0;
|
||||
|
||||
static void test_alloc_free(void **state) {
|
||||
(void)state;
|
||||
|
||||
prealloc_me_t *prealloced = NULL;
|
||||
element_t *prealloced = NULL;
|
||||
PRE_ALLOC(prealloced, prealloc_me_buf, PREALLOCED_BUF_SIZE, prealloc_me_size);
|
||||
assert_non_null(prealloced);
|
||||
PRE_FREE(prealloced, prealloc_me_size);
|
||||
@ -69,7 +69,7 @@ static void test_prealloc_overflow(void **state) {
|
||||
(void)state;
|
||||
|
||||
u32 i = 0;
|
||||
prealloc_me_t *prealloced[PREALLOCED_BUF_SIZE + 10];
|
||||
element_t *prealloced[PREALLOCED_BUF_SIZE + 10];
|
||||
|
||||
for (i = 0; i < PREALLOCED_BUF_SIZE + 10; i++) {
|
||||
|
||||
|
Reference in New Issue
Block a user