Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#6536: eliminate the instability of detachment on x86-64 platform #6579

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion suite/runsuite_wrapper.pl
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@
%ignore_failures_64 = (
'code_api|tool.drcacheoff.burst_threadfilter' => 1, # i#2941
'code_api|client.attach_test' => 1, # i#6452
'code_api|client.detach_test' => 1, # i#6536
# These are from the long suite.
'code_api,opt_memory|common.loglevel' => 1, # i#1807
'code_api,opt_speed|common.decode-stress' => 1, # i#1807
Expand Down
10 changes: 5 additions & 5 deletions suite/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ if (WIN32)
# we assume this error always means that it's that symlink:
cmd_result MATCHES "Access is denied")
set(GCC_IS_CYGWIN ON)
endif()
endif ()
endif (NOT GCC)
else (WIN32)
# i#215: if SELinux is enabled we'll use chcon to mark tests w/ text relocations
Expand Down Expand Up @@ -537,8 +537,8 @@ function(add_sve_flags target)
# string(REGEX REPLACE "-O[0-9]? " " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
# line above.
-O3)
endif()
endif()
endif ()
endif ()
endfunction(add_sve_flags)

function(add_exe test source)
Expand Down Expand Up @@ -708,7 +708,7 @@ function(tobuild_ci test source client_ops dr_ops exe_ops)
string(REGEX REPLACE "\\.c$" ".cpp" client_source "${client_source}")
endif ()
set(${test}_client_source ${client_source})
endif()
endif ()

if (NOT "${source}" MATCHES "\\.runall$")
# Many client tests don't care about the app that's run. To save time
Expand Down Expand Up @@ -1416,7 +1416,7 @@ function(torun test key source native standalone_dr dr_ops exe_ops added_out pas
set(exe_ops "${exe_ops};-v;-attach")
endif ()
if ("${runall}" MATCHES "<detach>")
set(exe_ops "${exe_ops};-v;")
set(exe_ops "${exe_ops};-v;-detach")
endif ()
if ("${runall}" MATCHES "<block>")
set(exe_ops "${exe_ops};-block")
Expand Down
4 changes: 0 additions & 4 deletions suite/tests/client-interface/detach_test.dll.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ dr_exit(void)
{
if (!saw_attach_event)
dr_fprintf(STDERR, "Error: never saw attach event!\n");
#ifdef WINDOWS
dr_fprintf(STDERR, "done\n");
#else
/* The app prints 'done' for us. */
#endif
}

static void
Expand Down
8 changes: 6 additions & 2 deletions suite/tests/linux/infloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@
#include <fcntl.h>
#include <sys/select.h>

bool for_attach = false, for_detach = false, block = false;

static void
signal_handler(int sig)
{
if (sig == SIGTERM) {
if (sig == SIGTERM && !for_detach) {
print("done\n");
}
exit(1);
Expand All @@ -59,7 +61,6 @@ main(int argc, const char *argv[])
{
int arg_offs = 1;
long long counter = 0;
bool for_attach = false, block = false;
while (arg_offs < argc && argv[arg_offs][0] == '-') {
if (strcmp(argv[arg_offs], "-v") == 0) {
/* enough verbosity to satisfy runall.cmake: needs an initial and a
Expand All @@ -71,6 +72,9 @@ main(int argc, const char *argv[])
} else if (strcmp(argv[arg_offs], "-attach") == 0) {
for_attach = true;
arg_offs++;
} else if (strcmp(argv[arg_offs], "-detach") == 0) {
for_detach = true;
arg_offs++;
} else if (strcmp(argv[arg_offs], "-block") == 0) {
block = true;
arg_offs++;
Expand Down
4 changes: 2 additions & 2 deletions suite/tests/runall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ if (UNIX)
set(detach_cmd drconfig)
else ()
set(detach_cmd drconfig.exe)
endif()
endif ()

if (UNIX)
set(MAX_ITERS 50000)
else ()
# Sleeping in longer units.
set(MAX_ITERS 1000)
endif()
endif ()

function (do_sleep ms)
if (UNIX)
Expand Down
Loading