Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cpython-unix/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
# Compression packages are needed to extract archives.
#
# Various other build tools are needed for various building.
# Note linux-headers is installed to source a missing UAPI header, see below
RUN ulimit -n 10000 && apt-get install \
bzip2 \
ca-certificates \
curl \
file \
libc6-dev \
linux-headers-3.16.0-6-common \
libffi-dev \
make \
patch \
Expand All @@ -23,3 +25,8 @@ RUN ulimit -n 10000 && apt-get install \
unzip \
zip \
zlib1g-dev

# Debian Jessie's linux-libc-dev is missing the vm_sockets header due to a typo
# see https://lists.openwall.net/netdev/2014/12/01/2
RUN install -m 0644 /usr/src/linux-headers-3.16.0-6-common/include/uapi/linux/vm_sockets.h \
/usr/include/linux/vm_sockets.h
12 changes: 12 additions & 0 deletions pythonbuild/disttests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,18 @@ def assertPythonWorks(path: Path, argv0: Optional[str] = None):
with self.subTest(msg="weird argv[0]"):
assertPythonWorks(sys.executable, argv0="/dev/null")

@unittest.skipUnless(sys.platform == "linux", "Linux-specific socket constant")
# TODO(jjh) remove when musl builds use a sysroot
@unittest.skipIf(
os.environ["TARGET_TRIPLE"].endswith("-musl"),
"kernel headers not available in musl",
)
def test_socket_af_vsock(self):
import socket

self.assertTrue(hasattr(socket, "AF_VSOCK"))
self.assertEqual(socket.AF_VSOCK, 40)

@unittest.skipUnless(sys.platform == "linux", "Linux-specific prctl")
@unittest.skipIf(
"static" in os.environ["BUILD_OPTIONS"],
Expand Down
Loading