diff options
author | Maciej Żenczykowski <maze@google.com> | 2021-10-11 11:16:34 -0700 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2021-10-11 19:40:47 +0000 |
commit | 7c95cc3ed23573fc5c055e3cf7f43616b14e197f (patch) | |
tree | d7a0a8c02456624610523e11dcbcc404f92c32df | |
parent | f5214e3f1a0a05e728cdbafebe522f329ad00325 (diff) | |
download | tests-7c95cc3ed23573fc5c055e3cf7f43616b14e197f.tar.gz |
net-test: after UML finishes, reenable tty option 'NL' means 'CR+NL'
----- before:
reboot: System halted
/aosp-tests/net/test/run_net_test.sh: line 456: 364628 Killed $KERNEL_BINARY umid=net_test mem=512M $blockdevice=$
ROOTFS $netconfig $consolemode ssl3=null,fd:3 $cmdline 1>&2 3> "${SSL3}"
Warning: UML exited with 137 instead of zero.
Info: retrieve
d exit code 0.
Returning exit code 0.
athina:/git/AND419R ((e3f7d169e39f...))$
----- after:
reboot: System halted
/aosp-tests/net/test/run_net_test.sh: line 461: 388686 Killed $KERNEL_BINARY umid=net_test mem=512M $blockdevice=$
ROOTFS $netconfig $consolemode ssl3=null,fd:3 $cmdline 1>&2 3> "${SSL3}"
Warning: UML exited with 137 instead of zero.
Info: retrieved exit code 0.
Returning exit code 0.
athina:/git/AND419R ((e3f7d169e39f...))$
Test: ran uml net test against Android Common Kernel android-4.19-stable
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifaf13b8a426875181396134bf09dcbeef18b32c5
-rwxr-xr-x | net/test/run_net_test.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/test/run_net_test.sh b/net/test/run_net_test.sh index 06e0331..9dca4fe 100755 --- a/net/test/run_net_test.sh +++ b/net/test/run_net_test.sh @@ -347,6 +347,11 @@ if [ "$ARCH" == "um" ]; then $blockdevice=$ROOTFS $netconfig $consolemode ssl3=null,fd:3 $cmdline \ || exitcode=$? + # Return to beginning of line (via carriage return) after the above newline moved us down. + echo -en '\r' + # re-enable: 'postprocess output' and 'translate newline to carriage return-newline' + stty opost onlcr || : + if [[ "${exitcode}" == 134 && -s "${SSL3}" && "$(tr -d '\r' < "${SSL3}")" == 0 ]]; then # Sometimes the tests all pass, but UML crashes during the shutdown process itself. # As such we can't actually rely on the /proc/exitcode returned value. |