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

Call for Tock 2.2 Release Testing #4272

Closed
12 of 64 tasks
lschuermann opened this issue Dec 18, 2024 · 10 comments
Closed
12 of 64 tasks

Call for Tock 2.2 Release Testing #4272

lschuermann opened this issue Dec 18, 2024 · 10 comments
Assignees
Labels
release-blocker Issue or PR that must be resolved before the next release

Comments

@lschuermann
Copy link
Member

lschuermann commented Dec 18, 2024

We just tagged a release candidate for Tock 2.2, and it's ready for testing!

As discussed in #3197, we're changing our testing strategy starting with this release. Instead of trying to test all boards, we will primarily focus on Tier 1 boards, and specifically the nRF52840DK which we already test as part of our new "Treadmill" hardware CI system. These efforts should allow us to more frequently test & release Tock's "core" components, without placing as large of a burden on maintainers and board contributors.

That said, we don't want to discourage anyone from testing! We'll use this issue for tracking these efforts, which supersedes #3197. If you find yourself with some time and a board on your hands, feel free to copy the "test comment template" below and post your results in a comment to this issue.

Assuming that we don't find any issues or receive requests to extend the testing period, I plan to tag a release some time around Jan 3rd.

Changes in Tock 2.2

Over the next week I will compile a more complete changelog. In the meantime, from the release notes:

With almost two years since Tock 2.1.1, it's about time for a new Tock release! Compared to 2.1.1, this release will contain 3882 commits made in 836 PRs by 90 contributors (of which 48 are new contributors!). This release is the first to support stable Rust for out-of-tree and (a subset of) the in-tree boards, adds new supported boards, and contains many other fixes and improvements. Some notable bug fixes are in the Cortex-M arch crate to prevent userspace applications from executing in privileged mode, and disabling unused PMP regions on RISC-V. A full change list will be included with the final release notes.

Misc Release Todo

Post-release todo:

Test Boards

Tier 1:

Others:

Test Comment Template

Template:
  • Tests run on most Boards

    • examples/sensors
    • examples/c_hello and examples/tests/printf_long
    • examples/tests/console_recv_short and examples/tests/console_recv_long
    • examples/blink
    • examples/rot_client and examples/rot_service
    • examples/blink and examples/c_hello and examples/buttons
    • examples/lua-hello
    • examples/tests/console_timeout
    • examples/tests/malloc_test01
    • examples/tests/stack_size_test01
    • examples/tests/stack_size_test02
    • examples/tests/mpu_stack_growth
    • examples/tests/mpu_walk_region
    • examples/tests/multi_alarm_test
    • examples/tests/adc
    • examples/tests/adc_continuous
    • examples/tutorials/05_ipc/led and examples/tutorials/05_ipc/rng and examples/tutorials/05_ipc/logic
  • nRF specific

    • examples/ble_advertising
    • examples/ble_passive_scanning
  • Imix-specific

    • examples/tests/imix
    • examples/services/ble-env-sense and examples/services/ble-env-sense/test-with-sensors
    • examples/ble-uart
    • examples/ip_sense: Application that samples a sensor and puts it in a UDP broadcast segment
    • examples/tests/udp/udp_send: sends a UDP datagram to a destination port:
    • examples/tests/udp_receive: receives datagrams on a port an blinks when received: pair with udp_send
    • In-Kernel Tests
      • boards/imix/src/test/aes_ccm_test.rs
      • boards/imix/src/test/aes_test.rs
      • boards/imix/src/test/icmp_lowpan_test.rs
      • boards/imix/src/test/linear_log_test.rs
      • boards/imix/src/test/log_test.rs
      • boards/imix/src/test/rng_test.rs
      • boards/imix/src/test/udp_lowpan_test.rs
        • start()
        • start_rx()
        • start_with_app()
        • start_dual_rx()
      • boards/imix/src/test/virtual_uart_rx_test.rs
      • boards/imix/src/test/multi_alarm_test.rs
  • Microbit-specific Tests

    • examples/accel-leds
    • examples/music
    • examples/tests/ble/ble_advertise
  • Miscellaneous

    • Scheduler Tests
      • whileone + blink
      • restart whileone using process console
      • stop and start whileone
      • whileone + blink + hello_loop using MLFQ scheduler
@lschuermann lschuermann added the release-blocker Issue or PR that must be resolved before the next release label Dec 18, 2024
@lschuermann lschuermann self-assigned this Dec 18, 2024
@lschuermann lschuermann mentioned this issue Dec 18, 2024
46 tasks
@lschuermann lschuermann pinned this issue Dec 18, 2024
@lschuermann
Copy link
Member Author

lschuermann commented Dec 18, 2024

nRF52840-DK

Automated test results from: https://github.com/tock/tock-hardware-ci/actions/runs/12399190636

  • Tests run on most Boards

    • examples/sensors
    • examples/c_hello and examples/tests/printf_long
      (Add c_hello and printf_long test tock-hardware-ci#11)
    • examples/tests/console_recv_short and examples/tests/console_recv_long
      (fails, expected: console not virtualized; [SHORT] Error doing UART receive: -2)
    • examples/blink
    • examples/rot_client and examples/rot_service
    • examples/blink and examples/c_hello and examples/buttons
    • examples/lua-hello
    • examples/tests/console_timeout
    • examples/tests/malloc_test01
    • examples/tests/stack_size_test01
    • examples/tests/stack_size_test02
    • examples/tests/mpu_stack_growth
      ([WIP] Add MPU stack growth test tock-hardware-ci#9)
    • examples/tests/mpu_walk_region (both RAM & flash overrun work)
    • examples/tests/multi_alarm_test
    • examples/tests/adc
    • examples/tests/adc_continuous
      (continuous sampling not implemented in the nRF52 ADC driver)
    • examples/tutorials/05_ipc/led and examples/tutorials/05_ipc/rng and examples/tutorials/05_ipc/logic
      (Add IPC tutorial tests (RNG -> LED) tock-hardware-ci#10)
  • nRF specific

    • examples/ble_advertising
    • examples/ble_passive_scanning
  • Miscellaneous

    • Scheduler Tests
      • whileone + blink

      • restart whileone using process console

      • stop and start whileone

      • whileone + blink + hello_loop using MLFQ scheduler

        nRF52840DK MLFQ Scheduler Patch
        diff --git a/boards/nordic/nrf52840dk/src/lib.rs b/boards/nordic/nrf52840dk/src/lib.rs
        index 82ef137b6..5e75420ae 100644
        --- a/boards/nordic/nrf52840dk/src/lib.rs
        +++ b/boards/nordic/nrf52840dk/src/lib.rs
        @@ -81,7 +81,7 @@ use kernel::hil::time::Counter;
         #[allow(unused_imports)]
         use kernel::hil::usb::Client;
         use kernel::platform::{KernelResources, SyscallDriverLookup};
        -use kernel::scheduler::round_robin::RoundRobinSched;
        +use kernel::scheduler::mlfq::MLFQSched;
         #[allow(unused_imports)]
         use kernel::{capabilities, create_capability, debug, debug_gpio, debug_verbose, static_init};
         use nrf52840::gpio::Pin;
        @@ -241,7 +241,7 @@ pub struct Platform {
                 >,
             >,
             kv_driver: &'static KVDriver,
        -    scheduler: &'static RoundRobinSched<'static>,
        +    scheduler: &'static MLFQSched<'static, VirtualMuxAlarm<'static, nrf52840::rtc::Rtc<'static>>>,
             systick: cortexm4::systick::SysTick,
         }
         
        @@ -274,7 +274,7 @@ impl KernelResources<Chip> for Platform {
             type SyscallDriverLookup = Self;
             type SyscallFilter = ();
             type ProcessFault = ();
        -    type Scheduler = RoundRobinSched<'static>;
        +    type Scheduler = MLFQSched<'static, VirtualMuxAlarm<'static, nrf52840::rtc::Rtc<'static>>>;
             type SchedulerTimer = cortexm4::systick::SysTick;
             type WatchDog = ();
             type ContextSwitchCallback = ();
        @@ -885,8 +885,8 @@ pub unsafe fn start() -> (
             // PLATFORM SETUP, SCHEDULER, AND START KERNEL LOOP
             //--------------------------------------------------------------------------
         
        -    let scheduler = components::sched::round_robin::RoundRobinComponent::new(&*addr_of!(PROCESSES))
        -        .finalize(components::round_robin_component_static!(NUM_PROCS));
        +    let scheduler = components::sched::mlfq::MLFQComponent::new(mux_alarm, &*addr_of!(PROCESSES))
        +        .finalize(components::mlfq_component_static!(nrf52840::rtc::Rtc<'static>, NUM_PROCS));
         
             let platform = Platform {
                 button,

@lschuermann
Copy link
Member Author

lschuermann commented Dec 24, 2024

Imix

Tested on Treadmill, without physical access to GPIOs / LEDs / Buttons.

  • Tests run on most Boards

    • examples/sensors
    • examples/c_hello and examples/tests/printf_long
    • examples/tests/console_recv_short and examples/tests/console_recv_long
      • Fails (console_recv_short doesn't print anything) when run simultaneously (expected: console not virtualized)
    • examples/blink (no GPIO access)
    • examples/rot_client and examples/rot_service
    • examples/blink and examples/c_hello and examples/buttons (no GPIO access)
    • examples/lua-hello
    • examples/tests/console_timeout
    • examples/tests/malloc_test01
    • examples/tests/stack_size_test01
    • examples/tests/stack_size_test02
    • examples/tests/mpu_stack_growth
    • examples/tests/mpu_walk_region
    • examples/tests/multi_alarm_test (no GPIO access)
    • examples/tests/adc (no GPIO access)
    • examples/tests/adc_continuous (no GPIO access)
    • examples/tutorials/05_ipc/led and examples/tutorials/05_ipc/rng and examples/tutorials/05_ipc/logic (no GPIO access)
  • Imix-specific

    • examples/services/ble-env-sense and examples/services/ble-env-sense/test-with-sensors
      (Runs without errors, have not validated BLE advertisements)
    • examples/tests/imix
      (works partially on some board revs, userspace alarm logic violates an assertion)
    • examples/ble-uart
      (Runs without errors, have not validated whether transfers work)
    • examples/ip_sense: Application that samples a sensor and puts it in a UDP broadcast segment
    • examples/tests/udp/udp_send: sends a UDP datagram to a destination port:
    • examples/tests/udp_receive: receives datagrams on a port an blinks when received: pair with
      udp_send
      • Does not work:
        Opening socket on 1011:1213:1415:1617:1819:1a1b:1c1d:1e1f : 16123, and binding to that socket.
        No 15.4 driver present, set mac address manually in kernel.
        Succesfully bound to socket, listening for UDP packets
        
        tock$ Socket closed.
        
    • In-Kernel Tests
      • boards/imix/src/test/aes_ccm_test.rs
      • boards/imix/src/test/aes_test.rs
      • boards/imix/src/test/icmp_lowpan_test.rs
        (runs without error, have not validated 6LoWPAN packet being received)
      • boards/imix/src/test/linear_log_test.rs
        Does not fit into flash: rust-lld: error: Text plus relocations plus attributes exceeds the available ROM space.
      • boards/imix/src/test/log_test.rs
        Does not fit into flash: rust-lld: error: Text plus relocations plus attributes exceeds the available ROM space.
      • boards/imix/src/test/rng_test.rs
      • boards/imix/src/test/udp_lowpan_test.rs
        Does not fit into flash: rust-lld: error: Text plus relocations plus attributes exceeds the available ROM space.
        • start()
        • start_rx()
        • start_with_app()
        • start_dual_rx()
      • boards/imix/src/test/virtual_uart_rx_test.rs
      • boards/imix/src/test/multi_alarm_test.rs
  • Miscellaneous

    • Scheduler Tests
      • whileone + blink (no GPIO access)
      • restart whileone using process console
      • stop and start whileone
      • whileone + blink + hello_loop using MLFQ scheduler (no GPIO access)

@lschuermann
Copy link
Member Author

Update: it seems like there are issues with the 15.4 subsystems or tests on the nRF52840DK (and potentially Imix). To quote @tyler-potyondy:

The nRFs makes sense it isn’t working since UDP is sending through the standard 15.4 driver (which is currently not working).

@tock/core-wg Should we try and address these concerns before the release? The nRF52840DKs were just successfully used as part of the OpenThread tutorial, hence there is a good level of confidence that this part works. I don't have a good idea of how invasive the required changes to the remaining 15.4-related userspace and kernel subsystems are.

@alistair23
Copy link
Contributor

The Apollo3 boards are currently heavily tested, I think they should be ticked off under Test Boards. I'm not going to have a chance to run the example tests, but I'm testing a range of components at the moment, so I know applications, SPI, I2C, LED, alarms, GPIOs and flash all work

@lschuermann
Copy link
Member Author

@alistair23 This is great news! Can you maybe try and add a test comment with the subsystems that you know are working? I don't own one of those boards, and it'd be great to have a comment with slightly more information than "heavily tested" to point to, but in any case I'm happy to add this to the above!

@lschuermann
Copy link
Member Author

lschuermann commented Jan 3, 2025

LiteX Sim / Arty

This combines the test results from the LiteX Sim and Arty platforms, which use gatewares generated from the same LiteX revision (and hence should be representative of each other).

  • Tests run on most Boards

    • examples/sensors
    • examples/c_hello and examples/tests/printf_long
    • examples/tests/console_recv_short and examples/tests/console_recv_long
      • Fails (console_recv_short doesn't print anything) when run simultaneously (expected: console not virtualized)
    • examples/blink (no GPIO access to the Arty, but GPIO is tested in CI)
    • examples/rot_client and examples/rot_service
    • examples/blink and examples/c_hello and examples/buttons (no GPIO access to the Arty, but GPIO is tested in CI)
    • examples/lua-hello faults on RISC-V, known issue
    • examples/tests/console_timeout
    • examples/tests/malloc_test01
    • examples/tests/stack_size_test01
    • examples/tests/stack_size_test02
    • examples/tests/mpu_stack_growth
    • examples/tests/mpu_walk_region
    • examples/tests/multi_alarm_test (can't observe LEDs, but runs)
    • examples/tests/adc: No ADC driver!
    • examples/tests/adc_continuous: No ADC driver!
    • examples/tutorials/05_ipc/led and examples/tutorials/05_ipc/rng and examples/tutorials/05_ipc/logic
      Can't observe blink pattern, but all apps run and can discover each other, and the number of LEDs present.
  • Miscellaneous

@tyler-potyondy
Copy link
Contributor

On the nrf52840, the following 802.15.4 tests are now passing (with #4291):

  • examples/tests/ieee802154/radio_tx
  • examples/tests/ieee802154/radio_rx
  • examples/tests/ieee802154/radio_tx_raw

Additionally, OpenThread functionality (Tock MTD attaching to an OpenThread router) has been tested:

  • examples/openthread/openthread_hello

UDP transmit functionality is currently broken with a bug / inconsistency between the kernel and libtock-c implementation. When executing the transmit syscall, the libtock-c application fails to provide the src address and fails the error check that occurs for the transmit syscall.

@alistair23
Copy link
Contributor

@alistair23 This is great news! Can you maybe try and add a test comment with the subsystems that you know are working? I don't own one of those boards, and it'd be great to have a comment with slightly more information than "heavily tested" to point to, but in any case I'm happy to add this to the above!

UART, LoRa, SPI, I2C, LED, alarms/timers, GPIOs, sensors, flash, K/V store, applications, large applications, application signature checking, asynchronous process loader and low power modes all work

@lschuermann
Copy link
Member Author

UDP transmit functionality is currently broken with a bug / inconsistency between the kernel and libtock-c implementation. When executing the transmit syscall, the libtock-c application fails to provide the src address and fails the error check that occurs for the transmit syscall.

@tyler-potyondy Thanks! I added this to the release notes in #4280.

@lschuermann
Copy link
Member Author

We landed Tock 2.2! https://github.com/tock/tock/releases/tag/release-2.2 🎉

@alevy alevy closed this as completed Jan 6, 2025
@lschuermann lschuermann unpinned this issue Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker Issue or PR that must be resolved before the next release
Projects
None yet
Development

No branches or pull requests

4 participants