summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2019-09-08 00:20:02 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-09-08 00:20:02 +0000
commit53bb87c5d0804b3f8175d8fcf7d6d3c35a88f9c1 (patch)
tree6b332ec9a12992bfc752b6351c56e363df670edf
parent25fbaa4d75cb64fdc37dd32328ecf4c337fc63ff (diff)
parent32699ef34e5e8a0c0891d8d9d3caabdd97c15424 (diff)
downloadtests-ndk-sysroot-r21.tar.gz
Merge changes I8eec04a6,I0e6646fb,I4d8c76e0ndk-sysroot-r21
* changes: net-test: change UML console detection net-test: shutdown after 1 second on panic net-test: fix leak_test.py on 5.1+
-rwxr-xr-xnet/test/leak_test.py10
-rwxr-xr-xnet/test/net_test.sh4
-rwxr-xr-xnet/test/run_net_test.sh2
3 files changed, 8 insertions, 8 deletions
diff --git a/net/test/leak_test.py b/net/test/leak_test.py
index 4659046..8a42611 100755
--- a/net/test/leak_test.py
+++ b/net/test/leak_test.py
@@ -65,13 +65,13 @@ class ForceSocketBufferOptionTest(net_test.NetworkTest):
s.setsockopt(SOL_SOCKET, force_option, val)
self.assertEquals(2 * val, s.getsockopt(SOL_SOCKET, option))
- # Check that the force option sets the minimum value instead of a negative
- # value on integer overflow. Because the kernel multiplies passed-in values
- # by 2, pick a value that becomes a small negative number if treated as
- # unsigned.
+ # Check that the force option sets at least the minimum value instead
+ # of a negative value on integer overflow. Because the kernel multiplies
+ # passed-in values by 2, pick a value that becomes a small negative number
+ # if treated as unsigned.
bogusval = 2 ** 31 - val
s.setsockopt(SOL_SOCKET, force_option, bogusval)
- self.assertEquals(minbuf, s.getsockopt(SOL_SOCKET, option))
+ self.assertLessEqual(minbuf, s.getsockopt(SOL_SOCKET, option))
def testRcvBufForce(self):
self.CheckForceSocketBufferOption(SO_RCVBUF, self.SO_RCVBUFFORCE)
diff --git a/net/test/net_test.sh b/net/test/net_test.sh
index 45fa8e4..9b9773e 100755
--- a/net/test/net_test.sh
+++ b/net/test/net_test.sh
@@ -32,8 +32,8 @@ if [[ "$(tty)" == '/dev/console' ]]; then
ARCH="${ARCH//_/-}"
# setsid + /dev/tty{,AMA,S}0 allows bash's job control to work, ie. Ctrl+C/Z
- if [[ -c '/dev/tty0' ]]; then
- # exists in UML, does not exist on graphics/vga/curses-less QEMU
+ if [[ -e '/proc/exitcode' ]]; then
+ # exists only in UML
CON='/dev/tty0'
hostname "uml-${ARCH}"
elif [[ -c '/dev/ttyAMA0' ]]; then
diff --git a/net/test/run_net_test.sh b/net/test/run_net_test.sh
index 4d46f3a..73383d8 100755
--- a/net/test/run_net_test.sh
+++ b/net/test/run_net_test.sh
@@ -277,7 +277,7 @@ if (( verbose == 1 )); then
cmdline="$cmdline verbose=1"
fi
-cmdline="$cmdline init=/sbin/net_test.sh"
+cmdline="$cmdline panic=1 init=/sbin/net_test.sh"
cmdline="$cmdline net_test_args=\"$test_args\" net_test_mode=$testmode"
if [ "$ARCH" == "um" ]; then