roll: fixes needed to roll pigweed forward The Pigweed update (rolling to pigweed@084a8865ef4d9219b558d1945b8dbc0010a95ba2) introduced a schema change in the pw_kernel system configuration files ( system.json5 ): 1. The threads field was removed from the ProcessConfig schema. 2. Threads must now be defined as objects of type: "thread" inside the objects list of a process. 3. Additionally, the upstream test_interrupt_listener test now expects a wait group named interrupt_wait_group to be present in the configuration. Signed-off-by: Chris Frantz <cfrantz@google.com>
diff --git a/target/ast10x0/tests/interrupts/user/system.json5 b/target/ast10x0/tests/interrupts/user/system.json5 index 357a115..17047ef 100644 --- a/target/ast10x0/tests/interrupts/user/system.json5 +++ b/target/ast10x0/tests/interrupts/user/system.json5
@@ -40,13 +40,12 @@ name: "ipc", type: "channel_handler", }, - ], - threads: [ { + type: "thread", name: "interrupt_thread", kernel_stack_size_bytes: 2048, - }, - ], + },], + }, ], constants: [ @@ -81,13 +80,16 @@ handler_process: "interrupt_process", handler_object_name: "ipc", }, - ], - threads: [ { + name: "interrupt_wait_group", + type: "wait_group", + }, + { + type: "thread", name: "interrupt_thread", kernel_stack_size_bytes: 2048, - }, - ], + },], + }, ], },
diff --git a/target/ast10x0/tests/ipc/user/system.json5 b/target/ast10x0/tests/ipc/user/system.json5 index 7591242..c0a8cf1 100644 --- a/target/ast10x0/tests/ipc/user/system.json5 +++ b/target/ast10x0/tests/ipc/user/system.json5
@@ -43,13 +43,12 @@ handler_process: "handler", handler_object_name: "ipc", }, - ], - threads: [ { + type: "thread", name: "initiator_thread", kernel_stack_size_bytes: 2048, - }, - ], + },], + }, { name: "handler", @@ -59,13 +58,12 @@ name: "ipc", type: "channel_handler", }, - ], - threads: [ { + type: "thread", name: "handler_thread", kernel_stack_size_bytes: 2048, - }, - ], + },], + }, ], },
diff --git a/target/ast10x0/tests/mctp/ipc_client/system.json5 b/target/ast10x0/tests/mctp/ipc_client/system.json5 index 331e17d..e6fe919 100644 --- a/target/ast10x0/tests/mctp/ipc_client/system.json5 +++ b/target/ast10x0/tests/mctp/ipc_client/system.json5
@@ -43,13 +43,12 @@ name: "mctp", type: "channel_handler", }, - ], - threads: [ { + type: "thread", name: "fake_server_thread", kernel_stack_size_bytes: 4096, - }, - ], + },], + }, ], }, @@ -67,13 +66,12 @@ handler_process: "fake_server_process", handler_object_name: "mctp", }, - ], - threads: [ { + type: "thread", name: "client_test_thread", kernel_stack_size_bytes: 4096, - }, - ], + },], + }, ], },
diff --git a/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/system.json5 b/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/system.json5 index 1709b7f..38fc8f7 100644 --- a/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/system.json5 +++ b/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/system.json5
@@ -39,7 +39,11 @@ type: "interrupt", irqs: [{ name: "i2c2", number: 112 }], }, - ], + { + type: "thread", + name: "i2c_server_thread", + kernel_stack_size_bytes: 4096, + },], memory_mappings: [ { name: "i2c_regs", @@ -48,12 +52,7 @@ size_bytes: 0x4000, }, ], - threads: [ - { - name: "i2c_server_thread", - kernel_stack_size_bytes: 4096, - }, - ], + }, ], }, @@ -72,13 +71,12 @@ handler_process: "i2c_server_process", handler_object_name: "i2c", }, - ], - threads: [ { + type: "thread", name: "i2c_slave_rx_thread", kernel_stack_size_bytes: 2048, - }, - ], + },], + }, ], },
diff --git a/target/ast10x0/tests/spdm/responder/system.json5 b/target/ast10x0/tests/spdm/responder/system.json5 index 3314a1c..49ade0e 100644 --- a/target/ast10x0/tests/spdm/responder/system.json5 +++ b/target/ast10x0/tests/spdm/responder/system.json5
@@ -43,13 +43,12 @@ name: "mctp", type: "channel_handler", }, - ], - threads: [ { + type: "thread", name: "mctp_server_thread", kernel_stack_size_bytes: 4096, - }, - ], + },], + }, ], }, @@ -67,13 +66,12 @@ handler_process: "mctp_server_process", handler_object_name: "mctp", }, - ], - threads: [ { + type: "thread", name: "spdm_responder_thread", kernel_stack_size_bytes: 4096, - }, - ], + },], + }, ], },
diff --git a/target/ast10x0/tests/stress/ipc/user/system.json5 b/target/ast10x0/tests/stress/ipc/user/system.json5 index 1349b8e..5c62609 100644 --- a/target/ast10x0/tests/stress/ipc/user/system.json5 +++ b/target/ast10x0/tests/stress/ipc/user/system.json5
@@ -39,13 +39,12 @@ handler_process: "handler_process", handler_object_name: "ipc", }, - ], - threads: [ { + type: "thread", name: "initiator_thread", kernel_stack_size_bytes: 2048, - }, - ], + },], + }, ], }, @@ -61,13 +60,12 @@ name: "ipc", type: "channel_handler", }, - ], - threads: [ { + type: "thread", name: "handler_thread", kernel_stack_size_bytes: 2048, - }, - ], + },], + }, ], },
diff --git a/target/ast10x0/tests/stress/process_termination/user/system.json5 b/target/ast10x0/tests/stress/process_termination/user/system.json5 index c3485f6..843d8e0 100644 --- a/target/ast10x0/tests/stress/process_termination/user/system.json5 +++ b/target/ast10x0/tests/stress/process_termination/user/system.json5
@@ -42,13 +42,12 @@ type: "process", linked_process: "extra", }, - ], - threads: [ { + type: "thread", name: "main_thread", kernel_stack_size_bytes: 2048, - }, - ], + },], + }, ], }, @@ -60,8 +59,9 @@ // Name must match #[process_entry("extra")] in forced_exit.rs. name: "extra", ram_size_bytes: 65536, // 64KB - threads: [ + objects: [ { + type: "thread", name: "extra_thread", kernel_stack_size_bytes: 2048, },
diff --git a/target/ast10x0/tests/usart/system.json5 b/target/ast10x0/tests/usart/system.json5 index ad2bca7..d0c7ab0 100644 --- a/target/ast10x0/tests/usart/system.json5 +++ b/target/ast10x0/tests/usart/system.json5
@@ -57,7 +57,11 @@ }, ], }, - ], + { + type: "thread", + name: "usart_server_thread", + kernel_stack_size_bytes: 4096, // 4KB stack + },], memory_mappings: [ { // AST1060 UART5 (debug UART, 16550-compatible) @@ -67,12 +71,7 @@ size_bytes: 0x1000, }, ], - threads: [ - { - name: "usart_server_thread", - kernel_stack_size_bytes: 4096, // 4KB stack - }, - ], + }, ], }, @@ -90,13 +89,12 @@ handler_process: "usart_server_process", handler_object_name: "usart", }, - ], - threads: [ { + type: "thread", name: "usart_client_thread", kernel_stack_size_bytes: 2048, - }, - ], + },], + }, ], }, @@ -114,13 +112,12 @@ handler_process: "usart_server_process", handler_object_name: "usart2", }, - ], - threads: [ { + type: "thread", name: "usart_client2_thread", kernel_stack_size_bytes: 2048, - }, - ], + },], + }, ], },
diff --git a/target/earlgrey/syscall_latency/system.json5 b/target/earlgrey/syscall_latency/system.json5 index 0aa99f9..b5eabb1 100644 --- a/target/earlgrey/syscall_latency/system.json5 +++ b/target/earlgrey/syscall_latency/system.json5
@@ -29,8 +29,9 @@ size_bytes: 0x200, }, ], - threads: [ - { + objects: [ + { + type: "thread", name: "syscall_latency", kernel_stack_size_bytes: 4096, },
diff --git a/target/earlgrey/tests/drivers/gpio/system.json5 b/target/earlgrey/tests/drivers/gpio/system.json5 index 0703730..43971e9 100644 --- a/target/earlgrey/tests/drivers/gpio/system.json5 +++ b/target/earlgrey/tests/drivers/gpio/system.json5
@@ -21,7 +21,11 @@ { name: "test_gpio", ram_size_bytes: 4096, - objects: [], + objects: [ { + type: "thread", + name: "main_thread", + kernel_stack_size_bytes: 2048, + },], memory_mappings: [ { name: "gpio", @@ -36,12 +40,7 @@ size_bytes: 0x1000, } ], - threads: [ - { - name: "main_thread", - kernel_stack_size_bytes: 2048, - }, - ], + }, ], },
diff --git a/target/earlgrey/tests/ipc/user/system.json5 b/target/earlgrey/tests/ipc/user/system.json5 index 1a4ed31..864b4a3 100644 --- a/target/earlgrey/tests/ipc/user/system.json5 +++ b/target/earlgrey/tests/ipc/user/system.json5
@@ -28,13 +28,12 @@ handler_process: "handler", handler_object_name: "ipc", }, - ], - threads: [ - { + { + type: "thread", name: "initiator_thread", kernel_stack_size_bytes: 1024, - }, - ], + },], + }, { name: "handler", @@ -44,13 +43,12 @@ name: "ipc", type: "channel_handler", }, - ], - threads: [ - { + { + type: "thread", name: "handler_thread", kernel_stack_size_bytes: 1024, - }, - ], + },], + }, ], },
diff --git a/target/earlgrey/tests/uart/system.json5 b/target/earlgrey/tests/uart/system.json5 index 88cd895..5fccacc 100644 --- a/target/earlgrey/tests/uart/system.json5 +++ b/target/earlgrey/tests/uart/system.json5
@@ -26,7 +26,11 @@ name: "ipc", type: "channel_handler", }, - ], + { + type: "thread", + name: "uart_thread", + kernel_stack_size_bytes: 2048, + },], memory_mappings: [ { name: "uart1", @@ -35,12 +39,7 @@ size_bytes: 0x40, } ], - threads: [ - { - name: "uart_thread", - kernel_stack_size_bytes: 2048, - }, - ], + }, ], }, @@ -100,7 +99,11 @@ handler_process: "test_uart", handler_object_name: "ipc", }, - ], + { + type: "thread", + name: "uart_thread", + kernel_stack_size_bytes: 2048, + },], memory_mappings: [ { name: "uart1", @@ -109,12 +112,7 @@ size_bytes: 0x40, } ], - threads: [ - { - name: "uart_thread", - kernel_stack_size_bytes: 2048, - }, - ], + }, ], },
diff --git a/target/veer/ipc/user/system.json5 b/target/veer/ipc/user/system.json5 index 9fd8b06..954c112 100644 --- a/target/veer/ipc/user/system.json5 +++ b/target/veer/ipc/user/system.json5
@@ -28,13 +28,12 @@ handler_process: "handler", handler_object_name: "ipc", }, - ], - threads: [ - { + { + type: "thread", name: "initiator_thread", kernel_stack_size_bytes: 1024, - }, - ], + },], + }, { name: "handler", @@ -44,13 +43,12 @@ name: "ipc", type: "channel_handler", }, - ], - threads: [ - { + { + type: "thread", name: "handler_thread", kernel_stack_size_bytes: 1024, - }, - ], + },], + }, ], },
diff --git a/target/veer/syscall_latency/system.json5 b/target/veer/syscall_latency/system.json5 index ea00dce..eb909dc 100644 --- a/target/veer/syscall_latency/system.json5 +++ b/target/veer/syscall_latency/system.json5
@@ -29,8 +29,9 @@ size_bytes: 0x100, }, ], - threads: [ - { + objects: [ + { + type: "thread", name: "syscall_latency", kernel_stack_size_bytes: 4096, },