diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-30 05:38:31 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-30 05:38:31 -0400 |
| commit | 4e4764e837309cc9730f288f544fd8c14ba90508 (patch) | |
| tree | e72c5cdaa01773ec2b84439c7e767c760c199ce1 /tools | |
| parent | 029f8ae522a2fd1f3e3d7c1458025713e005cb59 (diff) | |
| download | open-iov-4e4764e837309cc9730f288f544fd8c14ba90508.tar.gz open-iov-4e4764e837309cc9730f288f544fd8c14ba90508.zip | |
guest-diag: cdt CDT_WAIT park-at-end (live memory inspection); run_cycle CDT_WAIT passthrough
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/guest-diag/run_cycle.sh | 2 | ||||
| -rw-r--r-- | tools/test/cuda_drv_test.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tools/guest-diag/run_cycle.sh b/tools/guest-diag/run_cycle.sh index 0944dcb..3f5289a 100755 --- a/tools/guest-diag/run_cycle.sh +++ b/tools/guest-diag/run_cycle.sh @@ -59,7 +59,7 @@ sleep 2 echo "[*] launching cdt (HOLD=$HOLD, $TRACE)" if [ "$TRACE" = "strace" ]; then timeout 30 "$VMEXEC" exec \ - "rm -f /tmp/cdt.out /tmp/strace.log; echo '=== CDT RUN START (strace) ===' > /dev/ttyS0; CDT_HOLD=$HOLD nohup sh -c 'strace -f -tt -e trace=ioctl -o /tmp/strace.log /tmp/cdt 2>&1 | tee /tmp/cdt.out | stdbuf -oL tee /dev/ttyS0 >/dev/null' >/dev/null 2>&1 & echo STARTED" \ + "rm -f /tmp/cdt.out /tmp/strace.log; echo '=== CDT RUN START (strace) ===' > /dev/ttyS0; CDT_HOLD=$HOLD CDT_WAIT=${CDT_WAIT:-0} nohup sh -c 'strace -f -tt -e trace=ioctl -o /tmp/strace.log /tmp/cdt 2>&1 | tee /tmp/cdt.out | stdbuf -oL tee /dev/ttyS0 >/dev/null' >/dev/null 2>&1 & echo STARTED" \ >/dev/null 2>&1 elif [ "$TRACE" = "gdb" ]; then timeout 30 "$VMEXEC" exec "rm -f /tmp/cdt.out /tmp/bpwait.out; sync; echo CLEARED" >/dev/null 2>&1 diff --git a/tools/test/cuda_drv_test.c b/tools/test/cuda_drv_test.c index ba8c20c..9501cb3 100644 --- a/tools/test/cuda_drv_test.c +++ b/tools/test/cuda_drv_test.c @@ -135,5 +135,14 @@ int main(void) MARK("cuCtxDestroy"); CHECK(cuCtxDestroy(ctx)); printf("ALL OK\n"); + { + const char *wait = getenv("CDT_WAIT"); + if (wait && atoi(wait) > 0) { + printf("CDT_WAIT: parked %d s (buf=%p back=%p)\n", + atoi(wait), (void *)buf, (void *)back); + fflush(stdout); + sleep((unsigned)atoi(wait)); + } + } return 0; } |
