summaryrefslogtreecommitdiff
path: root/net/test/leak_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'net/test/leak_test.py')
-rwxr-xr-xnet/test/leak_test.py10
1 files changed, 5 insertions, 5 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)