diff --git a/arm-runtimes/test-support/picolibc-test-wrapper.py b/arm-runtimes/test-support/picolibc-test-wrapper.py index 2451599b..e391e692 100755 --- a/arm-runtimes/test-support/picolibc-test-wrapper.py +++ b/arm-runtimes/test-support/picolibc-test-wrapper.py @@ -40,8 +40,6 @@ ] disabled_tests_fvp = [ - # SDDKW-53824: ":semihosting-features" pseudo-file not implemented. - "test/semihost/semihost-exit-extended", # SDDKW-25808: SYS_SEEK returns wrong value. "test/semihost/semihost-seek", "test/test-fread-fwrite", diff --git a/arm-runtimes/test-support/run_fvp.py b/arm-runtimes/test-support/run_fvp.py index 1a882d2f..2822f0bd 100755 --- a/arm-runtimes/test-support/run_fvp.py +++ b/arm-runtimes/test-support/run_fvp.py @@ -67,6 +67,18 @@ def run_fvp( if verbose: print("running: {}".format(shlex.join(command))) + # SDDKW-53824: the ":semihosting-features" pseudo-file isn't simulated + # by these models. To work around that, we create one ourselves in the + # test process's working directory, containing the single feature flag + # SH_EXT_EXIT_EXTENDED, meaning that the SYS_EXIT_EXTENDED semihosting + # request will work. This permits the test program's exit status to be + # propagated to the exit status of the FVP, so that tests returning 77 + # for "test skipped" can be automatically detected. + with open( + path.join(working_directory, ":semihosting-features"), "wb" + ) as fh: + fh.write(b"SHFB\x01") + result = subprocess.run( command, stdout=subprocess.PIPE,