forked from bwatkinson/xdd
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After updating the build system to CMake XDD was outputing the NUMA domain for each worker thread in the header of the output. This address that issue by printing that info in the event it is requested through the `-debug` flag. Since the `GO_DEBUG_USER1` global debug was never used, it was updated to be used for init debugging and changed to GO_DEBUG_INIT. So if the user does `-debug init` they will now see what cpus the worker threads have been pinned to. As part of the work, I also reorganized the test directory a bit. I made a separate debug test directory just to test out this functionality as it really did not make sense for it to be in the fuctional test cases. I placed all the common test CMake variables in the CMakeLists.txt and then just added individual test information in the functional and debug CMakeLists.txt files. Fixes #13 Signed-off-by: Brian Atkinson <batkinson@lanl.gov>
- Loading branch information
1 parent
12ecc0b
commit d048249
Showing
26 changed files
with
136 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,35 @@ | ||
configure_file(common.sh common.sh) | ||
|
||
# original tests depended on xdd being installed | ||
option(TEST_INSTALLED "Use installed xdd for tests" ON) | ||
if (TEST_INSTALLED) | ||
set(XDD_EXEC "$<TARGET_FILE:xdd>") | ||
else() | ||
set(XDD_EXEC "${CMAKE_BINARY_DIR}/bin/xdd") | ||
endif() | ||
|
||
# configurable output directory | ||
set(TESTDIR "${CMAKE_BINARY_DIR}/test-dir" CACHE PATH "Where to place test files") | ||
add_custom_target(mk-test-dir ALL | ||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${TESTDIR}") | ||
|
||
# not configurable | ||
set(TESTDIR_TESTS "${TESTDIR}/tests") | ||
add_custom_target(mk-test-tests ALL | ||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${TESTDIR_TESTS}" | ||
DEPENDS mk-test-dir) | ||
set(TESTDIR_LOGS "${TESTDIR}/logs") | ||
add_custom_target(mk-test-logs ALL | ||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${TESTDIR_LOGS}" | ||
DEPENDS mk-test-dir) | ||
|
||
# generate config file | ||
file(GENERATE | ||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/test_config" | ||
CONTENT "XDDTEST_XDD_EXE=${XDD_EXEC} | ||
XDDTEST_LOCAL_MOUNT=${TESTDIR}/tests | ||
XDDTEST_OUTPUT_DIR=${TESTDIR}/logs" | ||
) | ||
|
||
add_subdirectory(functional) | ||
add_subdirectory(debug) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
set(DEBUG_TESTS | ||
test_xdd_debug_init.sh | ||
) | ||
|
||
foreach(TEST ${DEBUG_TESTS}) | ||
configure_file("${TEST}" "${TEST}" COPYONLY) | ||
add_test(NAME "${TEST}" | ||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${TEST} | ||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") | ||
set_tests_properties("${TEST}" PROPERTIES LABELS "debug") | ||
set_tests_properties("${TEST}" PROPERTIES SKIP_RETURN_CODE 255) | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Debug output test for XDD. | ||
# | ||
# Validate XDD header has worker thread NUMA cpus printed if requested | ||
# | ||
# Description - Just writes out to /dev/null using XDD with -debug INIT and verifies | ||
# that the NUMA cpus are listed if requested through the debug flag | ||
# | ||
# Source the test configuration environment | ||
# | ||
source ../test_config | ||
source ../common.sh | ||
|
||
initialize_test | ||
|
||
echo "Foobar and I am here motherfucker" | ||
|
||
${XDDTEST_XDD_EXE} -op write -reqsize 128 -numreqs 1 -targets 1 /dev/null -verbose -debug INIT \ | ||
2>&1 | grep "bound to NUMA node" | ||
|
||
if [[ $? -ne 0 ]]; then | ||
# test failed | ||
finalize_test 1 | ||
fi | ||
|
||
${XDDTEST_XDD_EXE} -op write -reqsize 128 -numreqs 1 -targets 1 /dev/null -verbose \ | ||
2>&1 | grep "bound to NUMA node" | ||
|
||
if [[ $? -ne 1 ]]; then | ||
# test failed | ||
finalize_test 1 | ||
fi | ||
|
||
# test passed | ||
finalize_test 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters