summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-05-27 02:13:49 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-05-27 02:13:49 +0000
commit95682a4f2f6eabc681e977f004e6eae7b12df33c (patch)
tree30f3ff195a4173492f7fdf1824f015c3e6a30736
parent6ca152d937992dd0a014a1556ebd5fb9e82e48aa (diff)
parent43d6295075055bb0630966fde7a5a7856cc546f4 (diff)
downloadtests-95682a4f2f6eabc681e977f004e6eae7b12df33c.tar.gz
Snap for 6529435 from 43d6295075055bb0630966fde7a5a7856cc546f4 to rvc-d1-release
Change-Id: I1addd78dd57d425718f56379158f221228e37717
-rw-r--r--net/test/namespace.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/test/namespace.py b/net/test/namespace.py
index 1144892..986fb59 100644
--- a/net/test/namespace.py
+++ b/net/test/namespace.py
@@ -94,7 +94,7 @@ def SetFileContents(f, s):
open(f, 'w').write(s)
-def SetHostName(s):
+def SetHostname(s):
ret = libc.sethostname(s, len(s))
if ret < 0:
errno = ctypes.get_errno()
@@ -132,10 +132,11 @@ def IfPossibleEnterNewNetworkNamespace():
try:
# DumpMounts('Before:')
+ Mount('none', '/', None, MS_REC|MS_PRIVATE)
ReMountProc()
ReMountSys()
# DumpMounts('After:')
- SetHostName('netns')
+ SetHostname('netns')
SetFileContents('/proc/sys/net/ipv4/ping_group_range', '0 2147483647')
net_test.SetInterfaceUp('lo')
except: