Skip to content

Commit f3c2e7e

Browse files
lgirdwoodCopilot
andcommitted
cleanup: batch review updates for pr thesofproject#10583
Apply changes from review. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Liam Girdwood <lgirdwood@gmail.com>
1 parent 70d6312 commit f3c2e7e

4 files changed

Lines changed: 21 additions & 27 deletions

File tree

app/src/main.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,17 @@ static int sof_app_main(void)
5959

6060
#if CONFIG_SOF_BOOT_TEST && defined(QEMU_BOOT_TESTS)
6161
/* cleanly exit qemu so CI can continue and check test results */
62-
static inline void qemu_xtensa_exit(int status) {
63-
register int syscall_id __asm__ ("a2") = 1; /* SYS_exit is 1 */
64-
register int exit_status __asm__ ("a3") = status;
62+
static inline void qemu_xtensa_exit(int status)
63+
{
64+
register int syscall_id __asm__ ("a2") = 1; /* SYS_exit is 1 */
65+
register int exit_status __asm__ ("a3") = status;
6566

66-
__asm__ __volatile__ (
67-
"simcall\n"
68-
:
69-
: "r" (syscall_id), "r" (exit_status)
70-
: "memory"
71-
);
67+
__asm__ __volatile__ (
68+
"simcall\n"
69+
:
70+
: "r" (syscall_id), "r" (exit_status)
71+
: "memory"
72+
);
7273
}
7374
#endif
7475

scripts/sof-crash-decode.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
# SPDX-License-Identifier: BSD-3-Clause
3-
# Copyright(c) 2024 Intel Corporation. All rights reserved.
3+
# Copyright(c) 2026 Intel Corporation. All rights reserved.
44
"""
55
decode_crash.py - Zephyr Xtensa Crash Dump Decoder
66
@@ -14,16 +14,16 @@
1414
1515
Usage Examples:
1616
# 1. Provide the ELF and read crash from stdin
17-
cat crash.txt | ./decode_crash.py --elf zephyr.elf
17+
cat crash.txt | ./sof-crash-decode.py --elf zephyr.elf
1818
1919
# 2. Automatically locate ELF/objdump from a Zephyr build directory, read crash from file
20-
./decode_crash.py --build-dir build-qemu_xtensa/ --dump crash.txt
20+
./sof-crash-decode.py --build-dir build-qemu_xtensa/ --dump crash.txt
2121
2222
# 3. Read directly from the system clipboard
23-
./decode_crash.py --build-dir build-qemu_xtensa/ --clipboard
23+
./sof-crash-decode.py --build-dir build-qemu_xtensa/ --clipboard
2424
2525
# 4. Pipe a live trace to the decoder
26-
tail -f log.txt | ./decode_crash.py --build-dir build_dir/
26+
tail -f log.txt | ./sof-crash-decode.py --build-dir build_dir/
2727
2828
"""
2929

scripts/sof-qemu-run.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
# SPDX-License-Identifier: BSD-3-Clause
3-
# Copyright(c) 2024 Intel Corporation. All rights reserved.
3+
# Copyright(c) 2026 Intel Corporation. All rights reserved.
44
"""
55
sof-qemu-run.py - Automated QEMU test runner and crash analyzer
66
@@ -16,7 +16,7 @@
1616
import subprocess
1717
import argparse
1818
import os
19-
import sys
19+
2020
import re
2121

2222
# ANSI Color Codes
@@ -95,7 +95,6 @@ def main():
9595

9696
# We will accumulate output to check for crashes
9797
full_output = ""
98-
last_output = ""
9998

10099
with open(args.log_file, "w") as log_file:
101100
try:

scripts/sof-qemu-run.sh

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# SPDX-License-Identifier: BSD-3-Clause
3-
# Copyright(c) 2024 Intel Corporation. All rights reserved.
3+
# Copyright(c) 2026 Intel Corporation. All rights reserved.
44

55
# Define the build directory from the first argument (or default)
66
BUILD_DIR="${1:-build}"
@@ -13,15 +13,9 @@ BUILD_DIR="${1:-build}"
1313
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1414
SOF_WORKSPACE="$(dirname "$(dirname "$SCRIPT_DIR")")"
1515

16-
# check if Zephyr environment is set up
17-
if [ ! -z "$SOF_WORKSPACE" ]; then
18-
VENV_DIR="$SOF_WORKSPACE/.venv"
19-
echo "Using SOF environment at $SOF_WORKSPACE"
20-
else
21-
# default to the local workspace
22-
VENV_DIR="${SOF_WORKSPACE}/.venv"
23-
echo "Using default SOF environment at $VENV_DIR"
24-
fi
16+
# Use the SOF workspace to locate the virtual environment
17+
VENV_DIR="$SOF_WORKSPACE/.venv"
18+
echo "Using SOF environment at $SOF_WORKSPACE"
2519

2620
# start the virtual environment
2721
source ${VENV_DIR}/bin/activate

0 commit comments

Comments
 (0)