From 3723a2793bbfc344c29ae1e102eb4e555573acf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Wed, 22 Jul 2026 21:59:53 +0200 Subject: [PATCH] ci: cram: keep remote commands off the script stdin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cram supplies the complete generated test script through the shell's stdin. SSH inherits that input from the shared remote-command alias and drains the script beyond the shell's read-ahead buffer. The shell then reaches EOF in the middle of a quoted command near byte 8,192: ```text /bin/sh: 74: Syntax error: Unterminated quoted string ``` This is independent of the Python interpreter. Freedom job 15484314070 failed the 49-command probe at chunk 0036 under Python 3.14.6. With the same probe and firmware, job 15484856804 passed all 49 chunks under Python 3.13 after adding the SSH stdin protection. Pass -n to the shared SSH command so it reads from /dev/null instead of the test script. Apply the same safe default to the MXL fallback alias. Assisted-by: codex:gpt-5 Signed-off-by: Petr Štetiar References: PCF-2222 --- .gitlab/testbed.yml | 2 +- .gitlab/tests/cram/mxl25641-hdk-6/050-allow_block_sfp.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/testbed.yml b/.gitlab/testbed.yml index de92b7d0f4..dec5ab2ebd 100644 --- a/.gitlab/testbed.yml +++ b/.gitlab/testbed.yml @@ -25,7 +25,7 @@ DUT_OBUSPA_VERBOSE_LEVEL: '' DUT_OBUSPA_PROTOCOL_TRACE: '' TEST_SETUP_TEARDOWN_DURATION: 360 - CRAM_REMOTE_COMMAND: ssh root@$TARGET_LAN_IP + CRAM_REMOTE_COMMAND: ssh -n root@$TARGET_LAN_IP CRAM_REMOTE_COPY: scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null CRAM_TEST_SUITE: | .gitlab/tests/cram/generic/acceleration-plan-components diff --git a/.gitlab/tests/cram/mxl25641-hdk-6/050-allow_block_sfp.t b/.gitlab/tests/cram/mxl25641-hdk-6/050-allow_block_sfp.t index 75134d5d43..45720f9549 100644 --- a/.gitlab/tests/cram/mxl25641-hdk-6/050-allow_block_sfp.t +++ b/.gitlab/tests/cram/mxl25641-hdk-6/050-allow_block_sfp.t @@ -42,7 +42,7 @@ # Allowing/blocking SFPs via that table is already covered by the unit tests of # tr181-sfp. - $ alias R="${CRAM_REMOTE_COMMAND:-ssh root@192.168.1.1}" + $ alias R="${CRAM_REMOTE_COMMAND:-ssh -n root@192.168.1.1}" Check if we're on the right board