6#if !LWIP_STATS || !MEM_STATS ||!MEMP_STATS
7#error "This tests needs MEM- and MEMP-statistics enabled"
9#if !LWIP_TCP || !TCP_QUEUE_OOSEQ || !LWIP_WND_SCALE
10#error "This test needs TCP OOSEQ queueing and window scaling enabled"
28#define TESTBUFSIZE_1 65535
29#define TESTBUFSIZE_2 65530
30#define TESTBUFSIZE_3 50050
45 fail_unless(
p !=
NULL);
51 fail_unless(
p !=
NULL);
57 fail_unless(
p !=
NULL);
63 fail_unless(
p !=
NULL);
73 struct pbuf *p1, *p2, *p3;
78 fail_unless(p1 !=
NULL);
79 fail_unless(p1->
ref == 1);
82 fail_unless(p2 !=
NULL);
83 fail_unless(p2->
ref == 1);
87 fail_unless(p1->
ref == 1);
88 fail_unless(p2->
ref == 1);
110 for (
i = 0;
i < 8;
i++) {
112 fail_unless(
p !=
NULL);
113 for (
j = 0;
j <
p->len;
j++) {
130 fail_unless(
p !=
NULL);
133 fail_unless(
p !=
NULL);
151 char lwip[] =
"lwip ";
157 fail_unless(
a !=
NULL);
160 fail_unless(
b !=
NULL);
176 fail_unless(
strcmp(
"lwip packet", (
char*)
dest->payload) == 0);
180 fail_unless(
strcmp(
"llwip packet", (
char*)
dest->payload) == 0);
184 fail_unless(
strcmp(
"llwip lwip p", (
char*)
dest->payload) == 0);
188 fail_unless(
strcmp(
"lwip lwip p", (
char*)
dest->payload) == 0);
201 pbuf_split_64k(
p, &rest);
202 fail_unless(
p->tot_len == 1);
225 fail_unless(p1 !=
NULL);
227 fail_unless(p2 !=
NULL);
229 fail_unless(p3 !=
NULL);
240 pbuf_split_64k(p1, &rest2);
243 pbuf_split_64k(rest2, &rest3);
274 fail_if(
p->tot_len ==
p->len);
285 "Bad data at pos %d, was %02X, expected %02X",
i,
out[
i],
testdata[
i]);
294 "Bad data at pos %d, was %02X, expected %02X",
p->len - 1,
out[
p->len - 1],
testdata[0]);
298 "Bad data at pos %d, was %02X, expected %02X",
p->len - 1 +
i,
out[
i-1],
testdata[
i]);
308 "Bad data at pos %d, was %02X, expected %02X",
p->len+
i,
out[
i],
testdata[
i]);
326 fail_if(
p->tot_len ==
p->len);
335 "Bad data at pos %d, was %02X, expected %02X",
p->len, *
out,
testdata);
338 fail_unless(*
out == getdata,
339 "pbuf_get_at() returned bad data at pos %d, was %02X, expected %02X",
p->len, getdata, *
out);
349 TESTFUNC(test_pbuf_alloc_zero_pbufs),
351 TESTFUNC(test_pbuf_copy_unmatched_chains),
352 TESTFUNC(test_pbuf_copy_partial_pbuf),
353 TESTFUNC(test_pbuf_split_64k_on_small_pbufs),
354 TESTFUNC(test_pbuf_queueing_bigger_than_64k),
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
unsigned short int uint16_t
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define LWIP_UNUSED_ARG(x)
u8_t pbuf_get_at(const struct pbuf *p, u16_t offset)
void pbuf_cat(struct pbuf *h, struct pbuf *t)
struct pbuf * pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
u8_t pbuf_free(struct pbuf *p)
err_t pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from)
u16_t pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset)
err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len)
err_t pbuf_copy_partial_pbuf(struct pbuf *p_to, const struct pbuf *p_from, u16_t copy_len, u16_t offset)
err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset)
void pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data)
_Check_return_ int __cdecl rand(void)
Suite * create_suite(const char *name, testfunc *tests, size_t num_tests, SFun setup, SFun teardown)
void lwip_check_ensure_no_alloc(unsigned int skip)
static struct test_info tests[]
static void pbuf_setup(void)
static u8_t testbuf_1a[TESTBUFSIZE_1]
static u8_t testbuf_2[TESTBUFSIZE_2]
static u8_t testbuf_1[TESTBUFSIZE_1]
static u8_t testbuf_3a[TESTBUFSIZE_3]
static u8_t testbuf_3[TESTBUFSIZE_3]
static u8_t testbuf_2a[TESTBUFSIZE_2]
END_TEST Suite * pbuf_suite(void)
static void pbuf_teardown(void)