Skip to content

Commit

Permalink
rename sendfile to sendfiletest
Browse files Browse the repository at this point in the history
* prevents name clash on systems which have sendfile library (Solaris)
  • Loading branch information
Scott M Anderson authored and smanders committed Dec 27, 2020
1 parent 5896484 commit b355fff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ IF(APR_BUILD_TESTAPR)
# requirements.
SET(single_source_programs
test/echod.c
test/sendfile.c
test/sendfiletest.c
test/sockperf.c
test/testlockperf.c
test/testmutexscope.c
Expand Down Expand Up @@ -482,9 +482,9 @@ IF(APR_BUILD_TESTAPR)
# testlockperf takes forever on Windows with default counter limit
ADD_TEST(NAME testlockperf COMMAND testlockperf -c 50000)

# sendfile runs multiple times with different parameters.
# sendfiletest runs multiple times with different parameters.
FOREACH(sendfile_mode blocking nonblocking timeout)
ADD_TEST(NAME sendfile-${sendfile_mode} COMMAND sendfile client ${sendfile_mode} startserver)
ADD_TEST(NAME sendfiletest-${sendfile_mode} COMMAND sendfiletest client ${sendfile_mode} startserver)
ENDFOREACH()

# No test is added for echod+sockperf. Those will have to be run manually.
Expand Down
6 changes: 3 additions & 3 deletions test/sendfile.c → test/sendfiletest.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ static void spawn_server(apr_pool_t *p, apr_proc_t *out_proc)
aprerr("apr_procattr_error_check_set()", rv);
}

args[0] = "sendfile" EXTENSION;
args[0] = "sendfiletest" EXTENSION;
args[1] = "server";
args[2] = NULL;
rv = apr_proc_create(&proc, TESTBINPATH "sendfile" EXTENSION, args, NULL, procattr, p);
rv = apr_proc_create(&proc, TESTBINPATH "sendfiletest" EXTENSION, args, NULL, procattr, p);
if (rv != APR_SUCCESS) {
aprerr("apr_proc_create()", rv);
}
Expand Down Expand Up @@ -508,7 +508,7 @@ static int client(apr_pool_t *p, client_socket_mode_t socket_mode,
aprerr("apr_proc_wait() (expected APR_CHILD_DONE)", rv);
}
if (exitcode != 0) {
fprintf(stderr, "sendfile server returned %d\n", exitcode);
fprintf(stderr, "sendfiletest server returned %d\n", exitcode);
exit(1);
}
}
Expand Down

0 comments on commit b355fff

Please sign in to comment.