-a | Display all unexecuted code even if not covered by a weaker measure. All measures are considered equal except that function entry is weaker than all others; all are weaker than decision except c-use and p-use; and all are weaker than c-use and p-use. By default, only code whose components are covered by a weaker measure are displayed. (For example, an unexecuted block is not displayed if the function containing that block was never entered.) | ||
-c test-name | |||
Present a comparison of coverage with that of named test cases. Code is considered covered only if it is not also covered by the named test cases. Wild cards may be used in the test case name. On UNIX, wild cards are the same as those used for file names by sh (*, ?, and [...]). Quote marks may be needed to prevent the shell from expanding the test name as file names. Multiple test-cases may also be specified by repeating the -c option. | |||
-C | Present execution counts. | ||
-D | Generate debugging output. | ||
-f | Present coverage summary on a per function basis (implies -s). | ||
-F function | |||
Present coverage for C subroutine named function. Wild cards may be used in the function name (see -c option). Multiple functions may also be specified by repeating the -F option. | |||
-g | Present coverage summary on a per source file basis (implies -s). | ||
-h | Suppress column headings (used with -s, and -C). | ||
-K | Include test cost in coverage summary (implies -s and -p). | ||
-iIgnore time stamps on source files and .atac files. By default, atac issues an error
if source files have been
modified since execution of a test represented in the .trace file.
| | ||
-I | Include code ATAC considers unreachable. By default, this code is not counted nor highlighted in displays. | ||
-J | Include code embedded in a preprocessor macro expansion. By default, this code is not counted nor highlighted in displays. | ||
-m{bBcdefIJprRTuUY}... | |||
Specifies the coverage measures to be used: | |||
b | Block - code fragments not containing control flow branching or function calls. | ||
B | Basic Block - code fragments not containing control flow branching. | ||
c | C-use - (computational use) pairs of blocks for which the first block contains an assignment to a variable and the second block contains a use of that variable in a computation. | ||
d | Decision - pairs of blocks for which the first block ends at a control flow branch and the second block is a target of one of these branches. | ||
e | Function entry - covered when the function is entered at least once. | ||
f | Function call - individual function calls. | ||
Ffunction | |||
Named function call - function calls matching function. Wild cards may be used in the function name (see -c option). Multiple test cases may also be specified by repeating the -mF option. | |||
I | Infeasible code - code ATAC considers unreachable. | ||
J | Macro internals - code embedded in a preprocessor macro expansion. | ||
p | P-use - (predicate use) triples of blocks for which the first block contains an assignment to a variable, the second block ends at a control flow branch based on a predicate containing that variable, and the third block is a target of one of these branches. | ||
r | Return - explicit or implicit function return or call to _exit, _longjmp, abort, exit, longjmp, siglongjmp, if available. | ||
R | Not reached - code marked with /*NOTREACHED*/. | ||
T | Not tested - code marked with /*NOTTESTED:reason*/. | ||
u | All-uses - sum of p-use and c-use. | ||
U | Not instrumented - uninstrumented code (not normally present). | ||
Y | Performance critical - code marked with /*TIMECRITICAL*/. | ||
-M | Present a minimal cost set of test cases that achieves the same coverage, for the specified coverage measure, as all cases together (implies -s and -p). | ||
-n test-name | |||
Present coverage for named test cases only. (See also -x option.) Wild cards may be used in the function name (see -c option). Multiple test cases may also be specified by repeating the -n option. | |||
-p | Present coverage summary on a per test case basis (implies -s). | ||
-q | Present cumulative coverage per test case (implies -s and -p). | ||
-Q | Sort test cases in order of increasing cost per additional coverage. Present cumulative coverage per test case. Include test cost in coverage summary. Same as -qSK (implies -s and -p). | ||
-r | Reverse the display criteria; display only covered code. | ||
-R | Include code marked with /*NOTREACHED*/. By default, this code is not counted nor highlighted in displays. | ||
-s | Present coverage summary. | ||
-S | Sort test cases in order of decreasing additional coverage per unit cost (implies -s and -p). | ||
-t | Present coverage summary on a per test case basis - non zero only. | ||
-T | Include code marked with /*NOTTESTED:reason*/. By default, this code is not counted nor highlighted in displays. | ||
-u | Use underscoring instead of other standout mode for source code highlighting. | ||
-U | Include uninstrumented code. In unusual situations some code may not be instrumented. By default, this code is not counted nor highlighted in displays. | ||
-v | Display Toolsuite release number. | ||
-x | Exclude test cases specified by -c and -n options. Include all unspecified test cases. | ||
-Y | Exclude code marked /*TIMECRITICAL*/. This code is not instrumented so that instrumentation will not interfere with performance. By default, this code is counted as not covered and highlighted in displays. |
compile src1.c and src2.c with atac - save the executable as testprog testprog < data atac -s -f src1.atac src2.atac testprog.trace atac src1.atac src2.atac testprog.trace
atac cc -o testprog src1.c src2.c other.o testprog < data atac -s -f src1.atac src2.atac testprog.trace atac src1.atac src2.atac testprog.trace
-c cost | |||
Assign cost to test cases specified with -n test-name. Test case cost is used by atac -M. | |||
-d | Delete test cases specified with -n test-name. | ||
-D | Generate debugging output. | ||
-e | Extract test cases specified with -n test-name. | ||
-I | List test case names. If output is to a terminal, names are formatted into columns. If -n test-name is specified, only selected test cases are listed. | ||
-L | List test cases with time stamp, duration, ATAC release, cost, attributes, and test name. Attributes are described below. If a test has not been compressed, the name of the temporary trace file is also listed. If -n test-name is specified, only selected test cases are listed. | ||
-n test-name | |||
Select test cases matching test-name (See also -x.) Wild cards may be used in test-name. On UNIX, wild cards are the same as those used for file names by sh (*, ?, and [...]). Quote marks may be needed to prevent the shell from expanding the test name as file names. Multiple test cases may also be specified by repeating the -n option. | |||
-r new-test-name | |||
Rename test cases specified with -n test-name. If -n test-name is omitted, all test cases are renamed. Test case names are composed of alphanumeric characters and underscore. A numeric suffix is appended to distinguish test cases with the same name. | |||
-x | Include only test cases not selected by -n options. | ||
The attributes displayed with the -L option are each a single positional character with the following fields. The default value in each field is a dash. | |||
count forked blockonly busy missing corrupt uncompressed error end start | |||
The possible values are: | |||
count f | |||
Execution counts are not available due to abnormal termination. | |||
forked F (UNIX only) | |||
Process called fork in uninstrumented code. Test contains data for parent and child processes. | |||
blockonly B | |||
Only block coverage data is available for this test. | |||
busy i | |||
Some coverage may have been lost in a signal handler routine due to interruption of user level code. | |||
missing m | |||
Uncompressed data for this test is missing. (Named temporary trace file has been deleted or is not accessible.) | |||
corrupt c | |||
Temporary trace file for this test has been corrupted. Coverage data may be missing. | |||
corrupt v | |||
This test was created by a program compiled with an obsolete version of ATAC. Coverage from this test is ignored. | |||
uncompressed u | |||
This test has not been compressed. | |||
uncompressed r | |||
This test has not been compressed and is apparently still running. | |||
error M | |||
Process ran out of memory during this test. | |||
error O/V | |||
Process has linked one or more object files compiled with an obsolete version of ATAC. Coverage in those files is ignored. | |||
error S | |||
ATAC runtime routine encountered errors during this test. | |||
error T | |||
Process could not open temporary trace file during this test. | |||
end/start C | |||
Test ended/started by calling atac_restart(). | |||
end/start O/N (UNIX only) | |||
Test ended/started by calling fork in instrumented code. | |||
end/start R (UNIX only) | |||
Test ended/started by receiving the signal indicated in the ATAC_SIGNAL environment variable in instrumented code. |
atactm -l prog.trace
prog.1 prog.2 prog.3
compile src.c with atac and save the executable as testprog testprog < data atacdiff src.c src.c.old atac -s -f src.atac src.dif testprog.trace
compile src.c with atac and save the executable as testprog testprog < data1 testprog < data2 testprog < data3 atacdiff src.c src.c.new atac -t src.atac src.dif testprog.trace
atac cc -c wc.c atac cc -c main.c atac cc -g wc.o main.o atacid wc.c main.c wordcount.trace
wc.o:wc.c instrumented by ATAC release 1.0 main.o:main.c instrumented by ATAC release 1.0 wordcount:ATAC var ATACUMASK= wordcount:ATAC var ATACTRACE=wordcount wordcount:ATAC var ATACTMP= wordcount:ATAC var ATACTESTFILE= wordcount:ATAC var ATACTEST= wordcount:ATAC var ATACSIGNAL= wordcount:ATAC var ATACNOTRACE= wordcount:ATAC var ATACDIR= wordcount:ATAC var ATACCOST= wordcount:ATAC var ATACCOMPRESS=yes wordcount:ATAC var ATACBLOCKONLY= wordcount:ATAC linked env vars: wordcount:wc.c instrumented by ATAC release 1.0 wordcount:main.c instrumented by ATAC release 1.0 wordcount:ATAC runtime (release 1.0) wordcount:ATAC runtime unbuffered IO
atac cc -c wc.c atac cc -c main.c atac_env_create ATAC_TRACE=wc.trace ATAC_COMPRESS=no ld -o wordcount wc.o main.o atac_env.o `ataclib`/atac_rt.o /lib/crt0.o -lc
atacCL src1.c src2.c other.obj /link /out:testprog.exe set ATAC_TRACE=testprog testprog < data atac /s /f src1.atac src2.atac testprog.trace atac src1.atac src2.atac testprog.trace
atacICC src1.c src2.c other.obj /link /out:testprog.exe set ATAC_TRACE=testprog testprog < data atac /s /f src1.atac src2.atac testprog.trace atac src1.atac src2.atac testprog.trace
atac -u -v is: