summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2019-03-23 14:32:54 -0700
committerMaciej Żenczykowski <maze@google.com>2019-03-24 00:11:22 -0700
commitfab9a471469df57b89ab3040e8803345fd42e589 (patch)
tree46e04db69c291ff2641384ae036feb09577df0a9
parent789dcf76b65405714d3b6e306d75edf59348ad6d (diff)
downloadtests-fab9a471469df57b89ab3040e8803345fd42e589.tar.gz
net-test: allow bpf on 32-bit userspace with 64-bit kernel
This resolves: Running /host/all_tests.py Traceback (most recent call last): File "/host/all_tests.py", line 51, in <module> import_module(name) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/host/bpf_test.py", line 26, in <module> from bpf import * # pylint: disable=wildcard-import File "/host/bpf.py", line 41, in <module> }[os.uname()[4] + "-" + platform.architecture()[0]] KeyError: 'x86_64-32bit' Bug: 126465735 Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I64f246a4fd34c8a84e9c349957060d7d1be18175
-rwxr-xr-xnet/test/bpf.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/test/bpf.py b/net/test/bpf.py
index 43502bd..5062e31 100755
--- a/net/test/bpf.py
+++ b/net/test/bpf.py
@@ -31,12 +31,14 @@ import platform
# are not running with COMPAT_UTS_MACHINE and must be 64-bit at all times.
# TODO: is there a better way of doing this?
__NR_bpf = {
+ "aarch64-32bit": 386,
"aarch64-64bit": 280,
"armv7l-32bit": 386,
"armv8l-32bit": 386,
"armv8l-64bit": 280,
"i686-32bit": 357,
"i686-64bit": 321,
+ "x86_64-32bit": 357,
"x86_64-64bit": 321,
}[os.uname()[4] + "-" + platform.architecture()[0]]