Merge 4.16
Change-Id: I11db70a8e25a6656c5ec640a703e7b06d5a3672e
This commit is contained in:
@@ -7,12 +7,9 @@
|
||||
#include <ip_checksum.h>
|
||||
|
||||
static const uint8_t test_data_simple[] = {
|
||||
0x64, 0x3b, 0x33, 0x17, 0x34, 0x74, 0x62, 0x30,
|
||||
0x75, 0x73, 0xf3, 0x11, 0x30, 0x2c, 0x34, 0x35,
|
||||
0x6d, 0x39, 0x69, 0x32, 0x23, 0x24, 0x76, 0x71,
|
||||
0x77, 0x30, 0x39, 0x75, 0x76, 0x35, 0x71, 0x32,
|
||||
0x40, 0x46, 0x34, 0x34, 0xBB, 0x03, 0x66, 0x52
|
||||
};
|
||||
0x64, 0x3b, 0x33, 0x17, 0x34, 0x74, 0x62, 0x30, 0x75, 0x73, 0xf3, 0x11, 0x30, 0x2c,
|
||||
0x34, 0x35, 0x6d, 0x39, 0x69, 0x32, 0x23, 0x24, 0x76, 0x71, 0x77, 0x30, 0x39, 0x75,
|
||||
0x76, 0x35, 0x71, 0x32, 0x40, 0x46, 0x34, 0x34, 0xBB, 0x03, 0x66, 0x52};
|
||||
static const size_t test_data_simple_sz = ARRAY_SIZE(test_data_simple);
|
||||
static const unsigned long test_data_simple_checksum = 0x4267;
|
||||
|
||||
@@ -81,7 +78,7 @@ static void test_add_ip_checksums(void **state)
|
||||
{
|
||||
unsigned long res_1 = compute_ip_checksum(test_data_simple, test_data_simple_sz / 2);
|
||||
unsigned long res_2 = compute_ip_checksum(test_data_simple + test_data_simple_sz / 2,
|
||||
test_data_simple_sz / 2);
|
||||
test_data_simple_sz / 2);
|
||||
unsigned long res_sum = add_ip_checksums(test_data_simple_sz / 2, res_1, res_2);
|
||||
|
||||
assert_int_equal(test_data_simple_checksum, res_sum);
|
||||
|
Reference in New Issue
Block a user