#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <libgen.h>
#include "blobmsg.h"
Go to the source code of this file.
◆ BUF_LEN
◆ anonymous enum
◆ dump_result()
static void dump_result |
( |
const char * |
fn, |
|
|
int |
r, |
|
|
const char * |
filename, |
|
|
struct blob_attr ** |
tb |
|
) |
| |
|
static |
Definition at line 30 of file test-blobmsg-parse.c.
32 fprintf(stdout,
"%s: %s: %c%c%c (%d)\n", basename((
char *) filename), fn,
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 70 of file test-blobmsg-parse.c.
73 fprintf(stderr,
"Usage: %s <blobmsg.bin>\n", argv[0]);
static void test_blobmsg(const char *filename)
◆ test_blobmsg()
static void test_blobmsg |
( |
const char * |
filename | ) |
|
|
static |
Definition at line 39 of file test-blobmsg-parse.c.
48 fd = fopen(filename,
"r");
50 fprintf(stderr,
"unable to open %s\n", filename);
65 dump_result(
"blobmsg_parse_array", r, filename, tb);
int blobmsg_parse_array(const struct blobmsg_policy *policy, int policy_len, struct blob_attr **tb, void *data, unsigned int len)
int blobmsg_parse(const struct blobmsg_policy *policy, int policy_len, struct blob_attr **tb, void *data, unsigned int len)
static void dump_result(const char *fn, int r, const char *filename, struct blob_attr **tb)
static const struct blobmsg_policy foo_policy[]
FILE(GLOB test_cases "test-*.c") MACRO(ADD_FUZZER_TEST name) ADD_EXECUTABLE($
◆ foo_policy
Initial value:= {
.name = "message",
},
.name = "list",
},
.name = "testdata",
},
}
Definition at line 1 of file test-blobmsg-parse.c.