diff --git a/suite/tests/CMakeLists.txt b/suite/tests/CMakeLists.txt index 2852a419b61..dc398a2d78b 100644 --- a/suite/tests/CMakeLists.txt +++ b/suite/tests/CMakeLists.txt @@ -5704,7 +5704,7 @@ if (UNIX) endif () if (NOT X64 AND NOT ARM) # FIXME i#1551: add coarse-grain ARM support # XXX: 64-bit support not quite there yet - torunonly(linux.freeze_FLAKY linux/infloop linux/freeze.runall + torunonly(linux.freeze_FLAKY linux.infloop linux/freeze.runall "-coarse_units -coarse_enable_freeze" "-v") endif (NOT X64 AND NOT ARM) @@ -5713,9 +5713,9 @@ if (UNIX) file(MAKE_DIRECTORY "${PCACHE_SHARED_DIR}") if (NOT X64 AND NOT ARM) # FIXME i#1551: add coarse-grain ARM support # XXX: 64-bit support not quite there yet - torunonly(linux.persist_FLAKY linux/infloop linux/persist.runall + torunonly(linux.persist_FLAKY linux.infloop linux/persist.runall "-coarse_units -coarse_split_calls -coarse_enable_freeze -coarse_freeze_min_size 0 -no_persist_per_user -no_validate_owner_dir" "-v") - torunonly(linux.persist-use_FLAKY linux/infloop linux/persist-use.runall + torunonly(linux.persist-use_FLAKY linux.infloop linux/persist-use.runall "-use_persisted -coarse_units -coarse_split_calls -no_persist_per_user -no_validate_owner_dir" "-v") endif (NOT X64 AND NOT ARM) # when running tests in parallel: have to generate pcaches first diff --git a/suite/tests/common/fib.c b/suite/tests/common/fib.c index 52b9da54a69..e1e89f7a4d0 100644 --- a/suite/tests/common/fib.c +++ b/suite/tests/common/fib.c @@ -68,7 +68,7 @@ fib(int n) return fib(n - 1) + fib(n - 2); } -#ifndef WINDOWS +#ifdef LINUX /* A no-op signal_handler to handle SIGTERM for attach memory dump test. */ static void signal_handler(int sig) @@ -80,14 +80,14 @@ int main(int argc, char **argv) { int i, t; - bool attach = false; INIT(); USE_USER32(); +#ifdef LINUX + bool attach = false; if (argc > 1 && strcmp(argv[1], "attach") == 0) { attach = true; -#ifndef WINDOWS intercept_signal(SIGTERM, (handler_3_t)signal_handler, /*sigstack=*/false); } #endif @@ -97,14 +97,15 @@ main(int argc, char **argv) if (argc > 1 && strcmp(argv[1], "only_5") == 0) return 0; +#ifdef LINUX /* Add a sleep here for attach to take place for attach memory dump test. */ - if (argc > 1 && strcmp(argv[1], "attach") == 0) { - attach = true; + if (attach) { struct timespec sleeptime; sleeptime.tv_sec = 0; sleeptime.tv_nsec = 500 * 1000 * 1000; /* 50ms */ nolibc_nanosleep(&sleeptime); } +#endif print("fib(%d)=%d\n", 15, fib(15)); /* deep recursion */ @@ -122,10 +123,12 @@ main(int argc, char **argv) print("fib(%d)=%d\n", DEPTH, t); +#ifdef LINUX /* runall.cmake for attach test requires "done" as last line once done. */ if (attach) { print("done\n"); } +#endif } /* diff --git a/suite/tests/common/tool.drcov.fib.template b/suite/tests/common/tool.drcov.fib.template index aabbd669175..7c0e0d82139 100644 --- a/suite/tests/common/tool.drcov.fib.template +++ b/suite/tests/common/tool.drcov.fib.template @@ -8,28 +8,27 @@ DA:69,1 DA:75,0 DA:76,0 DA:81,1 -DA:83,1 -DA:85,1 +DA:84,1 DA:88,1 -DA:89,0 +DA:89,1 +DA:90,0 DA:91,0 DA:95,1 DA:97,1 DA:98,0 -DA:101,1 -DA:102,0 +DA:102,1 DA:104,0 DA:105,0 DA:106,0 -DA:109,1 -DA:111,1 -DA:114,1 +DA:110,1 +DA:112,1 DA:115,1 DA:116,1 -DA:119,1 +DA:117,1 DA:120,1 -DA:123,1 -DA:126,1 -DA:127,0 -DA:129,1 +DA:121,1 +DA:124,1 +DA:128,1 +DA:129,0 +DA:132,1 end_of_record