From 02f0f6ec00e2bdaa3e61bd3a1e7556b9f3c7658a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 7 Nov 2026 16:10:19 +0530 Subject: [PATCH] Only test abstract UNIX sockets on Linux Abstract sockets are a Linux-only feature, binding to one on macOS fails with ENOENT. --- kitty_tests/remote_control.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kitty_tests/remote_control.py b/kitty_tests/remote_control.py index ac79be576..980f33763 100644 --- a/kitty_tests/remote_control.py +++ b/kitty_tests/remote_control.py @@ -4,6 +4,7 @@ import json import os import subprocess +import sys import tempfile from types import MethodType from typing import Any, cast @@ -75,11 +76,13 @@ class TestRemoteControl(BaseTest): with self.assertRaisesRegex(OSError, 'not a socket'): listen(f'unix:{fpath}') self.assertTrue(os.path.exists(fpath)) - # Abstract sockets have no file and are unaffected - name = f'@kitty-test-listen-{os.getpid()}' - listen(f'unix:{name}') - with self.assertRaises(OSError): + if sys.platform.startswith('linux'): + # Abstract sockets have no file and are unaffected. They + # are only supported on Linux. + name = f'@kitty-test-listen-{os.getpid()}' listen(f'unix:{name}') + with self.assertRaises(OSError): + listen(f'unix:{name}') finally: for close in closers: close()