DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Analyzing run-time behavior

Searching for undocumented options

First, examine the function main() to see what parts of the code are not executed. Use the -x option to lprof to highlight the unexecuted lines:

             		while((c=getopt(argc, argv, "blcnsvi")) != EOF)
         [32]			switch(c) {
             			case 'v':
     [U] [34]				vflag++;
             				break;
             			case 'c':
         [37]				cflag++;
             				break;
             			case 'n':
         [40]				nflag++;
             				break;
             			case 'b':
         [43]				bflag++;
             				break;
             			case 's':
         [46]				sflag++;
             				break;
             			case 'l':
         [49]				lflag++;
             				break;
             			case 'i':
         [52]				iflag++;
             				break;
             			case '?':
     [U] [55]				errflg++;
         [56]			}

Fragment of Output from lprof -x

The output shows that the -v option was not tested. By checking the documentation you can confirm that -v is an undocumented option. To correct this, create a test that exercises the -v option and add the -v option to the manual page.


Next topic: Functions that are never called
Previous topic: lprof Summary Output for a Test Suite

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005