diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-05-21 21:21:26 +0200 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-05-21 21:21:26 +0200 |
| commit | 4b927bc37359dec23f67d3427fc982945f24f404 (patch) | |
| tree | 245449ef9146942dc7fffd0235b48b7e70a00bf2 /gitlab/issues/target_riscv/host_missing/accel_missing/2269.toml | |
| parent | aa8bd79cec7bf6790ddb01d156c2ef2201abbaab (diff) | |
| download | qemu-analysis-4b927bc37359dec23f67d3427fc982945f24f404.tar.gz qemu-analysis-4b927bc37359dec23f67d3427fc982945f24f404.zip | |
add gitlab issues in toml format
Diffstat (limited to 'gitlab/issues/target_riscv/host_missing/accel_missing/2269.toml')
| -rw-r--r-- | gitlab/issues/target_riscv/host_missing/accel_missing/2269.toml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gitlab/issues/target_riscv/host_missing/accel_missing/2269.toml b/gitlab/issues/target_riscv/host_missing/accel_missing/2269.toml new file mode 100644 index 000000000..e63146ab2 --- /dev/null +++ b/gitlab/issues/target_riscv/host_missing/accel_missing/2269.toml @@ -0,0 +1,49 @@ +id = 2269 +title = "RISC-V exit via sifive_test does not work in scripts with -serial stdio" +state = "closed" +created_at = "2024-04-06T09:20:17.514Z" +closed_at = "2024-05-15T02:57:20.518Z" +labels = ["target: riscv"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/2269" +host-os = "Ubuntu 22.04" +host-arch = "aarch64" +qemu-version = "8.2.92" +guest-os = "bare metal" +guest-arch = "riscv64" +description = """""" +reproduce = """1. Create assembly file `hello.s`: +```as +.section .text +.globl _start +_start: csrr t0, mhartid + bnez t0, _start + li t0, 0x100000 + li t1, 0x5555 + sw t1, 0(t0) +halt: j halt +``` +2. Create linker script `link.ld`: +```ld +OUTPUT_ARCH( "riscv" ) +ENTRY(_start) +SECTIONS +{ + . = 0x80000000; +} +``` +3. Create runner script `./run.sh` (don't forget to `chmod +x`) +```sh +#!/usr/bin/env bash +timeout 10 qemu-system-riscv64 -M virt -display none -serial stdio -bios none -kernel hello +``` +4. Compile into executable: +```sh +riscv64-unknown-elf-gcc -c -mcmodel=medany -fvisibility=hidden -nostartfiles -march=rv64g -mabi=lp64 -o hello.o hello.s +riscv64-unknown-elf-ld hello.o -nostdlib -T link.ld -o hello +``` +5. Dot-source the script - it will immediately exit cleanly +6. Execute the script - it will timeout with exit code 124 +7. Execute the script with redirected stdin, e.g. `./run.sh < ./run.sh` or `echo | ./run.sh` - it will immediately exit cleanly""" +additional = """This issue happens only with `-serial stdio`. Using `chardev:file` or `chardev:null` does not reproduce the issue. Process substitution like `<(echo 'test')` does not seem to work. `cat | ./run.sh` will wait until any line is send, then exit cleanly. This is mainly an issue when using helper test scripts which want to interact with user, as proper CI/UT would redirect serial anyways. + +I have noticed similar behavior with other RISC-V UART device - when running from scripts, there is no output, as if QEMU was waiting for something, even if there is only UART TX, not RX. It does not matter if I actually type in anything or not.""" |