From patchwork Sat Oct 31 04:00:49 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 102589 Received: from mail-dy1-f177.google.com (mail-dy1-f177.google.com [74.125.82.177]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.766.1793419255346126379 for ; Fri, 30 Oct 2026 21:00:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=lzD4txh/; spf=pass (domain: gmail.com, ip: 74.125.82.177, mailfrom: raj.khem@gmail.com) Received: by mail-dy1-f177.google.com with SMTP id 5a478bee46e88-36a1947498bso936854eec.1 for ; Fri, 30 Oct 2026 21:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793419255; x=1794024055; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=xOnGgJz5g1zyw+Bw3pRRXBN336l6W37gp+RkHqk9kQw=; b=lzD4txh/sayghK7wWZY4GiYvzYxUwAvjmnnRJyQXMDvhx6DH1fwPYdB20eqRWwf/H6 ldPZ44HEqZi9PysSgUm7w7MsqHJTNguiUoUW9lyhG4Q0BSwBldnwO5QQhFtZWAE8sX33 HU3wWkI27mApwEEUNOB+2JzjqMJiwxFfOtPlLI8CNufHp2v4YZlIKhcJhbDaCWIcMXra U4ARERM7cAbsL5yRdSzyWDYO50ahMBNohQ66UnguxF+WbcvMTQMyld2kL0j7YQgFQYRP CmAWMDKrhnpqrBcHQOZRWfvRCrHa0O3BYDmMG03tgBCWWiUUsiF8/QBLPvXN+Jr7gd5s V8Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793419255; x=1794024055; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xOnGgJz5g1zyw+Bw3pRRXBN336l6W37gp+RkHqk9kQw=; b=xMFyZOFIaS5JW/K00ZGBu4amvjppnjVIOKAWtenAZaZSAdP6u4oyA6MLfLZhJ1OTHi 9Iq7siZqFPKWValcQOOeAxD2ENunkGSCXmvGNfx5gYEhYQC6vHdQ3fy1iXm5Lp6cRlpu 1McUnvwYfz6O9ZggeDzx3rqulFv+ni7GRBJAE+Gh+Gg2b5msZNeWysSr4tgjNGhRy06J obfXOaXuT+5fdeUdOmjBDfZnbGRms98ggJuD3w4Hb1oLOmO1D+Fjat0kk3hFfaQevFH3 oNlIqzu/nM00ORRUk+KGhIyqudTVrqAen04qgLkW4c2NAgEhzhERL/n0SCposyOpXZS4 EqIw== X-Gm-Message-State: AFq9FYLYdFG9UUXeDyATpqMJ+1wLygYhruYZCsFNlRYUqb7FMAWGSnkP GpCD7RaAO9lI0/8agu6rr7oqyRcCtbqBfXQQERiLrywm/JvWdYOimpLdNmJJYufG7F8= X-Gm-Gg: AYBFou3KaNxiDj+o06XbBtVyqn2nzlYeZjwlius2qwXexjm7PjIYc72LlGTKLFG0dJi zFdoGNK3sLclRCgY6pNo3D7xDnJUfZuyw2GQLFHBaJoOxffv4co/VInenJDdzMe/ibore42fhwU ARcGhB83pMz0u9PpyTTv2pFTx8cKHjw3eXFfO5W7xPuP5L0DPeRQdIKKo6jrsM9J2N5BapleEo6 2tW8GpRygS1L2Y59eZ6z1CfcdVdBJTaKc1RJfMB8t0BrU6mmVBjJxq1HRwDUfaHnWQKxYaZKR6X gxkk/YRNcOxeFAplGORg5ESstF6if3k3f3sCS9KCR2gacsBgb3d7TNCeubDlPazJk35c2nbeZZE oH83nOpbtduo6iRt4/qTCz2U4GR7DWQUrBXvJmIlY4AK00ATiQAn382iLnYP3FkzDNf/SXy6wqi x8pu0tyEYp2C3hio96qxqynbgsBYZ10LHyxVRzRRKFeGODbPrYKx5wvl+tHxF0NezMlZ7+wCUPx /v2cmBuOhj++yvf2r5SMMGETqU0JQnlHq0kBECTz7FlekHNOlKqhYrZTGvdhvlIhylFMdCzquMf qDrOlzepsGjEhUX6N+/2C8s/YK12GguPhnbvZsrJ6RbSE/uISwBLc2/wEFpaA15+EpZeUkoTHNx 5oriOveWMhIosVHcVj23auxLPvgm1mOfGAuJpxbSzdIotfC/VxT7WjQsQvI7s9AWbBtp9IgOQpS Uw8KwkFtT6fe3xv7rTq4oKL3MYG7KD6VWeMlxnfYLf+fSQ4nM4tbCH5t9pcr2GrClCs0yjNm2sp /XpHYkHQFKO29Ihk5ZBW0/QScyYb9tROWv0w17ftE7+YTENerSFxkTwWm6es1zZj4grTpLegyMB j3Dg X-Received: by 2002:a05:693c:41c2:20b0:36a:5042:85b1 with SMTP id 5a478bee46e88-36a50428d57mr2326663eec.2.1793419254520; Fri, 30 Oct 2026 21:00:54 -0700 (PDT) Return-Path: Received: from apollo.tail3ccdd3.ts.net ([147.160.63.35]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-36a42a98f65sm11853728eec.28.2026.10.30.21.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2026 21:00:53 -0700 (PDT) From: Khem Raj X-Google-Original-From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-python][PATCH 1/3] python3-simple-websocket: Do not need network access in client ptests Date: Fri, 30 Oct 2026 21:00:49 -0700 Message-ID: <20261031040051.2131713-1-khem.raj@oss.qualcomm.com> X-Mailer: git-send-email 2.56.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sat, 31 Oct 2026 04:00:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/131721 The client unit tests mock socket.socket but not socket.getaddrinfo(), so every test resolves example.com. Without working DNS in the image (e.g. yoe-musl-sysvinit qemux86-64) all of tests/test_client.py fails. Backport the upstream fix that uses localhost instead. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- ...ess-requirement-in-client-unit-tests.patch | 141 ++++++++++++++++++ .../python/python3-simple-websocket_1.1.0.bb | 4 +- 2 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-simple-websocket/0002-Removed-net-access-requirement-in-client-unit-tests.patch diff --git a/meta-python/recipes-devtools/python/python3-simple-websocket/0002-Removed-net-access-requirement-in-client-unit-tests.patch b/meta-python/recipes-devtools/python/python3-simple-websocket/0002-Removed-net-access-requirement-in-client-unit-tests.patch new file mode 100644 index 0000000000..7266ee57f3 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-simple-websocket/0002-Removed-net-access-requirement-in-client-unit-tests.patch @@ -0,0 +1,141 @@ +From 159e030c7c23060de989cebec6d98d776c75bcbd Mon Sep 17 00:00:00 2001 +From: Miguel Grinberg +Date: Sun, 13 Oct 2024 15:11:39 +0100 +Subject: [PATCH] Removed net access requirement in client unit tests (Fixes + #40) + +Upstream-Status: Backport [https://github.com/miguelgrinberg/simple-websocket/commit/159e030c7c23060de989cebec6d98d776c75bcbd] +Signed-off-by: Khem Raj +--- + tests/test_client.py | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) + +diff --git a/tests/test_client.py b/tests/test_client.py +index d986520..898b423 100644 +--- a/tests/test_client.py ++++ b/tests/test_client.py +@@ -22,16 +22,16 @@ def get_client(self, mock_wsconn, url, events=[], subprotocols=None, + @mock.patch('simple_websocket.ws.WSConnection') + def test_make_client(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.return_value = b'x' +- client = self.get_client(mock_wsconn, 'ws://example.com/ws?a=1') ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws?a=1') + assert client.sock == mock_socket() + assert client.receive_bytes == 4096 + assert client.input_buffer == [] + assert client.event.__class__.__name__ == 'Event' + client.sock.send.assert_called_with( +- b"Request(host='example.com', target='/ws?a=1', extensions=[], " ++ b"Request(host='localhost', target='/ws?a=1', extensions=[], " + b"extra_headers=[], subprotocols=[])") + assert not client.is_server +- assert client.host == 'example.com' ++ assert client.host == 'localhost' + assert client.port == 80 + assert client.path == '/ws?a=1' + +@@ -39,42 +39,42 @@ def test_make_client(self, mock_wsconn, mock_socket): + @mock.patch('simple_websocket.ws.WSConnection') + def test_make_client_subprotocol(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.return_value = b'x' +- client = self.get_client(mock_wsconn, 'ws://example.com/ws?a=1', ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws?a=1', + subprotocols='foo') + assert client.subprotocols == ['foo'] + client.sock.send.assert_called_with( +- b"Request(host='example.com', target='/ws?a=1', extensions=[], " ++ b"Request(host='localhost', target='/ws?a=1', extensions=[], " + b"extra_headers=[], subprotocols=['foo'])") + + @mock.patch('simple_websocket.ws.socket.socket') + @mock.patch('simple_websocket.ws.WSConnection') + def test_make_client_subprotocols(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.return_value = b'x' +- client = self.get_client(mock_wsconn, 'ws://example.com/ws?a=1', ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws?a=1', + subprotocols=['foo', 'bar']) + assert client.subprotocols == ['foo', 'bar'] + client.sock.send.assert_called_with( +- b"Request(host='example.com', target='/ws?a=1', extensions=[], " ++ b"Request(host='localhost', target='/ws?a=1', extensions=[], " + b"extra_headers=[], subprotocols=['foo', 'bar'])") + + @mock.patch('simple_websocket.ws.socket.socket') + @mock.patch('simple_websocket.ws.WSConnection') + def test_make_client_headers(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.return_value = b'x' +- client = self.get_client(mock_wsconn, 'ws://example.com/ws?a=1', ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws?a=1', + headers={'Foo': 'Bar'}) + client.sock.send.assert_called_with( +- b"Request(host='example.com', target='/ws?a=1', extensions=[], " ++ b"Request(host='localhost', target='/ws?a=1', extensions=[], " + b"extra_headers=[('Foo', 'Bar')], subprotocols=[])") + + @mock.patch('simple_websocket.ws.socket.socket') + @mock.patch('simple_websocket.ws.WSConnection') + def test_make_client_headers2(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.return_value = b'x' +- client = self.get_client(mock_wsconn, 'ws://example.com/ws?a=1', ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws?a=1', + headers=[('Foo', 'Bar'), ('Foo', 'Baz')]) + client.sock.send.assert_called_with( +- b"Request(host='example.com', target='/ws?a=1', extensions=[], " ++ b"Request(host='localhost', target='/ws?a=1', extensions=[], " + b"extra_headers=[('Foo', 'Bar'), ('Foo', 'Baz')], " + b"subprotocols=[])") + +@@ -82,7 +82,7 @@ def test_make_client_headers2(self, mock_wsconn, mock_socket): + @mock.patch('simple_websocket.ws.WSConnection') + def test_send(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.return_value = b'x' +- client = self.get_client(mock_wsconn, 'ws://example.com/ws') ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws') + while client.connected: + time.sleep(0.01) + with pytest.raises(simple_websocket.ConnectionClosed): +@@ -102,7 +102,7 @@ def test_send(self, mock_wsconn, mock_socket): + @mock.patch('simple_websocket.ws.WSConnection') + def test_receive(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.return_value = b'x' +- client = self.get_client(mock_wsconn, 'ws://example.com/ws', events=[ ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws', events=[ + [TextMessage('hello')], + [BytesMessage(b'hello')], + ]) +@@ -117,7 +117,7 @@ def test_receive(self, mock_wsconn, mock_socket): + @mock.patch('simple_websocket.ws.WSConnection') + def test_receive_after_close(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.return_value = b'x' +- client = self.get_client(mock_wsconn, 'ws://example.com/ws', events=[ ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws', events=[ + [TextMessage('hello')], + ]) + while client.connected: +@@ -130,7 +130,7 @@ def test_receive_after_close(self, mock_wsconn, mock_socket): + @mock.patch('simple_websocket.ws.WSConnection') + def test_receive_ping(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.return_value = b'x' +- client = self.get_client(mock_wsconn, 'ws://example.com/ws', events=[ ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws', events=[ + [Ping(b'hello')], + ]) + while client.connected: +@@ -141,7 +141,7 @@ def test_receive_ping(self, mock_wsconn, mock_socket): + @mock.patch('simple_websocket.ws.WSConnection') + def test_receive_empty(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.side_effect = [b'x', b'x', b''] +- client = self.get_client(mock_wsconn, 'ws://example.com/ws', events=[ ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws', events=[ + [TextMessage('hello')], + ]) + while client.connected: +@@ -154,7 +154,7 @@ def test_receive_empty(self, mock_wsconn, mock_socket): + @mock.patch('simple_websocket.ws.WSConnection') + def test_close(self, mock_wsconn, mock_socket): + mock_socket.return_value.recv.return_value = b'x' +- client = self.get_client(mock_wsconn, 'ws://example.com/ws') ++ client = self.get_client(mock_wsconn, 'ws://localhost/ws') + while client.connected: + time.sleep(0.01) + with pytest.raises(simple_websocket.ConnectionClosed): diff --git a/meta-python/recipes-devtools/python/python3-simple-websocket_1.1.0.bb b/meta-python/recipes-devtools/python/python3-simple-websocket_1.1.0.bb index 35c568cf7c..2438495dd3 100644 --- a/meta-python/recipes-devtools/python/python3-simple-websocket_1.1.0.bb +++ b/meta-python/recipes-devtools/python/python3-simple-websocket_1.1.0.bb @@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9d272c9fe2437531b5bbecf4fcc82e24" inherit pypi python_setuptools_build_meta ptest-python-pytest -SRC_URI += "file://0001-Async-test-improvements-for-Python-3.14-48.patch" +SRC_URI += "file://0001-Async-test-improvements-for-Python-3.14-48.patch \ + file://0002-Removed-net-access-requirement-in-client-unit-tests.patch \ + " SRC_URI[sha256sum] = "7939234e7aa067c534abdab3a9ed933ec9ce4691b0713c78acb195560aa52ae4" RDEPENDS:${PN} += " \ From patchwork Sat Oct 31 04:00:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 102590 Received: from mail-dy1-f171.google.com (mail-dy1-f171.google.com [74.125.82.171]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.738.1793419256652200823 for ; Fri, 30 Oct 2026 21:00:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=oyez+A8V; spf=pass (domain: gmail.com, ip: 74.125.82.171, mailfrom: raj.khem@gmail.com) Received: by mail-dy1-f171.google.com with SMTP id 5a478bee46e88-36a0f27c9f4so2348019eec.1 for ; Fri, 30 Oct 2026 21:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793419256; x=1794024056; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=E1eg4F7t1OYUNkigxmAFLZD6w/XsjdQ+ehOaJWVWytU=; b=oyez+A8VZ5O2Rni49JxVvuy2JEqvwRX0OYhFhbP3hKUhJ+UTl8Nvp47CqImL2STDsv zNdmdKhQH/rO9FHDCJ5tL0GVHgzK2JTpwG0R9XSGbwDk83deiYHOYnaXmVaAZOhJ6L5O e6bziJZeimu/1r/aNnGzf7VROnkBYMvEaPw/Zm7O5UaNudC4zet9nf/LddSk5dRY9G3R xkCT1hyaJgTvD2PZNOuSvgvU5cdnqXog0DusJIP8tciHOyDxhvAuaeFPe2zsslCp0suJ 6WdYti6iW4HsVVZc1JsScz2ZmyOFrLJ+t3refwD33MFW139a5civDC+KtuewNXH3SvBT FonA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793419256; x=1794024056; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=E1eg4F7t1OYUNkigxmAFLZD6w/XsjdQ+ehOaJWVWytU=; b=kis7P9aakzXETBFztJC2q8dkf+Y484nOJWO9HNln+4EyufKmF3xHaXfOwzSedXlPXO pZnP14oOEvuAw/+pqc+cf7zAQR/LsEe8uU3KEfp9WpqG6WomFN7M9zQCeLG9xSbvV/gm qNMhDN18INCZGzOMDoqmaP0CdEud2s6zrBC7FcKgtLxrQAPtXXO7MIz2tD3tYnT1p8Ka eKm35gZv4sMG3lUf/4fgF5bDFNQxq4Q6cYKvrCgyVIdKQSLM3SXv/aOYlKX+e4ekDIjX Ps6z0CopEouC/skbEASY1xpAaswDqcBTqmheEcW/slhVmz6q7lzNNxjOmQb/ILE5a/Nz UUIg== X-Gm-Message-State: AFq9FYLFFzVRbdsujdM74uTXQoJjOUvu04W6Q/3Gj9KIsagznoW2IXEo 9Iox56XFPJ4egFsDkdcFLuzzhzHUl06KK5wXbSpJhnkfo3chcbwkDNjO1F5X6gwBwQI= X-Gm-Gg: AYBFou2xgzM67kSAmAxHOdUBz87cw3OL+QTb4g/QwoRT+OB++jUZoxQiViO7Y1Am81H 4e3HRiebrZIE01aYJsj1jp9aFUS3D0Bt1aiQPi9FcwzjlMv53p1hGBFuBnaI3FTsXngVKIWY1Mx K8wEFHZ6c57L/mgh1FMFWkkqK4FxAudUdrPFtS5HFozJIK/oxSxMOfDUC7B3hjw5/+V95hYJ/qC U0OHIusZa2zdrkPOYEzgSZV+FyVWJ4K40/UOgpUvg6750r4uhJoKpeurw8TNap4sPIgWl+cDRsa OEzi6l7xyJN1/7t1uvW+gZSvZ7I6C3WPlUjP8lyMwT0ARelTPbYXr/nEDJZ6+kU5wMCnZFiJ5O2 uzXgtezMO5HpWsxSTJL9vfTdZIAHxb0IWCbSsWKvtLJv/Zy+kC58OwlUW6pTuTKJtlS/kQwkc4z wPdgC7o+mjyx/RndcRW39TFv/BgWo88wxMuvDenWtbP5YUai9f9WzVCx9vDgMnOjnV8Vtru+9DP zYz6hlemE1Ok7PIC/lsp+CF60TwPChUdMxxBFwdvGPfjMNeB6/XttDYyl3QzEkP/rxhehpjCf5O pwYSiY941hhf3YJywqYpnJ9gjH1nfyi7FyeMGRIjTBBvxn2g5PIxx9NzLgZN744YqI16ACttL1s HlZRMvkN+zQftPGQRYuvry8qDSIL2gO24gk70/tpGgvNt2ke2UG8kY6RXm5opIIe6/Sb0HOighU Xo9qjB/pCeTj4q9NBWX3szj0aMyVOBa3JEwXbZKdjepdh8SGqpZ6HtorTC8UaGsq3u4rVkagOkk VBWl/XknTUp2Ow9NIMbpqqBEYcO4osi3g/UlDV+Ea396teuR0oMYEBUgc37i6M3MOKqCtz2lydM HXAC X-Received: by 2002:a05:7300:ce93:b0:351:5cb5:53f7 with SMTP id 5a478bee46e88-36a42225ad3mr5835293eec.3.1793419255637; Fri, 30 Oct 2026 21:00:55 -0700 (PDT) Return-Path: Received: from apollo.tail3ccdd3.ts.net ([147.160.63.35]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-36a42a98f65sm11853728eec.28.2026.10.30.21.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2026 21:00:55 -0700 (PDT) From: Khem Raj X-Google-Original-From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-python][PATCH 2/3] python3-objgraph: Fix intermittent test_at_addrs ptest failure Date: Fri, 30 Oct 2026 21:00:50 -0700 Message-ID: <20261031040051.2131713-2-khem.raj@oss.qualcomm.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261031040051.2131713-1-khem.raj@oss.qualcomm.com> References: <20261031040051.2131713-1-khem.raj@oss.qualcomm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sat, 31 Oct 2026 04:01:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/131722 get_new_ids() keeps the ids it saw in earlier calls, including those of objects freed since. When the list created by test_at_addrs reuses one of those addresses it is not reported as new and the test fails, which was seen on musl qemux86-64: {'python3-objgraph': ['tests.py:AtAddrsTest.test_at_addrs']} Refresh the baseline right before creating the list. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- ...rs-independent-of-earlier-get_new_id.patch | 42 +++++++++++++++++++ .../python/python3-objgraph_3.7.0.bb | 4 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-objgraph/0001-Make-test_at_addrs-independent-of-earlier-get_new_id.patch diff --git a/meta-python/recipes-devtools/python/python3-objgraph/0001-Make-test_at_addrs-independent-of-earlier-get_new_id.patch b/meta-python/recipes-devtools/python/python3-objgraph/0001-Make-test_at_addrs-independent-of-earlier-get_new_id.patch new file mode 100644 index 0000000000..15c7458492 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-objgraph/0001-Make-test_at_addrs-independent-of-earlier-get_new_id.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 28 Oct 2026 08:08:23 -0700 +Subject: [PATCH] Make test_at_addrs independent of earlier get_new_ids() calls + +get_new_ids() keeps the ids it has seen in its _state and reports only +ids that are not in there. Ids of objects that were freed after an +earlier call stay in that set, so if the list created by test_at_addrs +reuses the address of one of them it is not reported as new and the +test fails: + + self.assertIn(a, new_lists) + AssertionError: [0, 1, 2] not found in [...] + +Whether that happens depends on the allocator and on what ran before; +it was seen intermittently with musl, and a slight change in what the +test allocates makes it fail every time. + +Call get_new_ids() once more right before creating the list, as the +example in its docstring does, so the baseline only holds live objects. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + tests.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests.py b/tests.py +index 0c7aa1f..1dab8c1 100755 +--- a/tests.py ++++ b/tests.py +@@ -361,6 +361,10 @@ class ByTypeTest(GarbageCollectedMixin, unittest.TestCase): + class AtAddrsTest(unittest.TestCase): + + def test_at_addrs(self): ++ # get_new_ids() remembers the ids seen by earlier calls, including ++ # ones of objects that have been freed since; refresh that state so ++ # that a list reusing such an address still counts as new. ++ objgraph.get_new_ids(limit=0) + a = [0, 1, 2] + new_ids = objgraph.get_new_ids(limit=0) + new_lists = objgraph.at_addrs(new_ids['list']) diff --git a/meta-python/recipes-devtools/python/python3-objgraph_3.7.0.bb b/meta-python/recipes-devtools/python/python3-objgraph_3.7.0.bb index 9ddfe97f53..f4098272ec 100644 --- a/meta-python/recipes-devtools/python/python3-objgraph_3.7.0.bb +++ b/meta-python/recipes-devtools/python/python3-objgraph_3.7.0.bb @@ -3,7 +3,9 @@ HOMEPAGE = "https://mg.pov.lt/objgraph/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=e48a556235f55ad7d4234475657f68a7" -SRC_URI:append = " file://run-ptest" +SRC_URI:append = " file://run-ptest \ + file://0001-Make-test_at_addrs-independent-of-earlier-get_new_id.patch \ + " SRC_URI[sha256sum] = "b6ef4b244217410509b257970413b01a979d54df48d2d4055b6941e8679ddbbb" inherit pypi setuptools3 ptest-python-pytest From patchwork Sat Oct 31 04:00:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 102591 Received: from mail-dy1-f175.google.com (mail-dy1-f175.google.com [74.125.82.175]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.739.1793419258154412441 for ; Fri, 30 Oct 2026 21:00:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=flh+EzUk; spf=pass (domain: gmail.com, ip: 74.125.82.175, mailfrom: raj.khem@gmail.com) Received: by mail-dy1-f175.google.com with SMTP id 5a478bee46e88-3645f0f3fcdso2307148eec.0 for ; Fri, 30 Oct 2026 21:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793419257; x=1794024057; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Z5yipu0q8Vr2jBjaghB7XbaYkQSgULC6LkO3kB9GKMo=; b=flh+EzUkFJd0ug9RPQVMeHhhh1G17o+wC+dEI/oU16Alxj6Mlkpf0IBjYZ7d4KWhzE +Yyd0V6TjVqqdxRmlIMAvjFekPOYzeBzitj3hP/D7MOXqLLURPCiqz0M0ojT/IFoCaAq bmC4PycnJ9V+wGH0Dhby4YEIoj7Jd11CPyu6+686FqhhuwLtIN2nkXPN61HlwBAFDnef jrXmu/CP6H0B1QqSnyYsRH7GWKOBVrO4gPVQjP8whbh0qpELdkx69fXVBf6P+5ouyxjQ zXCpB6aPf3J4uJG5m1POSotBw8YkX/0CD90M+absgQJvBhkuTOYU/fRNdwvUNGDFrXY2 W0RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793419257; x=1794024057; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Z5yipu0q8Vr2jBjaghB7XbaYkQSgULC6LkO3kB9GKMo=; b=X6SVXSnbM7KUKklUReaVX2xK0zw1ocXQXGhWm5P75J4hPwoyE89ERkv/JJCCfiZ0x+ APGlX0KFhOjBjLwBt+UPlDFLr16ACghHHNryZ1BQ0p8N1J5BUqqU8yLej2qbrqehGqSz ZnVhYQXt4ZxgVQPk0njdvTYmE/1m/gsXGekBWNCgpT9pcpE84gHyt6LZ/VO//xMUTUwk QaNBog8g73P6bvQM3Q0ODzM8KYTDf22IPeWkjJWBx1weJ+80c5zohAgPyH3Z2G1WOrRl LTQrOdaf1M7QeCCZ7ufN8s92x5IE4N36HiQhAI6Sdntn3h9kBbXLDKv5o8J/K16IQ3QA 2VFg== X-Gm-Message-State: AFq9FYLuxMb669FQMf2tvJWNOjyM5JQKadmZFpXTfMc3clFMLBTgHiYj 5BhPrk9HYp0RPY4ZDGUb9SefXe1su5UCJjkaA6ySAVDEpmbTGiKg778t34Ko5fwJH20= X-Gm-Gg: AYBFou39eFzhw4KGBHrNyEN9wNjREujodtRRZ9gi2JmsWSVwzSwumLNItfZIPRO80OL CdJ3REMT+muKqP+Cn2es8YSCzA8jOtXBpu8QS7h8K/N/990tXV0MTT/omPvupmXR7ScmqD1joMg Qsb14XlZQ/1q08c/R2RAoLYOC0zdbw5ZCNifhOIPN7xocDVzuZqjUWIb/47ifzNatoDe4Cpsapq 0OqEa78Gdtc18/1Hrlf7Nj+H0P55zC5pwoN8kCD2M8YDIPbLuiVJpqqDPGlxi3gl5jUQRFpvV9y ibSyzZgOLYXwk4svJZE+xW8eLg1c1OPG3+gcshRoTk1hWN/ia03R/pB14YHHWZoRLpLNPgOxTsb 8VH7XrDKwZTo1YqWAiXCGl3pcUoBkQY/+5+T/dq7fzKiVdPT5Ogm/D2XA2pzpQ12C1Kz37u83O5 F2lfb2/XwKQtE6VX7SoxZlaK+6AGw1j/3HqxIKdDScE5Gm/WyaqCsFSyIWBd9xg6dSm0NO36njx +YLWQRnwYwoB3IObuQMHrgjco8fkr8ATEVaeYJ9KJoyp4IQ02ln7KHhXPlJOgv3DtgEYkf5zHXk yr1MFQiWnJyleSuEPGs/hRFXau4WmTUhz+sXxU24tnuRYpyXKSm1lRA7uYrb5YOi6XDq4IjAHvp kREjPeR2bnMY+zCTD5/VEiKbjE9ciXDuE35dKVJ9C+lQBELmrDRKpvdWZC6qvoNwLnFMDAjAfwF wes4L5ypCv3GZJAaVx5wKjCiAnyUZpeovnx2HVc5EnR4fKNzN96x9C7+pGDt9IBU1TqDUAKE1Ab ACBbwXwgbL33QE26/k5IdFNRPwtitPjFnyDciu/ytlDZr2WzNvgN6U1LOK2c7Wjt38aGEfs9OFZ DXlW X-Received: by 2002:a05:693c:6092:b0:35e:5ca:e0df with SMTP id 5a478bee46e88-36a424609c2mr7531424eec.35.1793419256805; Fri, 30 Oct 2026 21:00:56 -0700 (PDT) Return-Path: Received: from apollo.tail3ccdd3.ts.net ([147.160.63.35]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-36a42a98f65sm11853728eec.28.2026.10.30.21.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2026 21:00:56 -0700 (PDT) From: Khem Raj X-Google-Original-From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 3/3] libgpiod: Fix intermittent gpiocli monitor ptest failure Date: Fri, 30 Oct 2026 21:00:51 -0700 Message-ID: <20261031040051.2131713-3-khem.raj@oss.qualcomm.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261031040051.2131713-1-khem.raj@oss.qualcomm.com> References: <20261031040051.2131713-1-khem.raj@oss.qualcomm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sat, 31 Oct 2026 04:01:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/131723 test_monitor_all_lines_on_request toggles line 1 twice, with line 4 in between, before reading any event. gpio-sim delivers both changes of line 1 as one interrupt when they happen before it is handled, so the rising edge is lost: ASSERT: '41610700648 falling "foo" 41610665414 rising 4' did not match '[0-9]+ rising\s+"foo"' Wait for each event before triggering the next one. In a qemux86-64 guest this took the test from 12 of 20 runs failing to none. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- ...for-each-event-in-test_monitor_all_l.patch | 52 +++++++++++++++++++ .../libgpiod/libgpiod_2.3.1.bb | 1 + 2 files changed, 53 insertions(+) create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-dbus-tests-wait-for-each-event-in-test_monitor_all_l.patch diff --git a/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-dbus-tests-wait-for-each-event-in-test_monitor_all_l.patch b/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-dbus-tests-wait-for-each-event-in-test_monitor_all_l.patch new file mode 100644 index 0000000000..6f94fc6a68 --- /dev/null +++ b/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-dbus-tests-wait-for-each-event-in-test_monitor_all_l.patch @@ -0,0 +1,52 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 28 Oct 2026 07:55:33 -0700 +Subject: [PATCH] dbus: tests: wait for each event in + test_monitor_all_lines_on_request + +The test pulls line 1 up, line 4 up and line 1 down again in quick +succession and only then reads the monitor output. gpio-sim raises the +line interrupts through irq_sim, so two changes of the same line that +happen before the interrupt is handled are delivered as one interrupt, +and as edge detection is set to both edges the kernel derives the edge +type from the line value read in the handler. The rising edge on line 1 +is then lost and only a falling edge is reported, timestamped after the +rising edge on line 4: + + ASSERT: '41610700648 falling "foo" 41610665414 rising 4' did not + match '[0-9]+ rising\s+"foo"' + +This fails intermittently, in 12 of 20 runs in a qemux86-64 guest. + +Wait for each event before triggering the next one, like the gpiomon +tests in gpio-tools-test.bash do. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + dbus/client/gpiocli-test.bash | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/dbus/client/gpiocli-test.bash b/dbus/client/gpiocli-test.bash +index 5160f57..ede69c9 100755 +--- a/dbus/client/gpiocli-test.bash ++++ b/dbus/client/gpiocli-test.bash +@@ -1421,13 +1421,13 @@ test_monitor_all_lines_on_request() { + dut_run gpiocli monitor -r "$request" + + gpiosim_set_pull sim0 1 pull-up ++ dut_regex_match "[0-9]+ rising\\s+\"foo\"" ++ + gpiosim_set_pull sim0 4 pull-up +- gpiosim_set_pull sim0 1 pull-down ++ dut_regex_match "[0-9]+ rising\\s+4" + +- dut_read +- output_regex_match "[0-9]+ rising\\s+\"foo\"" +- output_regex_match "[0-9]+ rising\\s+4" +- output_regex_match "[0-9]+ falling\\s+\"foo\"" ++ gpiosim_set_pull sim0 1 pull-down ++ dut_regex_match "[0-9]+ falling\\s+\"foo\"" + + gpiodbus_release_request "$request" + } diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb index 49327591b7..1c8c13677f 100644 --- a/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb +++ b/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb @@ -26,6 +26,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}-2.x:" SRC_URI += " \ file://gpio-manager.init \ file://fix_gpiodbus_license.patch \ + file://0001-dbus-tests-wait-for-each-event-in-test_monitor_all_l.patch \ " SRC_URI[sha256sum] = "e3a358a90a9204ff16f92b6f4028ed91460b1926f10589eb54b3566484650a30"