Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: adds 6LoWPAN receiving test #5502

Merged
merged 1 commit into from
Jun 7, 2016

Conversation

Yonezawa-T2
Copy link
Contributor

This test sends fragmented 6LoWPAN packets with header compression to itself and checks the received packet. I made this for #5033.

@Yonezawa-T2 Yonezawa-T2 added Area: network Area: Networking Area: tests Area: tests and testing framework labels Jun 3, 2016
@Yonezawa-T2
Copy link
Contributor Author

Here is a handcrafted hex dump for Wireshark:
https://gist.github.com/Yonezawa-T2/1f780296babe467e3e08cfa241de36fb
The "Encapsulation Type" is "IEEE 802.15.4 Wireless PAN with FCS not present".

@miri64
Copy link
Member

miri64 commented Jun 3, 2016

Just thinking if you can use gnrc_pktdump to output the reassembled packet in various stages (so you can check it with pexpect). The same you could also do for your gnrc_ipv6_ext test.

@Yonezawa-T2
Copy link
Contributor Author

gnrc_pktdump is great. Updated.
Depends on #5504, will rebase when it is merged.

@miri64
Copy link
Member

miri64 commented Jun 3, 2016

#5504 was merged, please rebase.

@Yonezawa-T2 Yonezawa-T2 force-pushed the tests_gnrc_sixlowpan branch from 537613f to 65d4fb5 Compare June 6, 2016 01:39
@Yonezawa-T2
Copy link
Contributor Author

Rebased & squashed.

char dst[8];
} netif_hdr = {
.src = { 0x02, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x02 },
.dst = { 0x02, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x01 },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building application "gnrc_sixlowpan" for "native" with MCU "native".

/home/martine/Repositories/RIOT-OS/RIOT/tests/gnrc_sixlowpan/main.c: In function ‘_send_packet’:
/home/martine/Repositories/RIOT-OS/RIOT/tests/gnrc_sixlowpan/main.c:61:36: error: overflow in implicit constant conversion [-Werror=overflow]
         .src = { 0x02, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x02 },
                                    ^
/home/martine/Repositories/RIOT-OS/RIOT/tests/gnrc_sixlowpan/main.c:61:42: error: overflow in implicit constant conversion [-Werror=overflow]
         .src = { 0x02, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x02 },
                                          ^
/home/martine/Repositories/RIOT-OS/RIOT/tests/gnrc_sixlowpan/main.c:62:36: error: overflow in implicit constant conversion [-Werror=overflow]
         .dst = { 0x02, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x01 },
                                    ^
/home/martine/Repositories/RIOT-OS/RIOT/tests/gnrc_sixlowpan/main.c:62:42: error: overflow in implicit constant conversion [-Werror=overflow]
         .dst = { 0x02, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x01 },
                                          ^
cc1: all warnings being treated as errors
/home/martine/Repositories/RIOT-OS/RIOT/Makefile.base:60: recipe for target '/home/martine/Repositories/RIOT-OS/RIOT/tests/gnrc_sixlowpan/bin/native/gnrc_sixlowpan/main.o' failed
make[1]: *** [/home/martine/Repositories/RIOT-OS/RIOT/tests/gnrc_sixlowpan/bin/native/gnrc_sixlowpan/main.o] Error 1
/home/martine/Repositories/RIOT-OS/RIOT/tests/gnrc_sixlowpan/../../Makefile.include:259: recipe for target 'all' failed

I think its recommendable to have these fields of type uint8_t (see #5497)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amended.

@Yonezawa-T2 Yonezawa-T2 force-pushed the tests_gnrc_sixlowpan branch from 65d4fb5 to 9e172f3 Compare June 6, 2016 09:16
@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 6, 2016
@miri64
Copy link
Member

miri64 commented Jun 6, 2016

I'll give my ACK as soon as I have tested it locally :)

gnrc_netreg_register(GNRC_NETTYPE_UDP, &dump_udp);
gnrc_netreg_register(GNRC_NETTYPE_UDP, &dump_udp_61616);


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There be whitespace ;-)

@miri64
Copy link
Member

miri64 commented Jun 6, 2016

Apart from the introduced whitespace-error: ACK and go, as soon as Murdock likes it.

@miri64 miri64 self-assigned this Jun 6, 2016
@Yonezawa-T2 Yonezawa-T2 force-pushed the tests_gnrc_sixlowpan branch from 9e172f3 to f7bd237 Compare June 7, 2016 00:59
@Yonezawa-T2
Copy link
Contributor Author

Fixed whitespace error.

@miri64 miri64 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jun 7, 2016
@miri64 miri64 merged commit 0f6d8f2 into RIOT-OS:master Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants