mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 14:11:02 +00:00
Compare commits
1 Commits
19e9c52717
...
6a5063fd96
Author | SHA1 | Date | |
---|---|---|---|
|
6a5063fd96 |
@ -88,7 +88,6 @@ START_TEST(test_pbuf_copy_zero_pbuf)
|
|||||||
fail_unless(p2->ref == 1);
|
fail_unless(p2->ref == 1);
|
||||||
|
|
||||||
p3 = pbuf_alloc(PBUF_RAW, p1->tot_len, PBUF_POOL);
|
p3 = pbuf_alloc(PBUF_RAW, p1->tot_len, PBUF_POOL);
|
||||||
fail_unless(p3 != NULL);
|
|
||||||
err = pbuf_copy(p3, p1);
|
err = pbuf_copy(p3, p1);
|
||||||
fail_unless(err == ERR_VAL);
|
fail_unless(err == ERR_VAL);
|
||||||
|
|
||||||
@ -162,8 +161,8 @@ START_TEST(test_pbuf_copy_partial_pbuf)
|
|||||||
b->payload = packet;
|
b->payload = packet;
|
||||||
pbuf_cat(a, b);
|
pbuf_cat(a, b);
|
||||||
dest = pbuf_alloc(PBUF_RAW, 14, PBUF_RAM);
|
dest = pbuf_alloc(PBUF_RAW, 14, PBUF_RAM);
|
||||||
fail_unless(dest != NULL);
|
|
||||||
memset(dest->payload, 0, dest->len);
|
memset(dest->payload, 0, dest->len);
|
||||||
|
fail_unless(dest != NULL);
|
||||||
|
|
||||||
/* Don't copy if data will not fit */
|
/* Don't copy if data will not fit */
|
||||||
err = pbuf_copy_partial_pbuf(dest, a, a->tot_len, 4);
|
err = pbuf_copy_partial_pbuf(dest, a, a->tot_len, 4);
|
||||||
@ -199,7 +198,6 @@ START_TEST(test_pbuf_split_64k_on_small_pbufs)
|
|||||||
LWIP_UNUSED_ARG(_i);
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, 1, PBUF_POOL);
|
p = pbuf_alloc(PBUF_RAW, 1, PBUF_POOL);
|
||||||
fail_unless(p != NULL);
|
|
||||||
pbuf_split_64k(p, &rest);
|
pbuf_split_64k(p, &rest);
|
||||||
fail_unless(p->tot_len == 1);
|
fail_unless(p->tot_len == 1);
|
||||||
pbuf_free(p);
|
pbuf_free(p);
|
||||||
@ -269,14 +267,9 @@ START_TEST(test_pbuf_take_at_edge)
|
|||||||
u8_t *out;
|
u8_t *out;
|
||||||
int i;
|
int i;
|
||||||
u8_t testdata[] = { 0x01, 0x08, 0x82, 0x02 };
|
u8_t testdata[] = { 0x01, 0x08, 0x82, 0x02 };
|
||||||
struct pbuf *p;
|
struct pbuf *p = pbuf_alloc(PBUF_RAW, 1024, PBUF_POOL);
|
||||||
struct pbuf *q;
|
struct pbuf *q = p->next;
|
||||||
LWIP_UNUSED_ARG(_i);
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, 1024, PBUF_POOL);
|
|
||||||
fail_unless(p != NULL);
|
|
||||||
q = p->next;
|
|
||||||
|
|
||||||
/* alloc big enough to get a chain of pbufs */
|
/* alloc big enough to get a chain of pbufs */
|
||||||
fail_if(p->tot_len == p->len);
|
fail_if(p->tot_len == p->len);
|
||||||
memset(p->payload, 0, p->len);
|
memset(p->payload, 0, p->len);
|
||||||
@ -326,14 +319,9 @@ START_TEST(test_pbuf_get_put_at_edge)
|
|||||||
u8_t *out;
|
u8_t *out;
|
||||||
u8_t testdata = 0x01;
|
u8_t testdata = 0x01;
|
||||||
u8_t getdata;
|
u8_t getdata;
|
||||||
struct pbuf *p;
|
struct pbuf *p = pbuf_alloc(PBUF_RAW, 1024, PBUF_POOL);
|
||||||
struct pbuf *q;
|
struct pbuf *q = p->next;
|
||||||
LWIP_UNUSED_ARG(_i);
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, 1024, PBUF_POOL);
|
|
||||||
fail_unless(p != NULL);
|
|
||||||
q = p->next;
|
|
||||||
|
|
||||||
/* alloc big enough to get a chain of pbufs */
|
/* alloc big enough to get a chain of pbufs */
|
||||||
fail_if(p->tot_len == p->len);
|
fail_if(p->tot_len == p->len);
|
||||||
memset(p->payload, 0, p->len);
|
memset(p->payload, 0, p->len);
|
||||||
|
Loading…
Reference in New Issue
Block a user