summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-03-31 17:41:50 +0700
committerhathach <[email protected]>2026-03-31 23:53:56 +0700
commit9ac343a0471b03b1a76166c72347e7fdbf2c4800 (patch)
tree57db643dbff0282ecfa0edafd96b68acf8d39d54 /test
parent660c8ca087c8006433301d9208143438f5f456a1 (diff)
finally get rp2040 host epx working with 2-sof solution for switching
Diffstat (limited to 'test')
-rwxr-xr-xtest/hil/hil_test.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py
index 04dd4e2bc..cf3cff1a3 100755
--- a/test/hil/hil_test.py
+++ b/test/hil/hil_test.py
@@ -50,7 +50,7 @@ import ctypes
from pymtp import MTP
import string
-ENUM_TIMEOUT = 10
+ENUM_TIMEOUT = 15
STATUS_OK = "\033[32mOK\033[0m"
STATUS_FAILED = "\033[31mFailed\033[0m"
@@ -766,10 +766,13 @@ def test_device_cdc_msc(board):
assert ret.returncode == 0, f'dd read failed: {ret.stdout.decode()}'
read_speed = parse_dd_speed(ret.stdout.decode())
- # Write back the same data to avoid corrupting the disk
+ # Write back the same data to avoid corrupting the disk (skip if read-only)
ret = run_cmd(f'dd if={tmp_file} of={dev} bs={block_size} count={block_count} oflag=direct 2>&1')
- assert ret.returncode == 0, f'dd write failed: {ret.stdout.decode()}'
- write_speed = parse_dd_speed(ret.stdout.decode())
+ if ret.returncode != 0 and 'Read-only' in ret.stdout.decode():
+ write_speed = 'skip (read-only)'
+ else:
+ assert ret.returncode == 0, f'dd write failed: {ret.stdout.decode()}'
+ write_speed = parse_dd_speed(ret.stdout.decode())
try:
os.remove(tmp_file)