Skip to content

xtensa-host.sh: log the full command including the timeout prefix - #44

Merged
lgirdwood merged 1 commit into
thesofproject:sof-v4.2from
marc-hb:log-qemu-timeout
Jun 29, 2020
Merged

lgirdwood merged 1 commit into
thesofproject:sof-v4.2from
marc-hb:log-qemu-timeout

Conversation

@marc-hb

@marc-hb marc-hb commented Jun 27, 2020

Copy link
Copy Markdown

Replace the custom and incomplete command logging with a simpler set -x.

../sof/qemu-check.sh and maybe others invoke this script with a non-zero
${TIMEOUT} to stop qemu. This prints the following line every time; even
in successful cases which can be confusing
qemu-system-xtensa: terminating on signal 15 from pid 9823 (timeout)

Logging the timeout prefix reduces this confusion

Signed-off-by: Marc Herbert [email protected]

Replace the custom and incomplete command logging with a simpler set -x.

../sof/qemu-check.sh and maybe others invoke this script with a non-zero
${TIMEOUT} to stop qemu. This prints the following line every time; even
in successful cases which can be confused
  qemu-system-xtensa: terminating on signal 15 from pid 9823 (timeout)

Logging the timeout prefix reduces this confusion

Signed-off-by: Marc Herbert <[email protected]>
@crazoes

crazoes commented Jun 27, 2020

Copy link
Copy Markdown

looks good 👍

@crazoes

crazoes commented Jun 27, 2020

Copy link
Copy Markdown

../sof/qemu-check.sh and maybe others invoke this script with a non-zero
${TIMEOUT} to stop qemu. This prints the following line every time; even
in successful cases which can be confusing
qemu-system-xtensa: terminating on signal 15 from pid 9823 (timeout)

Why'd timeout send TERM if it didn't actually timeout though? This message gets printed by qemu after receiving a shutdown request. And TERM is sent on timeout..?

@marc-hb

marc-hb commented Jun 27, 2020

Copy link
Copy Markdown
Author

It's possible to tell qemu to quit but it requires much more code than simply asking timeout to send TERM to qemu.

@crazoes

crazoes commented Jun 27, 2020

Copy link
Copy Markdown

This prints the following line every time; even
in successful cases which can be confusing
qemu-system-xtensa: terminating on signal 15 from pid 9823 (timeout)

I don't understand how this(printing timeout even in successful cases) happens? timeout cannot send a SIGTERM without the timeout happening and qemu prints qemu-system-xtensa: terminating on signal 15 from pid 9823 (timeout) on receiving SIGTERM before quitting.

@marc-hb

marc-hb commented Jun 27, 2020

Copy link
Copy Markdown
Author

This script is not a test. The test is not here, it's in qemu-check.sh. See thesofproject/sof#3101

When invoked by qemu-check.sh, this script runs qemu for 2 seconds and kills it after 2 seconds. That's all it does and it always prints the timeout message. Then, later, qemu-check.sh decides whether the test has been successful or not.

@lgirdwood
lgirdwood merged commit d1234bc into thesofproject:sof-v4.2 Jun 29, 2020
@marc-hb
marc-hb deleted the log-qemu-timeout branch June 29, 2020 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants