ci: cram: keep remote commands off the script stdin

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 <petr.stetiar@prplfoundation.org>
References: PCF-2222
This commit is contained in:
Petr Štetiar 2026-07-22 21:59:53 +02:00 committed by Faouzi Yahya
parent 040e8a69f8
commit 3723a2793b
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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