Skip to content

tests/riotboot/flashwrite: add automatic test#15559

Merged
aabadie merged 1 commit intoRIOT-OS:masterfrom
fjmolinas:pr_riotboot_flashwrite_test
Jun 8, 2021
Merged

tests/riotboot/flashwrite: add automatic test#15559
aabadie merged 1 commit intoRIOT-OS:masterfrom
fjmolinas:pr_riotboot_flashwrite_test

Conversation

@fjmolinas
Copy link
Contributor

Contribution description

I brought back to life an old PR I had to add a test for #15511, so this PR is based on top of that one. I'm not enabling it in the CI, but I still think having the script is useful for testing riotboot_flashwrite.

Testing procedure

  • libcoap coap-client must be in the path

  • setup network

sudo dist/tools/ethos/setup_network.sh riot0 2001:db8::/64

  • run test

make -C tests/riotboot_flashwrite/ flash test -j3

@fjmolinas fjmolinas added Area: tests Area: tests and testing framework Type: new feature The issue requests / The PR implemements a new feature for RIOT State: waiting for other PR State: The PR requires another PR to be merged first labels Dec 4, 2020
@fjmolinas fjmolinas force-pushed the pr_riotboot_flashwrite_test branch from c4d3001 to 03e5a9b Compare December 4, 2020 09:51
@miri64 miri64 changed the title tests/riotboto/flashwrite: add automatic test tests/riotboot/flashwrite: add automatic test Dec 4, 2020
@fjmolinas fjmolinas force-pushed the pr_riotboot_flashwrite_test branch from 03e5a9b to 40b41f3 Compare February 2, 2021 09:55
@fjmolinas fjmolinas removed the State: waiting for other PR State: The PR requires another PR to be merged first label Feb 2, 2021
@fjmolinas
Copy link
Contributor Author

@bergzand might you want to take a look at this one? Would help with testing #15917

@fjmolinas fjmolinas force-pushed the pr_riotboot_flashwrite_test branch from 40b41f3 to 76bd325 Compare February 9, 2021 10:54
@fjmolinas
Copy link
Contributor Author

Mind If I rebase @benpicco this branch does not have upstream fixes that makes the test fails on some boards.

@benpicco
Copy link
Contributor

benpicco commented Feb 9, 2021

Sure, rebase

@fjmolinas fjmolinas force-pushed the pr_riotboot_flashwrite_test branch from 3eae00c to 6da8c30 Compare February 9, 2021 17:48
@fjmolinas fjmolinas added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 11, 2021
@fjmolinas
Copy link
Contributor Author

Rebased

@fjmolinas fjmolinas force-pushed the pr_riotboot_flashwrite_test branch from 617d747 to 8c4bd1a Compare April 8, 2021 06:17
@fjmolinas
Copy link
Contributor Author

can I squash @aabadie?

@aabadie
Copy link
Contributor

aabadie commented Jun 1, 2021

can I squash @aabadie?

Sure. Mind to provide some test output ?

@fjmolinas fjmolinas force-pushed the pr_riotboot_flashwrite_test branch 2 times, most recently from 8a1fc2e to 1130a42 Compare June 1, 2021 13:03
@fjmolinas
Copy link
Contributor Author

Not sure why labeler is failing, @aabadie any ideas?

@fjmolinas
Copy link
Contributor Author

BOARD=dwm1001 make -C tests/riotboot_flashwrite/ flash test-with-config

_flashwrite_handler(): received data: offset=60352 len=64 blockwise=1 more=1
_flashwrite_handler(): received data: offset=60416 len=64 blockwise=1 more=1
_flashwrite_handler(): received data: offset=60480 len=64 blockwise=1 more=1
_flashwrite_handler(): received data: offset=60544 len=64 blockwise=1 more=1
_flashwrite_handler(): received data: offset=60608 len=64 blockwise=1 more=1
_flashwrite_handler(): received data: offset=60672 len=64 blockwise=1 more=1
_flashwrite_handler(): received data: offset=60736 len=64 blockwise=1 more=1
_flashwrite_handler(): received data: offset=60800 len=64 blockwise=1 more=1
_flashwrite_handler(): received data: offset=60864 len=12 blockwise=1 more=0
_flashwrite_handler(): finish
WARNING:coap.blockwise-requester:Block1 option completely ignored by server, assuming it knows what it is doing.
reboot
reboot
----> ethos: hello received
Failed to send flush request: Operation not permitted
NETOPT_RX_END_IRQ not implemented by driver
gnrc_uhcpc: Using 4 as border interface and 0 as wireless interface.
gnrc_uhcpc: only one interface found, skipping setup.
main(): This is RIOT! (Version: 2021.04-devel-1281-gdfa96-pr_riotboot_flashwrite_test)
riotboot_flashwrite test application
Running from slot 0
Image magic_number: 0x544f4952
Image Version: 0x60b61527
Image start address: 0x00002400
Header chksum: 0x1c3a377f

Starting the shell


> current-slot

>
> current-slot
Running from slot 0
> ifconfig
ifconfig
Iface  4  HWaddr: 6A:18:FB:35:35:4A
          L2-PDU:1500  MTU:1500  HL:64  Source address length: 6
          Link type: wired
          inet6 addr: fe80::6818:fbff:fe35:354a  scope: link  VAL
pinging node...
PING fe80::6818:fbff:fe35:354a%riot0(fe80::6818:fbff:fe35:354a%riot0) 56 data bytes

--- fe80::6818:fbff:fe35:354a%riot0 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 40.427/40.427/40.427/0.000 ms
pinging node succeeded.
riotboot-invalidate 0
reboot
          inet6 addr: fe80::2  scope: link  VAL
          inet6 group: ff02::1
          inet6 group: ff02::1:ff35:354a
          inet6 group: ff02::1:ff00:2

> riotboot-invalidate 0
> reboot
----> ethos: hello received
Failed to send flush request: Operation not permitted
NETOPT_RX_END_IRQ not implemented by driver
gnrc_uhcpc: Using 4 as border interface and 0 as wireless interface.
gnrc_uhcpc: only one interface found, skipping setup.
main(): This is RIOT! (Version: 2021.04-devel-1281-gdfa96-pr_riotboot_flashwrite_test)
riotboot_flashwrite test application
Running from slot 1
Image magic_number: 0x544f4952
Image Version: 0x60b61526
Image start address: 0x00041400
Header chksum: 0xfc392782

Starting the shell


> current-slot

>
> current-slot
Running from slot 1
TEST PASSED

@fjmolinas fjmolinas force-pushed the pr_riotboot_flashwrite_test branch from 1130a42 to efedc66 Compare June 7, 2021 06:55
@github-actions github-actions bot added the Area: doc Area: Documentation label Jun 7, 2021
@fjmolinas
Copy link
Contributor Author

Rebased so labeler is green :)

@fjmolinas
Copy link
Contributor Author

All green @aabadie

Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

ACK

@aabadie aabadie merged commit 30c0ba6 into RIOT-OS:master Jun 8, 2021
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jul 15, 2021
@fjmolinas fjmolinas deleted the pr_riotboot_flashwrite_test branch July 30, 2021 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: doc Area: Documentation 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 Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants