This repostiory includes a framework and test cases for testing race conditions in HeapStats and HotSpot VM.
- set HEAPSTATS_LIB environment variables to the heapstats shared object file
- Add directories of test cases to
testlist.txt - Run
testcase.sh
$ bash testcase.sh <file>
OR
$ bash testcase.sh <--clean|--result> <file>
<> are optional.
file: specify a test list file. You can ommit it if you aim to usetestlist.txt--clean: clear all test cases' results.--result: show a summary of all test cases' result (not run test).
When you use --clean and --result, you can also specify test cases by file.
command example:
export HEAPSTATS_LIB=/usr/lib64/heapstats/libheapstats-2.1.so.3
$ bash testcase.sh testlist.txt
- HeapStats : 2.1.*
- python : 2.*
- OS : Fedora
VMDeath/DataDumpRequest may fail because of JVM bug. If so, delete the test.
rm -rf VMDeath/DataDumpRequest
- Create a directory.
- Create a
buildenv.shto set environment for testing. - Write
test.pyand testcase such like as existing test codes.
buildenv.sh requires the following.
CLASSPATH- Classpath to build test code.
- Should write an absolute path.
MAINCLASS- A main class of test code.
JAVA_OPTS- Options for launching java process.
HEAPSTATS_CONF- Path to
heapstats.conffor testing
- Path to
- Command line to build test code.
- Import
common.pyon parent directory - Use
common.initialize()method with passing break point names and break condition as arguments
test.pywill touchtest-succeededwhen the test passed correctly. Otherwise, will touchtest-failedortest-timeout.testcase.sh --result <file>will show a summary of specified test cases's result as below.
Test summary:
Testcase1: succeeded
Testcase2: succeeded
Testcase3: failed
: