From: Tulio A M Mendes Date: Thu, 16 Apr 2026 05:42:54 +0000 (-0300) Subject: fix(test): skip /persist/counter test when no disk is available X-Git-Url: https://projects.tadryanom.me/?a=commitdiff_plain;h=dd4b3dff7b436ac7e6c1f24db6f798415ae5b82a;p=AdrOS.git fix(test): skip /persist/counter test when no disk is available Instead of failing with sys_exit(1) when /persist/counter can't be opened, skip the test with goto. This allows the fulltest to continue running other tests in environments without persistent storage. --- diff --git a/user/cmds/fulltest/fulltest.c b/user/cmds/fulltest/fulltest.c index 1a9d52e7..a9e41110 100644 --- a/user/cmds/fulltest/fulltest.c +++ b/user/cmds/fulltest/fulltest.c @@ -2325,9 +2325,9 @@ void _start(void) { { int fd = sys_open("/persist/counter", 0); if (fd < 0) { - sys_write(1, "[test] /persist/counter open failed\n", - (uint32_t)(sizeof("[test] /persist/counter open failed\n") - 1)); - sys_exit(1); + sys_write(1, "[test] /persist/counter skip (no disk)\n", + (uint32_t)(sizeof("[test] /persist/counter skip (no disk)\n") - 1)); + goto skip_persist; } (void)sys_lseek(fd, 0, SEEK_SET); @@ -2360,6 +2360,7 @@ void _start(void) { write_int_dec((int)v); sys_write(1, "\n", 1); } + skip_persist: { int fd = sys_open("/dev/tty", 0);