Skip to content

Commit

Permalink
Change linux/infloop to linux.infloop when it is used as the name of …
Browse files Browse the repository at this point in the history
…an executable.
  • Loading branch information
ivankyluk committed Jan 21, 2025
1 parent f4a9dbf commit 256f492
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
6 changes: 3 additions & 3 deletions suite/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
13 changes: 8 additions & 5 deletions suite/tests/common/fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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 */
Expand All @@ -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
}

/*
Expand Down
25 changes: 12 additions & 13 deletions suite/tests/common/tool.drcov.fib.template
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 256f492

Please sign in to comment.