[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/4] Harmonise test execution reporting across protocols
From: |
Maciej W. Rozycki |
Subject: |
[PATCH 4/4] Harmonise test execution reporting across protocols |
Date: |
Tue, 12 Dec 2023 13:10:03 +0000 (GMT) |
User-agent: |
Alpine 2.20 (DEB 67 2015-01-07) |
Report both the full command and the timeout value consistently across
various communication protocols, and always always output the report to
the log file, so that procedures do not have to be locally overridden to
extract this data where needed to reproduce an issue by hand.
* baseboards/qemu.exp (qemu_load): Add execution reporting.
* config/gdb-comm.exp (gdb_comm_load): Likewise.
* config/gdb_stub.exp (gdb_stub_load): Likewise.
* config/sim.exp (sim_load): Likewise.
* config/unix.exp (unix_load): Report full command in addition
to timeout value.
---
baseboards/qemu.exp | 2 ++
config/gdb-comm.exp | 2 ++
config/gdb_stub.exp | 2 ++
config/sim.exp | 2 ++
config/unix.exp | 3 ++-
5 files changed, 10 insertions(+), 1 deletion(-)
dejagnu-exec-report.diff
Index: dejagnu/baseboards/qemu.exp
===================================================================
--- dejagnu.orig/baseboards/qemu.exp
+++ dejagnu/baseboards/qemu.exp
@@ -206,6 +206,8 @@ proc qemu_load { dest prog args } {
set wait_timeout $test_timeout
}
+ verbose -log "Executing on $dest: $prog (timeout = $wait_timeout)" 2
+
set ret [local_exec "$qemu $prog" "" "" $wait_timeout]
if { [array size ret] == 0 } {
Index: dejagnu/config/gdb-comm.exp
===================================================================
--- dejagnu.orig/config/gdb-comm.exp
+++ dejagnu/config/gdb-comm.exp
@@ -275,6 +275,8 @@ proc gdb_comm_load { dest prog args } {
set testcase_timeout 300
}
+ verbose -log "Executing on $dest: $prog (timeout = $testcase_timeout)" 2
+
if { [isremote host] || ![board_info host exists fileid] } {
gdb_comm_start $dest
}
Index: dejagnu/config/gdb_stub.exp
===================================================================
--- dejagnu.orig/config/gdb_stub.exp
+++ dejagnu/config/gdb_stub.exp
@@ -486,6 +486,8 @@ proc gdb_stub_load { dest prog args } {
set wait_timeout $test_timeout
}
+ verbose -log "Executing on $dest: $prog (timeout = $wait_timeout)" 2
+
set result [remote_spawn $dest $prog]
if { $result < 0 } {
Index: dejagnu/config/sim.exp
===================================================================
--- dejagnu.orig/config/sim.exp
+++ dejagnu/config/sim.exp
@@ -93,6 +93,8 @@ proc sim_load { dest prog args } {
set cmd $prog
}
+ verbose -log "Executing on $dest: $prog (timeout = $sim_time_limit)" 2
+
# Run the program with a limited amount of real time. While
# this isn't as nice as limiting the amount of CPU time, it
# will have to do.
Index: dejagnu/config/unix.exp
===================================================================
--- dejagnu.orig/config/unix.exp
+++ dejagnu/config/unix.exp
@@ -77,13 +77,14 @@ proc unix_load { dest prog args } {
setenv LD_LIBRARY_PATH $ld_library_path:$orig_ld_library_path
setenv SHLIB_PATH $ld_library_path:$orig_ld_library_path
verbose -log "Setting LD_LIBRARY_PATH to
$ld_library_path:$orig_ld_library_path" 2
- verbose -log "Execution timeout is: $wait_timeout" 2
# Prepend shell name (e.g., qemu emulator) to the command.
if {[board_info $dest exists exec_shell]} {
set command "[board_info $dest exec_shell] $command"
}
+ verbose -log "Executing on $dest: $command (timeout = $wait_timeout)" 2
+
set id [remote_spawn $dest $command "readonly"]
if { $id < 0 } {
set output "remote_spawn failed"