1#! /bin/sh 2# Generated from testsuite.at by GNU Autoconf 2.69. 3# 4# Copyright (C) 2009-2012 Free Software Foundation, Inc. 5# 6# This test suite is free software; the Free Software Foundation gives 7# unlimited permission to copy, distribute and modify it. 8## -------------------- ## 9## M4sh Initialization. ## 10## -------------------- ## 11 12# Be more Bourne compatible 13DUALCASE=1; export DUALCASE # for MKS sh 14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 15 emulate sh 16 NULLCMD=: 17 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 18 # is contrary to our usage. Disable this feature. 19 alias -g '${1+"$@"}'='"$@"' 20 setopt NO_GLOB_SUBST 21else 22 case `(set -o) 2>/dev/null` in #( 23 *posix*) : 24 set -o posix ;; #( 25 *) : 26 ;; 27esac 28fi 29 30 31as_nl=' 32' 33export as_nl 34# Printing a long string crashes Solaris 7 /usr/bin/printf. 35as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 36as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 37as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 38# Prefer a ksh shell builtin over an external printf program on Solaris, 39# but without wasting forks for bash or zsh. 40if test -z "$BASH_VERSION$ZSH_VERSION" \ 41 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 42 as_echo='print -r --' 43 as_echo_n='print -rn --' 44elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 45 as_echo='printf %s\n' 46 as_echo_n='printf %s' 47else 48 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 49 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 50 as_echo_n='/usr/ucb/echo -n' 51 else 52 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 53 as_echo_n_body='eval 54 arg=$1; 55 case $arg in #( 56 *"$as_nl"*) 57 expr "X$arg" : "X\\(.*\\)$as_nl"; 58 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 59 esac; 60 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 61 ' 62 export as_echo_n_body 63 as_echo_n='sh -c $as_echo_n_body as_echo' 64 fi 65 export as_echo_body 66 as_echo='sh -c $as_echo_body as_echo' 67fi 68 69# The user is always right. 70if test "${PATH_SEPARATOR+set}" != set; then 71 PATH_SEPARATOR=: 72 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 73 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 74 PATH_SEPARATOR=';' 75 } 76fi 77 78 79# IFS 80# We need space, tab and new line, in precisely that order. Quoting is 81# there to prevent editors from complaining about space-tab. 82# (If _AS_PATH_WALK were called with IFS unset, it would disable word 83# splitting by setting IFS to empty value.) 84IFS=" "" $as_nl" 85 86# Find who we are. Look in the path if we contain no directory separator. 87as_myself= 88case $0 in #(( 89 *[\\/]* ) as_myself=$0 ;; 90 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 91for as_dir in $PATH 92do 93 IFS=$as_save_IFS 94 test -z "$as_dir" && as_dir=. 95 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 96 done 97IFS=$as_save_IFS 98 99 ;; 100esac 101# We did not find ourselves, most probably we were run as `sh COMMAND' 102# in which case we are not to be found in the path. 103if test "x$as_myself" = x; then 104 as_myself=$0 105fi 106if test ! -f "$as_myself"; then 107 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 108 exit 1 109fi 110 111# Unset variables that we do not need and which cause bugs (e.g. in 112# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 113# suppresses any "Segmentation fault" message there. '((' could 114# trigger a bug in pdksh 5.2.14. 115for as_var in BASH_ENV ENV MAIL MAILPATH 116do eval test x\${$as_var+set} = xset \ 117 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 118done 119PS1='$ ' 120PS2='> ' 121PS4='+ ' 122 123# NLS nuisances. 124LC_ALL=C 125export LC_ALL 126LANGUAGE=C 127export LANGUAGE 128 129# CDPATH. 130(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 131 132if test "x$CONFIG_SHELL" = x; then 133 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 134 emulate sh 135 NULLCMD=: 136 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 137 # is contrary to our usage. Disable this feature. 138 alias -g '\${1+\"\$@\"}'='\"\$@\"' 139 setopt NO_GLOB_SUBST 140else 141 case \`(set -o) 2>/dev/null\` in #( 142 *posix*) : 143 set -o posix ;; #( 144 *) : 145 ;; 146esac 147fi 148" 149 as_required="as_fn_return () { (exit \$1); } 150as_fn_success () { as_fn_return 0; } 151as_fn_failure () { as_fn_return 1; } 152as_fn_ret_success () { return 0; } 153as_fn_ret_failure () { return 1; } 154 155exitcode=0 156as_fn_success || { exitcode=1; echo as_fn_success failed.; } 157as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 158as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 159as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 160if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 161 162else 163 exitcode=1; echo positional parameters were not saved. 164fi 165test x\$exitcode = x0 || exit 1 166test -x / || exit 1" 167 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 168 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 169 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 170 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 171test \$(( 1 + 1 )) = 2 || exit 1" 172 if (eval "$as_required") 2>/dev/null; then : 173 as_have_required=yes 174else 175 as_have_required=no 176fi 177 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 178 179else 180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 181as_found=false 182for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 183do 184 IFS=$as_save_IFS 185 test -z "$as_dir" && as_dir=. 186 as_found=: 187 case $as_dir in #( 188 /*) 189 for as_base in sh bash ksh sh5; do 190 # Try only shells that exist, to save several forks. 191 as_shell=$as_dir/$as_base 192 if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 193 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 194 CONFIG_SHELL=$as_shell as_have_required=yes 195 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 196 break 2 197fi 198fi 199 done;; 200 esac 201 as_found=false 202done 203$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 204 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 205 CONFIG_SHELL=$SHELL as_have_required=yes 206fi; } 207IFS=$as_save_IFS 208 209 210 if test "x$CONFIG_SHELL" != x; then : 211 export CONFIG_SHELL 212 # We cannot yet assume a decent shell, so we have to provide a 213# neutralization value for shells without unset; and this also 214# works around shells that cannot unset nonexistent variables. 215# Preserve -v and -x to the replacement shell. 216BASH_ENV=/dev/null 217ENV=/dev/null 218(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 219case $- in # (((( 220 *v*x* | *x*v* ) as_opts=-vx ;; 221 *v* ) as_opts=-v ;; 222 *x* ) as_opts=-x ;; 223 * ) as_opts= ;; 224esac 225exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 226# Admittedly, this is quite paranoid, since all the known shells bail 227# out after a failed `exec'. 228$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 229exit 255 230fi 231 232 if test x$as_have_required = xno; then : 233 $as_echo "$0: This script requires a shell more modern than all" 234 $as_echo "$0: the shells that I found on your system." 235 if test x${ZSH_VERSION+set} = xset ; then 236 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 237 $as_echo "$0: be upgraded to zsh 4.3.4 or later." 238 else 239 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, 240$0: including any error possibly output before this 241$0: message. Then install a modern shell, or manually run 242$0: the script under such a shell if you do have one." 243 fi 244 exit 1 245fi 246fi 247fi 248SHELL=${CONFIG_SHELL-/bin/sh} 249export SHELL 250# Unset more variables known to interfere with behavior of common tools. 251CLICOLOR_FORCE= GREP_OPTIONS= 252unset CLICOLOR_FORCE GREP_OPTIONS 253 254## --------------------- ## 255## M4sh Shell Functions. ## 256## --------------------- ## 257# as_fn_unset VAR 258# --------------- 259# Portably unset VAR. 260as_fn_unset () 261{ 262 { eval $1=; unset $1;} 263} 264as_unset=as_fn_unset 265 266# as_fn_set_status STATUS 267# ----------------------- 268# Set $? to STATUS, without forking. 269as_fn_set_status () 270{ 271 return $1 272} # as_fn_set_status 273 274# as_fn_exit STATUS 275# ----------------- 276# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 277as_fn_exit () 278{ 279 set +e 280 as_fn_set_status $1 281 exit $1 282} # as_fn_exit 283 284# as_fn_mkdir_p 285# ------------- 286# Create "$as_dir" as a directory, including parents if necessary. 287as_fn_mkdir_p () 288{ 289 290 case $as_dir in #( 291 -*) as_dir=./$as_dir;; 292 esac 293 test -d "$as_dir" || eval $as_mkdir_p || { 294 as_dirs= 295 while :; do 296 case $as_dir in #( 297 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 298 *) as_qdir=$as_dir;; 299 esac 300 as_dirs="'$as_qdir' $as_dirs" 301 as_dir=`$as_dirname -- "$as_dir" || 302$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 303 X"$as_dir" : 'X\(//\)[^/]' \| \ 304 X"$as_dir" : 'X\(//\)$' \| \ 305 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 306$as_echo X"$as_dir" | 307 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 308 s//\1/ 309 q 310 } 311 /^X\(\/\/\)[^/].*/{ 312 s//\1/ 313 q 314 } 315 /^X\(\/\/\)$/{ 316 s//\1/ 317 q 318 } 319 /^X\(\/\).*/{ 320 s//\1/ 321 q 322 } 323 s/.*/./; q'` 324 test -d "$as_dir" && break 325 done 326 test -z "$as_dirs" || eval "mkdir $as_dirs" 327 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 328 329 330} # as_fn_mkdir_p 331 332# as_fn_executable_p FILE 333# ----------------------- 334# Test if FILE is an executable regular file. 335as_fn_executable_p () 336{ 337 test -f "$1" && test -x "$1" 338} # as_fn_executable_p 339# as_fn_append VAR VALUE 340# ---------------------- 341# Append the text in VALUE to the end of the definition contained in VAR. Take 342# advantage of any shell optimizations that allow amortized linear growth over 343# repeated appends, instead of the typical quadratic growth present in naive 344# implementations. 345if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 346 eval 'as_fn_append () 347 { 348 eval $1+=\$2 349 }' 350else 351 as_fn_append () 352 { 353 eval $1=\$$1\$2 354 } 355fi # as_fn_append 356 357# as_fn_arith ARG... 358# ------------------ 359# Perform arithmetic evaluation on the ARGs, and store the result in the 360# global $as_val. Take advantage of shells that can avoid forks. The arguments 361# must be portable across $(()) and expr. 362if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 363 eval 'as_fn_arith () 364 { 365 as_val=$(( $* )) 366 }' 367else 368 as_fn_arith () 369 { 370 as_val=`expr "$@" || test $? -eq 1` 371 } 372fi # as_fn_arith 373 374 375# as_fn_error STATUS ERROR [LINENO LOG_FD] 376# ---------------------------------------- 377# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 378# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 379# script with STATUS, using 1 if that was 0. 380as_fn_error () 381{ 382 as_status=$1; test $as_status -eq 0 && as_status=1 383 if test "$4"; then 384 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 385 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 386 fi 387 $as_echo "$as_me: error: $2" >&2 388 as_fn_exit $as_status 389} # as_fn_error 390 391if expr a : '\(a\)' >/dev/null 2>&1 && 392 test "X`expr 00001 : '.*\(...\)'`" = X001; then 393 as_expr=expr 394else 395 as_expr=false 396fi 397 398if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 399 as_basename=basename 400else 401 as_basename=false 402fi 403 404as_me=`$as_basename -- "$0" || 405$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 406 X"$0" : 'X\(//\)$' \| \ 407 X"$0" : 'X\(/\)' \| . 2>/dev/null || 408$as_echo X/"$0" | 409 sed '/^.*\/\([^/][^/]*\)\/*$/{ 410 s//\1/ 411 q 412 } 413 /^X\/\(\/\/\)$/{ 414 s//\1/ 415 q 416 } 417 /^X\/\(\/\).*/{ 418 s//\1/ 419 q 420 } 421 s/.*/./; q'` 422 423if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 424 as_dirname=dirname 425else 426 as_dirname=false 427fi 428 429# Avoid depending upon Character Ranges. 430as_cr_letters='abcdefghijklmnopqrstuvwxyz' 431as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 432as_cr_Letters=$as_cr_letters$as_cr_LETTERS 433as_cr_digits='0123456789' 434as_cr_alnum=$as_cr_Letters$as_cr_digits 435 436 437 as_lineno_1=$LINENO as_lineno_1a=$LINENO 438 as_lineno_2=$LINENO as_lineno_2a=$LINENO 439 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 440 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 441 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 442 sed -n ' 443 p 444 /[$]LINENO/= 445 ' <$as_myself | 446 sed ' 447 s/[$]LINENO.*/&-/ 448 t lineno 449 b 450 :lineno 451 N 452 :loop 453 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 454 t loop 455 s/-\n.*// 456 ' >$as_me.lineno && 457 chmod +x "$as_me.lineno" || 458 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 459 460 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have 461 # already done that, so ensure we don't try to do so again and fall 462 # in an infinite loop. This has already happened in practice. 463 _as_can_reexec=no; export _as_can_reexec 464 # Don't try to exec as it changes $[0], causing all sort of problems 465 # (the dirname of $[0] is not the place where we might find the 466 # original and so on. Autoconf is especially sensitive to this). 467 . "./$as_me.lineno" 468 # Exit status is that of the last command. 469 exit 470} 471 472ECHO_C= ECHO_N= ECHO_T= 473case `echo -n x` in #((((( 474-n*) 475 case `echo 'xy\c'` in 476 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 477 xy) ECHO_C='\c';; 478 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 479 ECHO_T=' ';; 480 esac;; 481*) 482 ECHO_N='-n';; 483esac 484 485rm -f conf$$ conf$$.exe conf$$.file 486if test -d conf$$.dir; then 487 rm -f conf$$.dir/conf$$.file 488else 489 rm -f conf$$.dir 490 mkdir conf$$.dir 2>/dev/null 491fi 492if (echo >conf$$.file) 2>/dev/null; then 493 if ln -s conf$$.file conf$$ 2>/dev/null; then 494 as_ln_s='ln -s' 495 # ... but there are two gotchas: 496 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 497 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 498 # In both cases, we have to default to `cp -pR'. 499 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 500 as_ln_s='cp -pR' 501 elif ln conf$$.file conf$$ 2>/dev/null; then 502 as_ln_s=ln 503 else 504 as_ln_s='cp -pR' 505 fi 506else 507 as_ln_s='cp -pR' 508fi 509rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 510rmdir conf$$.dir 2>/dev/null 511 512if mkdir -p . 2>/dev/null; then 513 as_mkdir_p='mkdir -p "$as_dir"' 514else 515 test -d ./-p && rmdir ./-p 516 as_mkdir_p=false 517fi 518 519as_test_x='test -x' 520as_executable_p=as_fn_executable_p 521 522# Sed expression to map a string onto a valid CPP name. 523as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 524 525# Sed expression to map a string onto a valid variable name. 526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 527 528 529 530 531 532SHELL=${CONFIG_SHELL-/bin/sh} 533 534# How were we run? 535at_cli_args="$@" 536 537 538# Not all shells have the 'times' builtin; the subshell is needed to make 539# sure we discard the 'times: not found' message from the shell. 540at_times_p=false 541(times) >/dev/null 2>&1 && at_times_p=: 542 543# CLI Arguments to pass to the debugging scripts. 544at_debug_args= 545# -e sets to true 546at_errexit_p=false 547# Shall we be verbose? ':' means no, empty means yes. 548at_verbose=: 549at_quiet= 550# Running several jobs in parallel, 0 means as many as test groups. 551at_jobs=1 552at_traceon=: 553at_trace_echo=: 554at_check_filter_trace=: 555 556# Shall we keep the debug scripts? Must be `:' when the suite is 557# run by a debug script, so that the script doesn't remove itself. 558at_debug_p=false 559# Display help message? 560at_help_p=false 561# Display the version message? 562at_version_p=false 563# List test groups? 564at_list_p=false 565# --clean 566at_clean=false 567# Test groups to run 568at_groups= 569# Whether to rerun failed tests. 570at_recheck= 571# Whether a write failure occurred 572at_write_fail=0 573 574# The directory we run the suite in. Default to . if no -C option. 575at_dir=`pwd` 576# An absolute reference to this testsuite script. 577case $as_myself in 578 [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;; 579 * ) at_myself=$at_dir/$as_myself ;; 580esac 581# Whether -C is in effect. 582at_change_dir=false 583 584# Whether to enable colored test results. 585at_color=no 586# List of the tested programs. 587at_tested='cflow' 588# As many question marks as there are digits in the last test group number. 589# Used to normalize the test group numbers so that `ls' lists them in 590# numerical order. 591at_format='??' 592# Description of all the test groups. 593at_help_all="1;version.at:17;cflow version;version; 5942;direct.at:17;direct tree;direct; 5953;reverse.at:17;reverse tree;reverse; 5964;recurse.at:17;recursive calls;recurse; 5975;attr.at:17;attribute handling;attr; 5986;awrapper.at:17;attribute wrapper handling;awrapper; 5997;pwrapper.at:17;parameter wrapper handling;pwrapper; 6008;knr.at:17;K&R style function declarations;knr; 6019;fdecl.at:17;forward function declarations;fdecl; 60210;static.at:17;Static symbols with forward decls and -i^s;static fdecl; 60311;include.at:17;included symbols;include; 60412;ssblock.at:17;static struct in block scope;ssblock; 60513;funcarg.at:17;functional arguments;funcarg; 60614;parm.at:17;function parameter handling;parm param; 60715;nfparg.at:19;nameless function pointer arguments;nfp nfparg function pointer arguments; 60816;nfarg.at:24;nameless function arguments;nfarg function arguments; 60917;hiding.at:17;hiding of global and file static identifiers;hiding; 61018;multi.at:17;multiple source files;multi; 61119;bartest.at:20;vertical bar in tree output;tree bartest; 61220;decl01.at:17;same type declaration;decl decl01; 61321;invalid.at:17;invalid input;invalid; 61422;memberof.at:17;member of;memberof; 61523;struct.at:19;struct definition followed by attribute;struct struct-attr attribute; 61624;struct.at:33;struct definition followed by wrapper;struct struct01 struct-wrapper wrapper; 61725;struct.at:49;ANSI C function returning a struct;struct struct02 ret-struct; 61826;struct.at:67;K&R C function returning a struct;struct struct03 ret-struct; 61927;struct.at:88;struct as argument;struct struct04 arg-struct; 62028;struct.at:100;struct variable;struct struct05 var-struct; 62129;struct.at:109;array of structs;struct struct06 arr-struct; 62230;typedef.at:19;structs with same members;typedef typedef00; 62331;typedef.at:19;structs with tags matching typedef;typedef typedef01; 62432;typedef.at:19;typedef to pointer;typedef typedef02; 62533;typedef.at:19;modifiers;typedef typedef03; 62634;all.at:20;default;all all-default all00; 62735;all.at:47;default (main present);all all-default-main all01; 62836;all.at:76;the --main option;all all--main all02; 62937;all.at:102;the --all option;all all--all all03; 63038;all.at:131;the --all --all option;all all--all--all all04; 63139;all.at:162;the --all option with main;all all--all-main all05; 63240;all.at:198;the --all --all option with main;all all--all--all-main all06; 63341;all.at:236;the --no-main option;all all--no-main all07; 63442;all.at:266;the --no-main option with main;all all--no-main-main all08; 635" 636# List of the all the test groups. 637at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'` 638 639# at_fn_validate_ranges NAME... 640# ----------------------------- 641# Validate and normalize the test group number contained in each variable 642# NAME. Leading zeroes are treated as decimal. 643at_fn_validate_ranges () 644{ 645 for at_grp 646 do 647 eval at_value=\$$at_grp 648 if test $at_value -lt 1 || test $at_value -gt 42; then 649 $as_echo "invalid test group: $at_value" >&2 650 exit 1 651 fi 652 case $at_value in 653 0*) # We want to treat leading 0 as decimal, like expr and test, but 654 # AS_VAR_ARITH treats it as octal if it uses $(( )). 655 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the 656 # expr fork, but it is not worth the effort to determine if the 657 # shell supports XSI when the user can just avoid leading 0. 658 eval $at_grp='`expr $at_value + 0`' ;; 659 esac 660 done 661} 662 663at_prev= 664for at_option 665do 666 # If the previous option needs an argument, assign it. 667 if test -n "$at_prev"; then 668 at_option=$at_prev=$at_option 669 at_prev= 670 fi 671 672 case $at_option in 673 *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;; 674 *) at_optarg= ;; 675 esac 676 677 # Accept the important Cygnus configure options, so we can diagnose typos. 678 679 case $at_option in 680 --help | -h ) 681 at_help_p=: 682 ;; 683 684 --list | -l ) 685 at_list_p=: 686 ;; 687 688 --version | -V ) 689 at_version_p=: 690 ;; 691 692 --clean | -c ) 693 at_clean=: 694 ;; 695 696 --color ) 697 at_color=always 698 ;; 699 --color=* ) 700 case $at_optarg in 701 no | never | none) at_color=never ;; 702 auto | tty | if-tty) at_color=auto ;; 703 always | yes | force) at_color=always ;; 704 *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'` 705 as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;; 706 esac 707 ;; 708 709 --debug | -d ) 710 at_debug_p=: 711 ;; 712 713 --errexit | -e ) 714 at_debug_p=: 715 at_errexit_p=: 716 ;; 717 718 --verbose | -v ) 719 at_verbose=; at_quiet=: 720 ;; 721 722 --trace | -x ) 723 at_traceon='set -x' 724 at_trace_echo=echo 725 at_check_filter_trace=at_fn_filter_trace 726 ;; 727 728 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]) 729 at_fn_validate_ranges at_option 730 as_fn_append at_groups "$at_option$as_nl" 731 ;; 732 733 # Ranges 734 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-) 735 at_range_start=`echo $at_option |tr -d X-` 736 at_fn_validate_ranges at_range_start 737 at_range=`$as_echo "$at_groups_all" | \ 738 sed -ne '/^'$at_range_start'$/,$p'` 739 as_fn_append at_groups "$at_range$as_nl" 740 ;; 741 742 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]) 743 at_range_end=`echo $at_option |tr -d X-` 744 at_fn_validate_ranges at_range_end 745 at_range=`$as_echo "$at_groups_all" | \ 746 sed -ne '1,/^'$at_range_end'$/p'` 747 as_fn_append at_groups "$at_range$as_nl" 748 ;; 749 750 [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \ 751 [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \ 752 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \ 753 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \ 754 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \ 755 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] ) 756 at_range_start=`expr $at_option : '\(.*\)-'` 757 at_range_end=`expr $at_option : '.*-\(.*\)'` 758 if test $at_range_start -gt $at_range_end; then 759 at_tmp=$at_range_end 760 at_range_end=$at_range_start 761 at_range_start=$at_tmp 762 fi 763 at_fn_validate_ranges at_range_start at_range_end 764 at_range=`$as_echo "$at_groups_all" | \ 765 sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'` 766 as_fn_append at_groups "$at_range$as_nl" 767 ;; 768 769 # Directory selection. 770 --directory | -C ) 771 at_prev=--directory 772 ;; 773 --directory=* ) 774 at_change_dir=: 775 at_dir=$at_optarg 776 if test x- = "x$at_dir" ; then 777 at_dir=./- 778 fi 779 ;; 780 781 # Parallel execution. 782 --jobs | -j ) 783 at_jobs=0 784 ;; 785 --jobs=* | -j[0-9]* ) 786 if test -n "$at_optarg"; then 787 at_jobs=$at_optarg 788 else 789 at_jobs=`expr X$at_option : 'X-j\(.*\)'` 790 fi 791 case $at_jobs in *[!0-9]*) 792 at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'` 793 as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;; 794 esac 795 ;; 796 797 # Keywords. 798 --keywords | -k ) 799 at_prev=--keywords 800 ;; 801 --keywords=* ) 802 at_groups_selected=$at_help_all 803 at_save_IFS=$IFS 804 IFS=, 805 set X $at_optarg 806 shift 807 IFS=$at_save_IFS 808 for at_keyword 809 do 810 at_invert= 811 case $at_keyword in 812 '!'*) 813 at_invert="-v" 814 at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'` 815 ;; 816 esac 817 # It is on purpose that we match the test group titles too. 818 at_groups_selected=`$as_echo "$at_groups_selected" | 819 grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"` 820 done 821 # Smash the keywords. 822 at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'` 823 as_fn_append at_groups "$at_groups_selected$as_nl" 824 ;; 825 --recheck) 826 at_recheck=: 827 ;; 828 829 *=*) 830 at_envvar=`expr "x$at_option" : 'x\([^=]*\)='` 831 # Reject names that are not valid shell variable names. 832 case $at_envvar in 833 '' | [0-9]* | *[!_$as_cr_alnum]* ) 834 as_fn_error $? "invalid variable name: \`$at_envvar'" ;; 835 esac 836 at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` 837 # Export now, but save eval for later and for debug scripts. 838 export $at_envvar 839 as_fn_append at_debug_args " $at_envvar='$at_value'" 840 ;; 841 842 *) $as_echo "$as_me: invalid option: $at_option" >&2 843 $as_echo "Try \`$0 --help' for more information." >&2 844 exit 1 845 ;; 846 esac 847done 848 849# Verify our last option didn't require an argument 850if test -n "$at_prev"; then : 851 as_fn_error $? "\`$at_prev' requires an argument" 852fi 853 854# The file containing the suite. 855at_suite_log=$at_dir/$as_me.log 856 857# Selected test groups. 858if test -z "$at_groups$at_recheck"; then 859 at_groups=$at_groups_all 860else 861 if test -n "$at_recheck" && test -r "$at_suite_log"; then 862 at_oldfails=`sed -n ' 863 /^Failed tests:$/,/^Skipped tests:$/{ 864 s/^[ ]*\([1-9][0-9]*\):.*/\1/p 865 } 866 /^Unexpected passes:$/,/^## Detailed failed tests/{ 867 s/^[ ]*\([1-9][0-9]*\):.*/\1/p 868 } 869 /^## Detailed failed tests/q 870 ' "$at_suite_log"` 871 as_fn_append at_groups "$at_oldfails$as_nl" 872 fi 873 # Sort the tests, removing duplicates. 874 at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'` 875fi 876 877if test x"$at_color" = xalways \ 878 || { test x"$at_color" = xauto && test -t 1; }; then 879 at_red=`printf '\033[0;31m'` 880 at_grn=`printf '\033[0;32m'` 881 at_lgn=`printf '\033[1;32m'` 882 at_blu=`printf '\033[1;34m'` 883 at_std=`printf '\033[m'` 884else 885 at_red= at_grn= at_lgn= at_blu= at_std= 886fi 887 888# Help message. 889if $at_help_p; then 890 cat <<_ATEOF || at_write_fail=1 891Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS] 892 893Run all the tests, or the selected TESTS, given by numeric ranges, and 894save a detailed log file. Upon failure, create debugging scripts. 895 896Do not change environment variables directly. Instead, set them via 897command line arguments. Set \`AUTOTEST_PATH' to select the executables 898to exercise. Each relative directory is expanded as build and source 899directories relative to the top level of this distribution. 900E.g., from within the build directory /tmp/foo-1.0, invoking this: 901 902 $ $0 AUTOTEST_PATH=bin 903 904is equivalent to the following, assuming the source directory is /src/foo-1.0: 905 906 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0 907_ATEOF 908cat <<_ATEOF || at_write_fail=1 909 910Operation modes: 911 -h, --help print the help message, then exit 912 -V, --version print version number, then exit 913 -c, --clean remove all the files this test suite might create and exit 914 -l, --list describes all the tests, or the selected TESTS 915_ATEOF 916cat <<_ATEOF || at_write_fail=1 917 918Execution tuning: 919 -C, --directory=DIR 920 change to directory DIR before starting 921 --color[=never|auto|always] 922 enable colored test results on terminal, or always 923 -j, --jobs[=N] 924 Allow N jobs at once; infinite jobs with no arg (default 1) 925 -k, --keywords=KEYWORDS 926 select the tests matching all the comma-separated KEYWORDS 927 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD 928 --recheck select all tests that failed or passed unexpectedly last time 929 -e, --errexit abort as soon as a test fails; implies --debug 930 -v, --verbose force more detailed output 931 default for debugging scripts 932 -d, --debug inhibit clean up and top-level logging 933 default for debugging scripts 934 -x, --trace enable tests shell tracing 935_ATEOF 936cat <<_ATEOF || at_write_fail=1 937 938Report bugs to <bug-cflow@gnu.org>. 939General help using GNU software: <http://www.gnu.org/gethelp/>. 940_ATEOF 941 exit $at_write_fail 942fi 943 944# List of tests. 945if $at_list_p; then 946 cat <<_ATEOF || at_write_fail=1 947GNU cflow 1.6 test suite test groups: 948 949 NUM: FILE-NAME:LINE TEST-GROUP-NAME 950 KEYWORDS 951 952_ATEOF 953 # Pass an empty line as separator between selected groups and help. 954 $as_echo "$at_groups$as_nl$as_nl$at_help_all" | 955 awk 'NF == 1 && FS != ";" { 956 selected[$ 1] = 1 957 next 958 } 959 /^$/ { FS = ";" } 960 NF > 0 { 961 if (selected[$ 1]) { 962 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 963 if ($ 4) { 964 lmax = 79 965 indent = " " 966 line = indent 967 len = length (line) 968 n = split ($ 4, a, " ") 969 for (i = 1; i <= n; i++) { 970 l = length (a[i]) + 1 971 if (i > 1 && len + l > lmax) { 972 print line 973 line = indent " " a[i] 974 len = length (line) 975 } else { 976 line = line " " a[i] 977 len += l 978 } 979 } 980 if (n) 981 print line 982 } 983 } 984 }' || at_write_fail=1 985 exit $at_write_fail 986fi 987if $at_version_p; then 988 $as_echo "$as_me (GNU cflow 1.6)" && 989 cat <<\_ATEOF || at_write_fail=1 990 991Copyright (C) 2012 Free Software Foundation, Inc. 992This test suite is free software; the Free Software Foundation gives 993unlimited permission to copy, distribute and modify it. 994_ATEOF 995 exit $at_write_fail 996fi 997 998# Should we print banners? Yes if more than one test is run. 999case $at_groups in #( 1000 *$as_nl* ) 1001 at_print_banners=: ;; #( 1002 * ) at_print_banners=false ;; 1003esac 1004# Text for banner N, set to a single space once printed. 1005# Banner 1. struct.at:17 1006# Category starts at test group 23. 1007at_banner_text_1="struct" 1008# Banner 2. typedef.at:17 1009# Category starts at test group 30. 1010at_banner_text_2="typedefs" 1011# Banner 3. all.at:17 1012# Category starts at test group 34. 1013at_banner_text_3="all-functions mode" 1014 1015# Take any -C into account. 1016if $at_change_dir ; then 1017 test x != "x$at_dir" && cd "$at_dir" \ 1018 || as_fn_error $? "unable to change directory" 1019 at_dir=`pwd` 1020fi 1021 1022# Load the config files for any default variable assignments. 1023for at_file in atconfig atlocal 1024do 1025 test -r $at_file || continue 1026 . ./$at_file || as_fn_error $? "invalid content: $at_file" 1027done 1028 1029# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: 1030: "${at_top_build_prefix=$at_top_builddir}" 1031 1032# Perform any assignments requested during argument parsing. 1033eval "$at_debug_args" 1034 1035# atconfig delivers names relative to the directory the test suite is 1036# in, but the groups themselves are run in testsuite-dir/group-dir. 1037if test -n "$at_top_srcdir"; then 1038 builddir=../.. 1039 for at_dir_var in srcdir top_srcdir top_build_prefix 1040 do 1041 eval at_val=\$at_$at_dir_var 1042 case $at_val in 1043 [\\/$]* | ?:[\\/]* ) at_prefix= ;; 1044 *) at_prefix=../../ ;; 1045 esac 1046 eval "$at_dir_var=\$at_prefix\$at_val" 1047 done 1048fi 1049 1050## -------------------- ## 1051## Directory structure. ## 1052## -------------------- ## 1053 1054# This is the set of directories and files used by this script 1055# (non-literals are capitalized): 1056# 1057# TESTSUITE - the testsuite 1058# TESTSUITE.log - summarizes the complete testsuite run 1059# TESTSUITE.dir/ - created during a run, remains after -d or failed test 1060# + at-groups/ - during a run: status of all groups in run 1061# | + NNN/ - during a run: meta-data about test group NNN 1062# | | + check-line - location (source file and line) of current AT_CHECK 1063# | | + status - exit status of current AT_CHECK 1064# | | + stdout - stdout of current AT_CHECK 1065# | | + stder1 - stderr, including trace 1066# | | + stderr - stderr, with trace filtered out 1067# | | + test-source - portion of testsuite that defines group 1068# | | + times - timestamps for computing duration 1069# | | + pass - created if group passed 1070# | | + xpass - created if group xpassed 1071# | | + fail - created if group failed 1072# | | + xfail - created if group xfailed 1073# | | + skip - created if group skipped 1074# + at-stop - during a run: end the run if this file exists 1075# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction 1076# + 0..NNN/ - created for each group NNN, remains after -d or failed test 1077# | + TESTSUITE.log - summarizes the group results 1078# | + ... - files created during the group 1079 1080# The directory the whole suite works in. 1081# Should be absolute to let the user `cd' at will. 1082at_suite_dir=$at_dir/$as_me.dir 1083# The file containing the suite ($at_dir might have changed since earlier). 1084at_suite_log=$at_dir/$as_me.log 1085# The directory containing helper files per test group. 1086at_helper_dir=$at_suite_dir/at-groups 1087# Stop file: if it exists, do not start new jobs. 1088at_stop_file=$at_suite_dir/at-stop 1089# The fifo used for the job dispatcher. 1090at_job_fifo=$at_suite_dir/at-job-fifo 1091 1092if $at_clean; then 1093 test -d "$at_suite_dir" && 1094 find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; 1095 rm -f -r "$at_suite_dir" "$at_suite_log" 1096 exit $? 1097fi 1098 1099# Don't take risks: use only absolute directories in PATH. 1100# 1101# For stand-alone test suites (ie. atconfig was not found), 1102# AUTOTEST_PATH is relative to `.'. 1103# 1104# For embedded test suites, AUTOTEST_PATH is relative to the top level 1105# of the package. Then expand it into build/src parts, since users 1106# may create executables in both places. 1107AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"` 1108at_path= 1109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1110for as_dir in $AUTOTEST_PATH $PATH 1111do 1112 IFS=$as_save_IFS 1113 test -z "$as_dir" && as_dir=. 1114 test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR 1115case $as_dir in 1116 [\\/]* | ?:[\\/]* ) 1117 as_fn_append at_path "$as_dir" 1118 ;; 1119 * ) 1120 if test -z "$at_top_build_prefix"; then 1121 # Stand-alone test suite. 1122 as_fn_append at_path "$as_dir" 1123 else 1124 # Embedded test suite. 1125 as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR" 1126 as_fn_append at_path "$at_top_srcdir/$as_dir" 1127 fi 1128 ;; 1129esac 1130 done 1131IFS=$as_save_IFS 1132 1133 1134# Now build and simplify PATH. 1135# 1136# There might be directories that don't exist, but don't redirect 1137# builtins' (eg., cd) stderr directly: Ultrix's sh hates that. 1138at_new_path= 1139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1140for as_dir in $at_path 1141do 1142 IFS=$as_save_IFS 1143 test -z "$as_dir" && as_dir=. 1144 test -d "$as_dir" || continue 1145case $as_dir in 1146 [\\/]* | ?:[\\/]* ) ;; 1147 * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; 1148esac 1149case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in 1150 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; 1151 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; 1152 *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;; 1153esac 1154 done 1155IFS=$as_save_IFS 1156 1157PATH=$at_new_path 1158export PATH 1159 1160# Setting up the FDs. 1161 1162 1163 1164# 5 is the log file. Not to be overwritten if `-d'. 1165if $at_debug_p; then 1166 at_suite_log=/dev/null 1167else 1168 : >"$at_suite_log" 1169fi 1170exec 5>>"$at_suite_log" 1171 1172# Banners and logs. 1173$as_echo "## ------------------------- ## 1174## GNU cflow 1.6 test suite. ## 1175## ------------------------- ##" 1176{ 1177 $as_echo "## ------------------------- ## 1178## GNU cflow 1.6 test suite. ## 1179## ------------------------- ##" 1180 echo 1181 1182 $as_echo "$as_me: command line was:" 1183 $as_echo " \$ $0 $at_cli_args" 1184 echo 1185 1186 # If ChangeLog exists, list a few lines in case it might help determining 1187 # the exact version. 1188 if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then 1189 $as_echo "## ---------- ## 1190## ChangeLog. ## 1191## ---------- ##" 1192 echo 1193 sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog" 1194 echo 1195 fi 1196 1197 { 1198cat <<_ASUNAME 1199## --------- ## 1200## Platform. ## 1201## --------- ## 1202 1203hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 1204uname -m = `(uname -m) 2>/dev/null || echo unknown` 1205uname -r = `(uname -r) 2>/dev/null || echo unknown` 1206uname -s = `(uname -s) 2>/dev/null || echo unknown` 1207uname -v = `(uname -v) 2>/dev/null || echo unknown` 1208 1209/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 1210/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 1211 1212/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 1213/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 1214/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 1215/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 1216/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 1217/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1218/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1219 1220_ASUNAME 1221 1222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1223for as_dir in $PATH 1224do 1225 IFS=$as_save_IFS 1226 test -z "$as_dir" && as_dir=. 1227 $as_echo "PATH: $as_dir" 1228 done 1229IFS=$as_save_IFS 1230 1231} 1232 echo 1233 1234 # Contents of the config files. 1235 for at_file in atconfig atlocal 1236 do 1237 test -r $at_file || continue 1238 $as_echo "$as_me: $at_file:" 1239 sed 's/^/| /' $at_file 1240 echo 1241 done 1242} >&5 1243 1244 1245## ------------------------- ## 1246## Autotest shell functions. ## 1247## ------------------------- ## 1248 1249# at_fn_banner NUMBER 1250# ------------------- 1251# Output banner NUMBER, provided the testsuite is running multiple groups and 1252# this particular banner has not yet been printed. 1253at_fn_banner () 1254{ 1255 $at_print_banners || return 0 1256 eval at_banner_text=\$at_banner_text_$1 1257 test "x$at_banner_text" = "x " && return 0 1258 eval "at_banner_text_$1=\" \"" 1259 if test -z "$at_banner_text"; then 1260 $at_first || echo 1261 else 1262 $as_echo "$as_nl$at_banner_text$as_nl" 1263 fi 1264} # at_fn_banner 1265 1266# at_fn_check_prepare_notrace REASON LINE 1267# --------------------------------------- 1268# Perform AT_CHECK preparations for the command at LINE for an untraceable 1269# command; REASON is the reason for disabling tracing. 1270at_fn_check_prepare_notrace () 1271{ 1272 $at_trace_echo "Not enabling shell tracing (command contains $1)" 1273 $as_echo "$2" >"$at_check_line_file" 1274 at_check_trace=: at_check_filter=: 1275 : >"$at_stdout"; : >"$at_stderr" 1276} 1277 1278# at_fn_check_prepare_trace LINE 1279# ------------------------------ 1280# Perform AT_CHECK preparations for the command at LINE for a traceable 1281# command. 1282at_fn_check_prepare_trace () 1283{ 1284 $as_echo "$1" >"$at_check_line_file" 1285 at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace 1286 : >"$at_stdout"; : >"$at_stderr" 1287} 1288 1289# at_fn_check_prepare_dynamic COMMAND LINE 1290# ---------------------------------------- 1291# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate 1292# preparation function. 1293at_fn_check_prepare_dynamic () 1294{ 1295 case $1 in 1296 *$as_nl*) 1297 at_fn_check_prepare_notrace 'an embedded newline' "$2" ;; 1298 *) 1299 at_fn_check_prepare_trace "$2" ;; 1300 esac 1301} 1302 1303# at_fn_filter_trace 1304# ------------------ 1305# Remove the lines in the file "$at_stderr" generated by "set -x" and print 1306# them to stderr. 1307at_fn_filter_trace () 1308{ 1309 mv "$at_stderr" "$at_stder1" 1310 grep '^ *+' "$at_stder1" >&2 1311 grep -v '^ *+' "$at_stder1" >"$at_stderr" 1312} 1313 1314# at_fn_log_failure FILE-LIST 1315# --------------------------- 1316# Copy the files in the list on stdout with a "> " prefix, and exit the shell 1317# with a failure exit code. 1318at_fn_log_failure () 1319{ 1320 for file 1321 do $as_echo "$file:"; sed 's/^/> /' "$file"; done 1322 echo 1 > "$at_status_file" 1323 exit 1 1324} 1325 1326# at_fn_check_skip EXIT-CODE LINE 1327# ------------------------------- 1328# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit 1329# the test group subshell with that same exit code. Use LINE in any report 1330# about test failure. 1331at_fn_check_skip () 1332{ 1333 case $1 in 1334 99) echo 99 > "$at_status_file"; at_failed=: 1335 $as_echo "$2: hard failure"; exit 99;; 1336 77) echo 77 > "$at_status_file"; exit 77;; 1337 esac 1338} 1339 1340# at_fn_check_status EXPECTED EXIT-CODE LINE 1341# ------------------------------------------ 1342# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing. 1343# Otherwise, if it is 77 or 99, exit the test group subshell with that same 1344# exit code; if it is anything else print an error message referring to LINE, 1345# and fail the test. 1346at_fn_check_status () 1347{ 1348 case $2 in 1349 $1 ) ;; 1350 77) echo 77 > "$at_status_file"; exit 77;; 1351 99) echo 99 > "$at_status_file"; at_failed=: 1352 $as_echo "$3: hard failure"; exit 99;; 1353 *) $as_echo "$3: exit code was $2, expected $1" 1354 at_failed=:;; 1355 esac 1356} 1357 1358# at_fn_diff_devnull FILE 1359# ----------------------- 1360# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff 1361# invocations. 1362at_fn_diff_devnull () 1363{ 1364 test -s "$1" || return 0 1365 $at_diff "$at_devnull" "$1" 1366} 1367 1368# at_fn_test NUMBER 1369# ----------------- 1370# Parse out test NUMBER from the tail of this file. 1371at_fn_test () 1372{ 1373 eval at_sed=\$at_sed$1 1374 sed "$at_sed" "$at_myself" > "$at_test_source" 1375} 1376 1377# at_fn_create_debugging_script 1378# ----------------------------- 1379# Create the debugging script $at_group_dir/run which will reproduce the 1380# current test group. 1381at_fn_create_debugging_script () 1382{ 1383 { 1384 echo "#! /bin/sh" && 1385 echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' && 1386 $as_echo "cd '$at_dir'" && 1387 $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" && 1388 echo 'exit 1' 1389 } >"$at_group_dir/run" && 1390 chmod +x "$at_group_dir/run" 1391} 1392 1393## -------------------------------- ## 1394## End of autotest shell functions. ## 1395## -------------------------------- ## 1396{ 1397 $as_echo "## ---------------- ## 1398## Tested programs. ## 1399## ---------------- ##" 1400 echo 1401} >&5 1402 1403# Report what programs are being tested. 1404for at_program in : $at_tested 1405do 1406 test "$at_program" = : && continue 1407 case $at_program in 1408 [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;; 1409 * ) 1410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1411for as_dir in $PATH 1412do 1413 IFS=$as_save_IFS 1414 test -z "$as_dir" && as_dir=. 1415 test -f "$as_dir/$at_program" && break 1416 done 1417IFS=$as_save_IFS 1418 1419 at_program_=$as_dir/$at_program ;; 1420 esac 1421 if test -f "$at_program_"; then 1422 { 1423 $as_echo "$at_srcdir/testsuite.at:50: $at_program_ --version" 1424 "$at_program_" --version </dev/null 1425 echo 1426 } >&5 2>&1 1427 else 1428 as_fn_error $? "cannot find $at_program" "$LINENO" 5 1429 fi 1430done 1431 1432{ 1433 $as_echo "## ------------------ ## 1434## Running the tests. ## 1435## ------------------ ##" 1436} >&5 1437 1438at_start_date=`date` 1439at_start_time=`date +%s 2>/dev/null` 1440$as_echo "$as_me: starting at: $at_start_date" >&5 1441 1442# Create the master directory if it doesn't already exist. 1443as_dir="$at_suite_dir"; as_fn_mkdir_p || 1444 as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5 1445 1446# Can we diff with `/dev/null'? DU 5.0 refuses. 1447if diff /dev/null /dev/null >/dev/null 2>&1; then 1448 at_devnull=/dev/null 1449else 1450 at_devnull=$at_suite_dir/devnull 1451 >"$at_devnull" 1452fi 1453 1454# Use `diff -u' when possible. 1455if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff" 1456then 1457 at_diff='diff -u' 1458else 1459 at_diff=diff 1460fi 1461 1462# Get the last needed group. 1463for at_group in : $at_groups; do :; done 1464 1465# Extract the start and end lines of each test group at the tail 1466# of this file 1467awk ' 1468BEGIN { FS="" } 1469/^#AT_START_/ { 1470 start = NR 1471} 1472/^#AT_STOP_/ { 1473 test = substr ($ 0, 10) 1474 print "at_sed" test "=\"1," start "d;" (NR-1) "q\"" 1475 if (test == "'"$at_group"'") exit 1476}' "$at_myself" > "$at_suite_dir/at-source-lines" && 1477. "$at_suite_dir/at-source-lines" || 1478 as_fn_error $? "cannot create test line number cache" "$LINENO" 5 1479rm -f "$at_suite_dir/at-source-lines" 1480 1481# Set number of jobs for `-j'; avoid more jobs than test groups. 1482set X $at_groups; shift; at_max_jobs=$# 1483if test $at_max_jobs -eq 0; then 1484 at_jobs=1 1485fi 1486if test $at_jobs -ne 1 && 1487 { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then 1488 at_jobs=$at_max_jobs 1489fi 1490 1491# If parallel mode, don't output banners, don't split summary lines. 1492if test $at_jobs -ne 1; then 1493 at_print_banners=false 1494 at_quiet=: 1495fi 1496 1497# Set up helper dirs. 1498rm -rf "$at_helper_dir" && 1499mkdir "$at_helper_dir" && 1500cd "$at_helper_dir" && 1501{ test -z "$at_groups" || mkdir $at_groups; } || 1502as_fn_error $? "testsuite directory setup failed" "$LINENO" 5 1503 1504# Functions for running a test group. We leave the actual 1505# test group execution outside of a shell function in order 1506# to avoid hitting zsh 4.x exit status bugs. 1507 1508# at_fn_group_prepare 1509# ------------------- 1510# Prepare for running a test group. 1511at_fn_group_prepare () 1512{ 1513 # The directory for additional per-group helper files. 1514 at_job_dir=$at_helper_dir/$at_group 1515 # The file containing the location of the last AT_CHECK. 1516 at_check_line_file=$at_job_dir/check-line 1517 # The file containing the exit status of the last command. 1518 at_status_file=$at_job_dir/status 1519 # The files containing the output of the tested commands. 1520 at_stdout=$at_job_dir/stdout 1521 at_stder1=$at_job_dir/stder1 1522 at_stderr=$at_job_dir/stderr 1523 # The file containing the code for a test group. 1524 at_test_source=$at_job_dir/test-source 1525 # The file containing dates. 1526 at_times_file=$at_job_dir/times 1527 1528 # Be sure to come back to the top test directory. 1529 cd "$at_suite_dir" 1530 1531 # Clearly separate the test groups when verbose. 1532 $at_first || $at_verbose echo 1533 1534 at_group_normalized=$at_group 1535 1536 eval 'while :; do 1537 case $at_group_normalized in #( 1538 '"$at_format"'*) break;; 1539 esac 1540 at_group_normalized=0$at_group_normalized 1541 done' 1542 1543 1544 # Create a fresh directory for the next test group, and enter. 1545 # If one already exists, the user may have invoked ./run from 1546 # within that directory; we remove the contents, but not the 1547 # directory itself, so that we aren't pulling the rug out from 1548 # under the shell's notion of the current directory. 1549 at_group_dir=$at_suite_dir/$at_group_normalized 1550 at_group_log=$at_group_dir/$as_me.log 1551 if test -d "$at_group_dir"; then 1552 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \; 1553 rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??* 1554fi || 1555 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5 1556$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;} 1557 # Be tolerant if the above `rm' was not able to remove the directory. 1558 as_dir="$at_group_dir"; as_fn_mkdir_p 1559 1560 echo 0 > "$at_status_file" 1561 1562 # In verbose mode, append to the log file *and* show on 1563 # the standard output; in quiet mode only write to the log. 1564 if test -z "$at_verbose"; then 1565 at_tee_pipe='tee -a "$at_group_log"' 1566 else 1567 at_tee_pipe='cat >> "$at_group_log"' 1568 fi 1569} 1570 1571# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER] 1572# ------------------------------------------------- 1573# Declare the test group ORDINAL, located at LINE with group description DESC, 1574# and residing under BANNER. Use PAD to align the status column. 1575at_fn_group_banner () 1576{ 1577 at_setup_line="$2" 1578 test -n "$5" && at_fn_banner $5 1579 at_desc="$3" 1580 case $1 in 1581 [0-9]) at_desc_line=" $1: ";; 1582 [0-9][0-9]) at_desc_line=" $1: " ;; 1583 *) at_desc_line="$1: " ;; 1584 esac 1585 as_fn_append at_desc_line "$3$4" 1586 $at_quiet $as_echo_n "$at_desc_line" 1587 echo "# -*- compilation -*-" >> "$at_group_log" 1588} 1589 1590# at_fn_group_postprocess 1591# ----------------------- 1592# Perform cleanup after running a test group. 1593at_fn_group_postprocess () 1594{ 1595 # Be sure to come back to the suite directory, in particular 1596 # since below we might `rm' the group directory we are in currently. 1597 cd "$at_suite_dir" 1598 1599 if test ! -f "$at_check_line_file"; then 1600 sed "s/^ */$as_me: WARNING: /" <<_ATEOF 1601 A failure happened in a test group before any test could be 1602 run. This means that test suite is improperly designed. Please 1603 report this failure to <bug-cflow@gnu.org>. 1604_ATEOF 1605 $as_echo "$at_setup_line" >"$at_check_line_file" 1606 at_status=99 1607 fi 1608 $at_verbose $as_echo_n "$at_group. $at_setup_line: " 1609 $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log" 1610 case $at_xfail:$at_status in 1611 yes:0) 1612 at_msg="UNEXPECTED PASS" 1613 at_res=xpass 1614 at_errexit=$at_errexit_p 1615 at_color=$at_red 1616 ;; 1617 no:0) 1618 at_msg="ok" 1619 at_res=pass 1620 at_errexit=false 1621 at_color=$at_grn 1622 ;; 1623 *:77) 1624 at_msg='skipped ('`cat "$at_check_line_file"`')' 1625 at_res=skip 1626 at_errexit=false 1627 at_color=$at_blu 1628 ;; 1629 no:* | *:99) 1630 at_msg='FAILED ('`cat "$at_check_line_file"`')' 1631 at_res=fail 1632 at_errexit=$at_errexit_p 1633 at_color=$at_red 1634 ;; 1635 yes:*) 1636 at_msg='expected failure ('`cat "$at_check_line_file"`')' 1637 at_res=xfail 1638 at_errexit=false 1639 at_color=$at_lgn 1640 ;; 1641 esac 1642 echo "$at_res" > "$at_job_dir/$at_res" 1643 # In parallel mode, output the summary line only afterwards. 1644 if test $at_jobs -ne 1 && test -n "$at_verbose"; then 1645 $as_echo "$at_desc_line $at_color$at_msg$at_std" 1646 else 1647 # Make sure there is a separator even with long titles. 1648 $as_echo " $at_color$at_msg$at_std" 1649 fi 1650 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" 1651 case $at_status in 1652 0|77) 1653 # $at_times_file is only available if the group succeeded. 1654 # We're not including the group log, so the success message 1655 # is written in the global log separately. But we also 1656 # write to the group log in case they're using -d. 1657 if test -f "$at_times_file"; then 1658 at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' 1659 rm -f "$at_times_file" 1660 fi 1661 $as_echo "$at_log_msg" >> "$at_group_log" 1662 $as_echo "$at_log_msg" >&5 1663 1664 # Cleanup the group directory, unless the user wants the files 1665 # or the success was unexpected. 1666 if $at_debug_p || test $at_res = xpass; then 1667 at_fn_create_debugging_script 1668 if test $at_res = xpass && $at_errexit; then 1669 echo stop > "$at_stop_file" 1670 fi 1671 else 1672 if test -d "$at_group_dir"; then 1673 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; 1674 rm -fr "$at_group_dir" 1675 fi 1676 rm -f "$at_test_source" 1677 fi 1678 ;; 1679 *) 1680 # Upon failure, include the log into the testsuite's global 1681 # log. The failure message is written in the group log. It 1682 # is later included in the global log. 1683 $as_echo "$at_log_msg" >> "$at_group_log" 1684 1685 # Upon failure, keep the group directory for autopsy, and create 1686 # the debugging script. With -e, do not start any further tests. 1687 at_fn_create_debugging_script 1688 if $at_errexit; then 1689 echo stop > "$at_stop_file" 1690 fi 1691 ;; 1692 esac 1693} 1694 1695 1696## ------------ ## 1697## Driver loop. ## 1698## ------------ ## 1699 1700 1701if (set -m && set +m && set +b) >/dev/null 2>&1; then 1702 set +b 1703 at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=- 1704else 1705 at_job_control_on=: at_job_control_off=: at_job_group= 1706fi 1707 1708for at_signal in 1 2 15; do 1709 trap 'set +x; set +e 1710 $at_job_control_off 1711 at_signal='"$at_signal"' 1712 echo stop > "$at_stop_file" 1713 trap "" $at_signal 1714 at_pgids= 1715 for at_pgid in `jobs -p 2>/dev/null`; do 1716 at_pgids="$at_pgids $at_job_group$at_pgid" 1717 done 1718 test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null 1719 wait 1720 if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then 1721 echo >&2 1722 fi 1723 at_signame=`kill -l $at_signal 2>&1 || echo $at_signal` 1724 set x $at_signame 1725 test 0 -gt 2 && at_signame=$at_signal 1726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5 1727$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;} 1728 as_fn_arith 128 + $at_signal && exit_status=$as_val 1729 as_fn_exit $exit_status' $at_signal 1730done 1731 1732rm -f "$at_stop_file" 1733at_first=: 1734 1735if test $at_jobs -ne 1 && 1736 rm -f "$at_job_fifo" && 1737 test -n "$at_job_group" && 1738 ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null 1739then 1740 # FIFO job dispatcher. 1741 1742 trap 'at_pids= 1743 for at_pid in `jobs -p`; do 1744 at_pids="$at_pids $at_job_group$at_pid" 1745 done 1746 if test -n "$at_pids"; then 1747 at_sig=TSTP 1748 test "${TMOUT+set}" = set && at_sig=STOP 1749 kill -$at_sig $at_pids 2>/dev/null 1750 fi 1751 kill -STOP $$ 1752 test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP 1753 1754 echo 1755 # Turn jobs into a list of numbers, starting from 1. 1756 at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p` 1757 1758 set X $at_joblist 1759 shift 1760 for at_group in $at_groups; do 1761 $at_job_control_on 2>/dev/null 1762 ( 1763 # Start one test group. 1764 $at_job_control_off 1765 if $at_first; then 1766 exec 7>"$at_job_fifo" 1767 else 1768 exec 6<&- 1769 fi 1770 trap 'set +x; set +e 1771 trap "" PIPE 1772 echo stop > "$at_stop_file" 1773 echo >&7 1774 as_fn_exit 141' PIPE 1775 at_fn_group_prepare 1776 if cd "$at_group_dir" && 1777 at_fn_test $at_group && 1778 . "$at_test_source" 1779 then :; else 1780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 1781$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} 1782 at_failed=: 1783 fi 1784 at_fn_group_postprocess 1785 echo >&7 1786 ) & 1787 $at_job_control_off 1788 if $at_first; then 1789 at_first=false 1790 exec 6<"$at_job_fifo" 7>"$at_job_fifo" 1791 fi 1792 shift # Consume one token. 1793 if test $# -gt 0; then :; else 1794 read at_token <&6 || break 1795 set x $* 1796 fi 1797 test -f "$at_stop_file" && break 1798 done 1799 exec 7>&- 1800 # Read back the remaining ($at_jobs - 1) tokens. 1801 set X $at_joblist 1802 shift 1803 if test $# -gt 0; then 1804 shift 1805 for at_job 1806 do 1807 read at_token 1808 done <&6 1809 fi 1810 exec 6<&- 1811 wait 1812else 1813 # Run serially, avoid forks and other potential surprises. 1814 for at_group in $at_groups; do 1815 at_fn_group_prepare 1816 if cd "$at_group_dir" && 1817 at_fn_test $at_group && 1818 . "$at_test_source"; then :; else 1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 1820$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} 1821 at_failed=: 1822 fi 1823 at_fn_group_postprocess 1824 test -f "$at_stop_file" && break 1825 at_first=false 1826 done 1827fi 1828 1829# Wrap up the test suite with summary statistics. 1830cd "$at_helper_dir" 1831 1832# Use ?..???? when the list must remain sorted, the faster * otherwise. 1833at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'` 1834at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'` 1835at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'` 1836at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do 1837 echo $f; done | sed '/?/d; s,/xpass,,'` 1838at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do 1839 echo $f; done | sed '/?/d; s,/fail,,'` 1840 1841set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list 1842shift; at_group_count=$# 1843set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$* 1844set X $at_xfail_list; shift; at_xfail_count=$# 1845set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$* 1846set X $at_skip_list; shift; at_skip_count=$# 1847 1848as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val 1849as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val 1850as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val 1851 1852# Back to the top directory. 1853cd "$at_dir" 1854rm -rf "$at_helper_dir" 1855 1856# Compute the duration of the suite. 1857at_stop_date=`date` 1858at_stop_time=`date +%s 2>/dev/null` 1859$as_echo "$as_me: ending at: $at_stop_date" >&5 1860case $at_start_time,$at_stop_time in 1861 [0-9]*,[0-9]*) 1862 as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val 1863 as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val 1864 as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val 1865 as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val 1866 as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val 1867 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" 1868 $as_echo "$as_me: test suite duration: $at_duration" >&5 1869 ;; 1870esac 1871 1872echo 1873$as_echo "## ------------- ## 1874## Test results. ## 1875## ------------- ##" 1876echo 1877{ 1878 echo 1879 $as_echo "## ------------- ## 1880## Test results. ## 1881## ------------- ##" 1882 echo 1883} >&5 1884 1885if test $at_run_count = 1; then 1886 at_result="1 test" 1887 at_were=was 1888else 1889 at_result="$at_run_count tests" 1890 at_were=were 1891fi 1892if $at_errexit_p && test $at_unexpected_count != 0; then 1893 if test $at_xpass_count = 1; then 1894 at_result="$at_result $at_were run, one passed" 1895 else 1896 at_result="$at_result $at_were run, one failed" 1897 fi 1898 at_result="$at_result unexpectedly and inhibited subsequent tests." 1899 at_color=$at_red 1900else 1901 # Don't you just love exponential explosion of the number of cases? 1902 at_color=$at_red 1903 case $at_xpass_count:$at_fail_count:$at_xfail_count in 1904 # So far, so good. 1905 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;; 1906 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;; 1907 1908 # Some unexpected failures 1909 0:*:0) at_result="$at_result $at_were run, 1910$at_fail_count failed unexpectedly." ;; 1911 1912 # Some failures, both expected and unexpected 1913 0:*:1) at_result="$at_result $at_were run, 1914$at_total_fail_count failed ($at_xfail_count expected failure)." ;; 1915 0:*:*) at_result="$at_result $at_were run, 1916$at_total_fail_count failed ($at_xfail_count expected failures)." ;; 1917 1918 # No unexpected failures, but some xpasses 1919 *:0:*) at_result="$at_result $at_were run, 1920$at_xpass_count passed unexpectedly." ;; 1921 1922 # No expected failures, but failures and xpasses 1923 *:1:0) at_result="$at_result $at_were run, 1924$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;; 1925 *:*:0) at_result="$at_result $at_were run, 1926$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;; 1927 1928 # All of them. 1929 *:*:1) at_result="$at_result $at_were run, 1930$at_xpass_count passed unexpectedly, 1931$at_total_fail_count failed ($at_xfail_count expected failure)." ;; 1932 *:*:*) at_result="$at_result $at_were run, 1933$at_xpass_count passed unexpectedly, 1934$at_total_fail_count failed ($at_xfail_count expected failures)." ;; 1935 esac 1936 1937 if test $at_skip_count = 0 && test $at_run_count -gt 1; then 1938 at_result="All $at_result" 1939 fi 1940fi 1941 1942# Now put skips in the mix. 1943case $at_skip_count in 1944 0) ;; 1945 1) at_result="$at_result 19461 test was skipped." ;; 1947 *) at_result="$at_result 1948$at_skip_count tests were skipped." ;; 1949esac 1950 1951if test $at_unexpected_count = 0; then 1952 echo "$at_color$at_result$at_std" 1953 echo "$at_result" >&5 1954else 1955 echo "${at_color}ERROR: $at_result$at_std" >&2 1956 echo "ERROR: $at_result" >&5 1957 { 1958 echo 1959 $as_echo "## ------------------------ ## 1960## Summary of the failures. ## 1961## ------------------------ ##" 1962 1963 # Summary of failed and skipped tests. 1964 if test $at_fail_count != 0; then 1965 echo "Failed tests:" 1966 $SHELL "$at_myself" $at_fail_list --list 1967 echo 1968 fi 1969 if test $at_skip_count != 0; then 1970 echo "Skipped tests:" 1971 $SHELL "$at_myself" $at_skip_list --list 1972 echo 1973 fi 1974 if test $at_xpass_count != 0; then 1975 echo "Unexpected passes:" 1976 $SHELL "$at_myself" $at_xpass_list --list 1977 echo 1978 fi 1979 if test $at_fail_count != 0; then 1980 $as_echo "## ---------------------- ## 1981## Detailed failed tests. ## 1982## ---------------------- ##" 1983 echo 1984 for at_group in $at_fail_list 1985 do 1986 at_group_normalized=$at_group 1987 1988 eval 'while :; do 1989 case $at_group_normalized in #( 1990 '"$at_format"'*) break;; 1991 esac 1992 at_group_normalized=0$at_group_normalized 1993 done' 1994 1995 cat "$at_suite_dir/$at_group_normalized/$as_me.log" 1996 echo 1997 done 1998 echo 1999 fi 2000 if test -n "$at_top_srcdir"; then 2001 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 2002## ${at_top_build_prefix}config.log ## 2003_ASBOX 2004 sed 's/^/| /' ${at_top_build_prefix}config.log 2005 echo 2006 fi 2007 } >&5 2008 2009 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 2010## $as_me.log was created. ## 2011_ASBOX 2012 2013 echo 2014 if $at_debug_p; then 2015 at_msg='per-test log files' 2016 else 2017 at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'" 2018 fi 2019 $as_echo "Please send $at_msg and all information you think might help: 2020 2021 To: <bug-cflow@gnu.org> 2022 Subject: [GNU cflow 1.6] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} 2023 2024You may investigate any problem if you feel able to do so, in which 2025case the test suite provides a good starting point. Its output may 2026be found below \`${at_testdir+${at_testdir}/}$as_me.dir'. 2027" 2028 exit 1 2029fi 2030 2031exit 0 2032 2033## ------------- ## 2034## Actual tests. ## 2035## ------------- ## 2036#AT_START_1 2037at_fn_group_banner 1 'version.at:17' \ 2038 "cflow version" " " 2039at_xfail=no 2040( 2041 $as_echo "1. $at_setup_line: testing $at_desc ..." 2042 $at_traceon 2043 2044 2045 2046{ set +x 2047$as_echo "$at_srcdir/version.at:20: cflow --version | sed 1q" 2048at_fn_check_prepare_notrace 'a shell pipeline' "version.at:20" 2049( $at_check_trace; cflow --version | sed 1q 2050) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2051at_status=$? at_failed=false 2052$at_check_filter 2053at_fn_diff_devnull "$at_stderr" || at_failed=: 2054echo >>"$at_stdout"; $as_echo "cflow (GNU cflow) 1.6 2055" | \ 2056 $at_diff - "$at_stdout" || at_failed=: 2057at_fn_check_status 0 $at_status "$at_srcdir/version.at:20" 2058if $at_failed; then : 2059 2060echo '==============================================================' 2061echo 'WARNING: Not using the proper version, *all* checks dubious...' 2062echo '==============================================================' 2063 2064fi 2065$at_failed && at_fn_log_failure 2066$at_traceon; } 2067 2068 2069 set +x 2070 $at_times_p && times >"$at_times_file" 2071) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2072read at_status <"$at_status_file" 2073#AT_STOP_1 2074#AT_START_2 2075at_fn_group_banner 2 'direct.at:17' \ 2076 "direct tree" " " 2077at_xfail=no 2078( 2079 $as_echo "2. $at_setup_line: testing $at_desc ..." 2080 $at_traceon 2081 2082 2083 2084 2085cat >prog <<'_ATEOF' 2086 2087foo() 2088{ 2089} 2090 2091bar() 2092{ 2093 foo(); 2094} 2095 2096main() 2097{ 2098 bar(); 2099 foo(); 2100} 2101 2102_ATEOF 2103 2104 2105cat >expout <<'_ATEOF' 2106main() <main () at prog:11>: 2107 bar() <bar () at prog:6>: 2108 foo() <foo () at prog:2> 2109 foo() <foo () at prog:2> 2110_ATEOF 2111 2112{ set +x 2113$as_echo "$at_srcdir/direct.at:20: cflow prog" 2114at_fn_check_prepare_trace "direct.at:20" 2115( $at_check_trace; cflow prog 2116) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2117at_status=$? at_failed=false 2118$at_check_filter 2119at_fn_diff_devnull "$at_stderr" || at_failed=: 2120$at_diff expout "$at_stdout" || at_failed=: 2121at_fn_check_status 0 $at_status "$at_srcdir/direct.at:20" 2122$at_failed && at_fn_log_failure 2123$at_traceon; } 2124 2125 2126 set +x 2127 $at_times_p && times >"$at_times_file" 2128) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2129read at_status <"$at_status_file" 2130#AT_STOP_2 2131#AT_START_3 2132at_fn_group_banner 3 'reverse.at:17' \ 2133 "reverse tree" " " 2134at_xfail=no 2135( 2136 $as_echo "3. $at_setup_line: testing $at_desc ..." 2137 $at_traceon 2138 2139 2140 2141 2142 2143 2144 2145 2146cat >prog <<'_ATEOF' 2147 2148foo() 2149{ 2150} 2151 2152bar() 2153{ 2154 foo(); 2155} 2156 2157main() 2158{ 2159 bar(); 2160 foo(); 2161} 2162 2163_ATEOF 2164 2165 2166cat >expout <<'_ATEOF' 2167bar() <bar () at prog:6>: 2168 main() <main () at prog:11> 2169foo() <foo () at prog:2>: 2170 bar() <bar () at prog:6>: 2171 main() <main () at prog:11> 2172 main() <main () at prog:11> 2173main() <main () at prog:11> 2174_ATEOF 2175 2176{ set +x 2177$as_echo "$at_srcdir/reverse.at:20: cflow -r prog" 2178at_fn_check_prepare_trace "reverse.at:20" 2179( $at_check_trace; cflow -r prog 2180) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2181at_status=$? at_failed=false 2182$at_check_filter 2183at_fn_diff_devnull "$at_stderr" || at_failed=: 2184$at_diff expout "$at_stdout" || at_failed=: 2185at_fn_check_status 0 $at_status "$at_srcdir/reverse.at:20" 2186$at_failed && at_fn_log_failure 2187$at_traceon; } 2188 2189 2190 2191 set +x 2192 $at_times_p && times >"$at_times_file" 2193) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2194read at_status <"$at_status_file" 2195#AT_STOP_3 2196#AT_START_4 2197at_fn_group_banner 4 'recurse.at:17' \ 2198 "recursive calls" " " 2199at_xfail=no 2200( 2201 $as_echo "4. $at_setup_line: testing $at_desc ..." 2202 $at_traceon 2203 2204 2205 2206 2207cat >prog <<'_ATEOF' 2208 2209foo() 2210{ 2211 bar(); 2212} 2213 2214bar() 2215{ 2216 bar(); 2217 foo(); 2218} 2219 2220main() 2221{ 2222 bar(); 2223} 2224 2225_ATEOF 2226 2227 2228cat >expout <<'_ATEOF' 2229main() <main () at prog:13>: 2230 bar() <bar () at prog:7> (R): 2231 bar() <bar () at prog:7> (recursive: see 2) 2232 foo() <foo () at prog:2> (R): 2233 bar() <bar () at prog:7> (recursive: see 2) 2234_ATEOF 2235 2236{ set +x 2237$as_echo "$at_srcdir/recurse.at:20: cflow prog" 2238at_fn_check_prepare_trace "recurse.at:20" 2239( $at_check_trace; cflow prog 2240) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2241at_status=$? at_failed=false 2242$at_check_filter 2243at_fn_diff_devnull "$at_stderr" || at_failed=: 2244$at_diff expout "$at_stdout" || at_failed=: 2245at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:20" 2246$at_failed && at_fn_log_failure 2247$at_traceon; } 2248 2249 2250 set +x 2251 $at_times_p && times >"$at_times_file" 2252) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2253read at_status <"$at_status_file" 2254#AT_STOP_4 2255#AT_START_5 2256at_fn_group_banner 5 'attr.at:17' \ 2257 "attribute handling" " " 2258at_xfail=no 2259( 2260 $as_echo "5. $at_setup_line: testing $at_desc ..." 2261 $at_traceon 2262 2263 2264 2265 2266 2267 2268 2269# Early versions of cflow coredumped on this output 2270 2271cat >prog <<'_ATEOF' 2272 2273extern main() __attribute__((noreturn)); 2274 2275main() 2276{ 2277 foo(); 2278} 2279 2280_ATEOF 2281 2282 2283cat >expout <<'_ATEOF' 2284main() <main () at prog:4>: 2285 foo() 2286_ATEOF 2287 2288{ set +x 2289$as_echo "$at_srcdir/attr.at:20: cflow -v prog" 2290at_fn_check_prepare_trace "attr.at:20" 2291( $at_check_trace; cflow -v prog 2292) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2293at_status=$? at_failed=false 2294$at_check_filter 2295echo >>"$at_stderr"; $as_echo "prog:2: expected \`;' near \`__attribute__' 2296" | \ 2297 $at_diff - "$at_stderr" || at_failed=: 2298$at_diff expout "$at_stdout" || at_failed=: 2299at_fn_check_status 0 $at_status "$at_srcdir/attr.at:20" 2300$at_failed && at_fn_log_failure 2301$at_traceon; } 2302 2303 2304 2305 2306 2307 set +x 2308 $at_times_p && times >"$at_times_file" 2309) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2310read at_status <"$at_status_file" 2311#AT_STOP_5 2312#AT_START_6 2313at_fn_group_banner 6 'awrapper.at:17' \ 2314 "attribute wrapper handling" " " 2315at_xfail=no 2316( 2317 $as_echo "6. $at_setup_line: testing $at_desc ..." 2318 $at_traceon 2319 2320 2321 2322 2323 2324 2325 2326# Early versions of cflow coredumped on this output 2327 2328cat >prog <<'_ATEOF' 2329 2330extern main() __attribute__((noreturn)); 2331 2332main() 2333{ 2334 foo(); 2335} 2336 2337_ATEOF 2338 2339 2340cat >expout <<'_ATEOF' 2341main() <main () at prog:4>: 2342 foo() 2343_ATEOF 2344 2345{ set +x 2346$as_echo "$at_srcdir/awrapper.at:20: cflow --symbol __attribute__:wrapper prog" 2347at_fn_check_prepare_trace "awrapper.at:20" 2348( $at_check_trace; cflow --symbol __attribute__:wrapper prog 2349) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2350at_status=$? at_failed=false 2351$at_check_filter 2352at_fn_diff_devnull "$at_stderr" || at_failed=: 2353$at_diff expout "$at_stdout" || at_failed=: 2354at_fn_check_status 0 $at_status "$at_srcdir/awrapper.at:20" 2355$at_failed && at_fn_log_failure 2356$at_traceon; } 2357 2358 2359 2360 2361 2362 set +x 2363 $at_times_p && times >"$at_times_file" 2364) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2365read at_status <"$at_status_file" 2366#AT_STOP_6 2367#AT_START_7 2368at_fn_group_banner 7 'pwrapper.at:17' \ 2369 "parameter wrapper handling" " " 2370at_xfail=no 2371( 2372 $as_echo "7. $at_setup_line: testing $at_desc ..." 2373 $at_traceon 2374 2375 2376 2377 2378 2379 2380 2381 2382cat >prog <<'_ATEOF' 2383 2384int foo PARM((int x, int y)); 2385 2386int 2387foo(int x, int y) 2388{ 2389 bar(); 2390} 2391 2392_ATEOF 2393 2394 2395cat >expout <<'_ATEOF' 2396foo() <int foo (int x, int y) at prog:5>: 2397 bar() 2398_ATEOF 2399 2400{ set +x 2401$as_echo "$at_srcdir/pwrapper.at:20: cflow --symbol PARM:wrapper prog" 2402at_fn_check_prepare_trace "pwrapper.at:20" 2403( $at_check_trace; cflow --symbol PARM:wrapper prog 2404) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2405at_status=$? at_failed=false 2406$at_check_filter 2407at_fn_diff_devnull "$at_stderr" || at_failed=: 2408$at_diff expout "$at_stdout" || at_failed=: 2409at_fn_check_status 0 $at_status "$at_srcdir/pwrapper.at:20" 2410$at_failed && at_fn_log_failure 2411$at_traceon; } 2412 2413 2414 2415 set +x 2416 $at_times_p && times >"$at_times_file" 2417) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2418read at_status <"$at_status_file" 2419#AT_STOP_7 2420#AT_START_8 2421at_fn_group_banner 8 'knr.at:17' \ 2422 "K&R style function declarations" " " 2423at_xfail=no 2424( 2425 $as_echo "8. $at_setup_line: testing $at_desc ..." 2426 $at_traceon 2427 2428 2429 2430# Cflow versions 1.0 and 1.1 improperly handled K&R style declarations. 2431# Reported by: "Robert E. Michael" <rmichael2@nc.rr.com> 2432# References: <44FF85D2.58DD254C@nc.rr.com> 2433 2434 2435cat >prog <<'_ATEOF' 2436 2437main(argc, argv) 2438int argc; 2439char *argv 2440{ 2441 foo(argc); 2442} 2443 2444void 2445foo(x) 2446TYPE x; 2447{ 2448 x; 2449} 2450 2451_ATEOF 2452 2453 2454cat >expout <<'_ATEOF' 2455main() <main (argc, argv) at prog:2>: 2456 foo() <void foo (x) at prog:10> 2457_ATEOF 2458 2459{ set +x 2460$as_echo "$at_srcdir/knr.at:24: cflow prog" 2461at_fn_check_prepare_trace "knr.at:24" 2462( $at_check_trace; cflow prog 2463) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2464at_status=$? at_failed=false 2465$at_check_filter 2466at_fn_diff_devnull "$at_stderr" || at_failed=: 2467$at_diff expout "$at_stdout" || at_failed=: 2468at_fn_check_status 0 $at_status "$at_srcdir/knr.at:24" 2469$at_failed && at_fn_log_failure 2470$at_traceon; } 2471 2472 2473 set +x 2474 $at_times_p && times >"$at_times_file" 2475) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2476read at_status <"$at_status_file" 2477#AT_STOP_8 2478#AT_START_9 2479at_fn_group_banner 9 'fdecl.at:17' \ 2480 "forward function declarations" " " 2481at_xfail=no 2482( 2483 $as_echo "9. $at_setup_line: testing $at_desc ..." 2484 $at_traceon 2485 2486 2487 2488 2489 2490 2491 2492cat >prog <<'_ATEOF' 2493 2494int foo(int x,int y), bar(long u); 2495 2496int 2497foo(int x, int y) 2498{ 2499 bar(); 2500} 2501 2502_ATEOF 2503 2504 2505cat >expout <<'_ATEOF' 2506foo() <int foo (int x, int y) at prog:5>: 2507 bar() 2508_ATEOF 2509 2510{ set +x 2511$as_echo "$at_srcdir/fdecl.at:20: cflow -v prog" 2512at_fn_check_prepare_trace "fdecl.at:20" 2513( $at_check_trace; cflow -v prog 2514) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2515at_status=$? at_failed=false 2516$at_check_filter 2517at_fn_diff_devnull "$at_stderr" || at_failed=: 2518$at_diff expout "$at_stdout" || at_failed=: 2519at_fn_check_status 0 $at_status "$at_srcdir/fdecl.at:20" 2520$at_failed && at_fn_log_failure 2521$at_traceon; } 2522 2523 2524 2525 2526 set +x 2527 $at_times_p && times >"$at_times_file" 2528) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2529read at_status <"$at_status_file" 2530#AT_STOP_9 2531#AT_START_10 2532at_fn_group_banner 10 'static.at:17' \ 2533 "Static symbols with forward decls and -i^s" " " 2534at_xfail=no 2535( 2536 $as_echo "10. $at_setup_line: testing $at_desc ..." 2537 $at_traceon 2538 2539 2540 2541# Up to version 1.1 static symbols with forward declarations caused 2542# segmentation faults when used with -i^s. 2543# 2544# Synopsis: Normally static functions are not added to callee lists 2545# of their callers in -i^s mode (see add_reference() and call() in parser.c), 2546# therefore cflow 1.1 assumed it was safe to free them in static_processor(). 2547# However, there is an important exception: if the function storage type is 2548# not known at the time of reference. Such functions are added to callee lists 2549# and freeing them causes coredumps. 2550# 2551# To reproduce the case we need two source files: first with the actual test 2552# program and the second, empty, one, whose purpose is to trigger additional 2553# memory allocations after symbol deletion. 2554# 2555# Reported by: Laurent Fournie 2556# References: <OFA772D453.E40E7252-ONC12571D8.0046430B-C12571D8.004B043A@rockwellcollins.com> 2557 2558cat >prog <<'_ATEOF' 2559 2560static void foo(); 2561 2562int 2563bar() 2564{ 2565 foo(); 2566} 2567 2568static void 2569foo() 2570{ 2571 int x = 1; 2572} 2573_ATEOF 2574 2575 2576cat >2 <<'_ATEOF' 2577 2578_ATEOF 2579 2580 2581 2582 2583 2584 2585cat >expout <<'_ATEOF' 2586bar() <int bar () at prog:5>: 2587_ATEOF 2588 2589{ set +x 2590$as_echo "$at_srcdir/static.at:56: cflow -i^s prog 2" 2591at_fn_check_prepare_trace "static.at:56" 2592( $at_check_trace; cflow -i^s prog 2 2593) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2594at_status=$? at_failed=false 2595$at_check_filter 2596at_fn_diff_devnull "$at_stderr" || at_failed=: 2597$at_diff expout "$at_stdout" || at_failed=: 2598at_fn_check_status 0 $at_status "$at_srcdir/static.at:56" 2599$at_failed && at_fn_log_failure 2600$at_traceon; } 2601 2602 2603 2604 2605 set +x 2606 $at_times_p && times >"$at_times_file" 2607) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2608read at_status <"$at_status_file" 2609#AT_STOP_10 2610#AT_START_11 2611at_fn_group_banner 11 'include.at:17' \ 2612 "included symbols" " " 2613at_xfail=no 2614( 2615 $as_echo "11. $at_setup_line: testing $at_desc ..." 2616 $at_traceon 2617 2618 2619 2620cat >prog <<'_ATEOF' 2621 2622int a; 2623long _b; 2624static int c; 2625 2626static void 2627_bar(int x) 2628{ 2629 a = x; 2630} 2631 2632int 2633foo(int y) 2634{ 2635 _b = y; 2636 c = y; 2637 _bar(); 2638 return 1; 2639} 2640 2641int 2642main() 2643{ 2644 static int d = foo(2); 2645 return d; 2646} 2647_ATEOF 2648 2649 2650 2651 2652 2653 2654cat >expout <<'_ATEOF' 2655main() <int main () at prog:22>: 2656 foo() <int foo (int y) at prog:13>: 2657_ATEOF 2658 2659{ set +x 2660$as_echo "$at_srcdir/include.at:48: cflow -v prog" 2661at_fn_check_prepare_trace "include.at:48" 2662( $at_check_trace; cflow -v prog 2663) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2664at_status=$? at_failed=false 2665$at_check_filter 2666at_fn_diff_devnull "$at_stderr" || at_failed=: 2667$at_diff expout "$at_stdout" || at_failed=: 2668at_fn_check_status 0 $at_status "$at_srcdir/include.at:48" 2669$at_failed && at_fn_log_failure 2670$at_traceon; } 2671 2672 2673 2674 2675 2676 2677 2678cat >expout <<'_ATEOF' 2679main() <int main () at prog:22>: 2680 foo() <int foo (int y) at prog:13>: 2681 _bar() <void _bar (int x) at prog:7>: 2682_ATEOF 2683 2684{ set +x 2685$as_echo "$at_srcdir/include.at:54: cflow -v -i_ prog" 2686at_fn_check_prepare_trace "include.at:54" 2687( $at_check_trace; cflow -v -i_ prog 2688) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2689at_status=$? at_failed=false 2690$at_check_filter 2691at_fn_diff_devnull "$at_stderr" || at_failed=: 2692$at_diff expout "$at_stdout" || at_failed=: 2693at_fn_check_status 0 $at_status "$at_srcdir/include.at:54" 2694$at_failed && at_fn_log_failure 2695$at_traceon; } 2696 2697 2698 2699 2700 2701 2702 2703cat >expout <<'_ATEOF' 2704main() <int main () at prog:22>: 2705 foo() <int foo (int y) at prog:13>: 2706 c <int c at prog:4> 2707 d <int d at prog:24> 2708_ATEOF 2709 2710{ set +x 2711$as_echo "$at_srcdir/include.at:61: cflow -v -ix prog" 2712at_fn_check_prepare_trace "include.at:61" 2713( $at_check_trace; cflow -v -ix prog 2714) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2715at_status=$? at_failed=false 2716$at_check_filter 2717at_fn_diff_devnull "$at_stderr" || at_failed=: 2718$at_diff expout "$at_stdout" || at_failed=: 2719at_fn_check_status 0 $at_status "$at_srcdir/include.at:61" 2720$at_failed && at_fn_log_failure 2721$at_traceon; } 2722 2723 2724 2725 2726 2727 2728 2729cat >expout <<'_ATEOF' 2730main() <int main () at prog:22>: 2731 foo() <int foo (int y) at prog:13>: 2732 _b <long _b at prog:3> 2733 c <int c at prog:4> 2734 _bar() <void _bar (int x) at prog:7>: 2735 a <int a at prog:2> 2736 d <int d at prog:24> 2737_ATEOF 2738 2739{ set +x 2740$as_echo "$at_srcdir/include.at:69: cflow -v -ix_ prog" 2741at_fn_check_prepare_trace "include.at:69" 2742( $at_check_trace; cflow -v -ix_ prog 2743) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2744at_status=$? at_failed=false 2745$at_check_filter 2746at_fn_diff_devnull "$at_stderr" || at_failed=: 2747$at_diff expout "$at_stdout" || at_failed=: 2748at_fn_check_status 0 $at_status "$at_srcdir/include.at:69" 2749$at_failed && at_fn_log_failure 2750$at_traceon; } 2751 2752 2753 2754 2755 2756 2757 2758cat >expout <<'_ATEOF' 2759main() <int main () at prog:22>: 2760 foo() <int foo (int y) at prog:13>: 2761 _b <long _b at prog:3> 2762_ATEOF 2763 2764{ set +x 2765$as_echo "$at_srcdir/include.at:80: cflow -v -ix_ -i^s prog" 2766at_fn_check_prepare_trace "include.at:80" 2767( $at_check_trace; cflow -v -ix_ -i^s prog 2768) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2769at_status=$? at_failed=false 2770$at_check_filter 2771at_fn_diff_devnull "$at_stderr" || at_failed=: 2772$at_diff expout "$at_stdout" || at_failed=: 2773at_fn_check_status 0 $at_status "$at_srcdir/include.at:80" 2774$at_failed && at_fn_log_failure 2775$at_traceon; } 2776 2777 2778 2779 set +x 2780 $at_times_p && times >"$at_times_file" 2781) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2782read at_status <"$at_status_file" 2783#AT_STOP_11 2784#AT_START_12 2785at_fn_group_banner 12 'ssblock.at:17' \ 2786 "static struct in block scope" " " 2787at_xfail=no 2788( 2789 $as_echo "12. $at_setup_line: testing $at_desc ..." 2790 $at_traceon 2791 2792 2793 2794 2795 2796 2797 2798cat >prog <<'_ATEOF' 2799 2800int 2801foo () 2802{ 2803 static struct { 2804 int f; 2805 } k[] = { 0 }; 2806 k[0]=1; 2807} 2808 2809int 2810main() 2811{ 2812 foo(); 2813} 2814 2815_ATEOF 2816 2817 2818cat >expout <<'_ATEOF' 2819main() <int main () at prog:12>: 2820 foo() <int foo () at prog:3>: 2821 k <struct { ... } k[] at prog:7> 2822_ATEOF 2823 2824{ set +x 2825$as_echo "$at_srcdir/ssblock.at:20: cflow -v -ix prog" 2826at_fn_check_prepare_trace "ssblock.at:20" 2827( $at_check_trace; cflow -v -ix prog 2828) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2829at_status=$? at_failed=false 2830$at_check_filter 2831at_fn_diff_devnull "$at_stderr" || at_failed=: 2832$at_diff expout "$at_stdout" || at_failed=: 2833at_fn_check_status 0 $at_status "$at_srcdir/ssblock.at:20" 2834$at_failed && at_fn_log_failure 2835$at_traceon; } 2836 2837 2838 2839 2840 set +x 2841 $at_times_p && times >"$at_times_file" 2842) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2843read at_status <"$at_status_file" 2844#AT_STOP_12 2845#AT_START_13 2846at_fn_group_banner 13 'funcarg.at:17' \ 2847 "functional arguments" " " 2848at_xfail=no 2849( 2850 $as_echo "13. $at_setup_line: testing $at_desc ..." 2851 $at_traceon 2852 2853 2854 2855 2856 2857 2858 2859cat >prog <<'_ATEOF' 2860 2861int 2862foo(int bar()) 2863{ 2864 bar(); 2865} 2866_ATEOF 2867 2868 2869cat >expout <<'_ATEOF' 2870foo() <int foo (int bar ()) at prog:3> 2871_ATEOF 2872 2873{ set +x 2874$as_echo "$at_srcdir/funcarg.at:20: cflow -v --main=foo prog" 2875at_fn_check_prepare_trace "funcarg.at:20" 2876( $at_check_trace; cflow -v --main=foo prog 2877) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2878at_status=$? at_failed=false 2879$at_check_filter 2880at_fn_diff_devnull "$at_stderr" || at_failed=: 2881$at_diff expout "$at_stdout" || at_failed=: 2882at_fn_check_status 0 $at_status "$at_srcdir/funcarg.at:20" 2883$at_failed && at_fn_log_failure 2884$at_traceon; } 2885 2886 2887 2888 2889 set +x 2890 $at_times_p && times >"$at_times_file" 2891) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2892read at_status <"$at_status_file" 2893#AT_STOP_13 2894#AT_START_14 2895at_fn_group_banner 14 'parm.at:17' \ 2896 "function parameter handling" " " 2897at_xfail=no 2898( 2899 $as_echo "14. $at_setup_line: testing $at_desc ..." 2900 $at_traceon 2901 2902 2903 2904 2905 2906 2907 2908cat >prog <<'_ATEOF' 2909 2910int bar; 2911/* This declaration used to shadow the global in 2912 pre-1.0 versions */ 2913int (*foo) (int bar); 2914 2915int 2916main() 2917{ 2918 bar = 1; 2919} 2920 2921_ATEOF 2922 2923 2924cat >expout <<'_ATEOF' 2925main() <int main () at prog:8>: 2926 bar <int bar at prog:2> 2927_ATEOF 2928 2929{ set +x 2930$as_echo "$at_srcdir/parm.at:20: cflow -ix -v prog" 2931at_fn_check_prepare_trace "parm.at:20" 2932( $at_check_trace; cflow -ix -v prog 2933) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2934at_status=$? at_failed=false 2935$at_check_filter 2936at_fn_diff_devnull "$at_stderr" || at_failed=: 2937$at_diff expout "$at_stdout" || at_failed=: 2938at_fn_check_status 0 $at_status "$at_srcdir/parm.at:20" 2939$at_failed && at_fn_log_failure 2940$at_traceon; } 2941 2942 2943 2944 set +x 2945 $at_times_p && times >"$at_times_file" 2946) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2947read at_status <"$at_status_file" 2948#AT_STOP_14 2949#AT_START_15 2950at_fn_group_banner 15 'nfparg.at:19' \ 2951 "nameless function pointer arguments" " " 2952at_xfail=no 2953( 2954 $as_echo "15. $at_setup_line: testing $at_desc ..." 2955 $at_traceon 2956 2957 2958 2959 2960cat >prog <<'_ATEOF' 2961 2962int main(int (*) ()) 2963{ 2964} 2965 2966_ATEOF 2967 2968 2969cat >expout <<'_ATEOF' 2970main() <int main (int (*) ()) at prog:2> 2971_ATEOF 2972 2973{ set +x 2974$as_echo "$at_srcdir/nfparg.at:22: cflow prog" 2975at_fn_check_prepare_trace "nfparg.at:22" 2976( $at_check_trace; cflow prog 2977) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2978at_status=$? at_failed=false 2979$at_check_filter 2980at_fn_diff_devnull "$at_stderr" || at_failed=: 2981$at_diff expout "$at_stdout" || at_failed=: 2982at_fn_check_status 0 $at_status "$at_srcdir/nfparg.at:22" 2983$at_failed && at_fn_log_failure 2984$at_traceon; } 2985 2986 2987 set +x 2988 $at_times_p && times >"$at_times_file" 2989) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2990read at_status <"$at_status_file" 2991#AT_STOP_15 2992#AT_START_16 2993at_fn_group_banner 16 'nfarg.at:24' \ 2994 "nameless function arguments" " " 2995at_xfail=no 2996( 2997 $as_echo "16. $at_setup_line: testing $at_desc ..." 2998 $at_traceon 2999 3000 3001 3002 3003cat >prog <<'_ATEOF' 3004 3005int main(int ()) 3006{ 3007} 3008 3009_ATEOF 3010 3011 3012cat >expout <<'_ATEOF' 3013main() <int main (int ()) at prog:2> 3014_ATEOF 3015 3016{ set +x 3017$as_echo "$at_srcdir/nfarg.at:27: cflow prog" 3018at_fn_check_prepare_trace "nfarg.at:27" 3019( $at_check_trace; cflow prog 3020) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3021at_status=$? at_failed=false 3022$at_check_filter 3023at_fn_diff_devnull "$at_stderr" || at_failed=: 3024$at_diff expout "$at_stdout" || at_failed=: 3025at_fn_check_status 0 $at_status "$at_srcdir/nfarg.at:27" 3026$at_failed && at_fn_log_failure 3027$at_traceon; } 3028 3029 3030 set +x 3031 $at_times_p && times >"$at_times_file" 3032) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3033read at_status <"$at_status_file" 3034#AT_STOP_16 3035#AT_START_17 3036at_fn_group_banner 17 'hiding.at:17' \ 3037 "hiding of global and file static identifiers" " " 3038at_xfail=no 3039( 3040 $as_echo "17. $at_setup_line: testing $at_desc ..." 3041 $at_traceon 3042 3043 3044 3045 3046 3047 3048 3049 3050cat >prog <<'_ATEOF' 3051 3052static int s = 1; 3053int g = -100; 3054 3055static 3056int foo() 3057{ 3058 static int s = 10; /* hides file static variable */ 3059 return s; 3060} 3061 3062static 3063int bar() 3064{ 3065 static int foo = 100; /* hides file static function */ 3066 return foo + g; 3067} 3068 3069int baz() 3070{ 3071 int g = 100; /* hides global variable */ 3072 return s + g; 3073} 3074 3075int main() 3076{ 3077 return (g + s + foo() + bar() + baz()); 3078} 3079 3080_ATEOF 3081 3082 3083cat >expout <<'_ATEOF' 3084main() <int main () at prog:25>: 3085 g <int g at prog:3> 3086 s <int s at prog:2> 3087 foo() <int foo () at prog:6>: 3088 s <int s at prog:8> 3089 bar() <int bar () at prog:13>: 3090 foo <int foo at prog:15> 3091 g <int g at prog:3> 3092 baz() <int baz () at prog:19>: 3093 s <int s at prog:2> 3094_ATEOF 3095 3096{ set +x 3097$as_echo "$at_srcdir/hiding.at:20: cflow -ix_ prog" 3098at_fn_check_prepare_trace "hiding.at:20" 3099( $at_check_trace; cflow -ix_ prog 3100) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3101at_status=$? at_failed=false 3102$at_check_filter 3103at_fn_diff_devnull "$at_stderr" || at_failed=: 3104$at_diff expout "$at_stdout" || at_failed=: 3105at_fn_check_status 0 $at_status "$at_srcdir/hiding.at:20" 3106$at_failed && at_fn_log_failure 3107$at_traceon; } 3108 3109 3110 3111 3112 set +x 3113 $at_times_p && times >"$at_times_file" 3114) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3115read at_status <"$at_status_file" 3116#AT_STOP_17 3117#AT_START_18 3118at_fn_group_banner 18 'multi.at:17' \ 3119 "multiple source files" " " 3120at_xfail=no 3121( 3122 $as_echo "18. $at_setup_line: testing $at_desc ..." 3123 $at_traceon 3124 3125 3126 3127 3128 3129 3130 3131cat >multi1 <<'_ATEOF' 3132 3133#include "multi2.h" 3134#include "multi3.h" 3135 3136static int stat = 1; 3137 3138int main(int argc, char **argv) 3139{ 3140 static int local_stat; 3141 local_stat = foo1(glob) + foo2(stat); 3142 return local_stat; 3143} 3144_ATEOF 3145 3146 3147cat >multi2 <<'_ATEOF' 3148 3149#include "multi2.h" 3150#include "multi3.h" 3151 3152int glob = 2; 3153static int stat = 10; 3154 3155static void _bar(int x) 3156{ 3157 glob = foo2(x); 3158} 3159 3160int foo1(int y) 3161{ 3162 int local = 1; 3163 _bar(local); 3164 return stat; 3165} 3166_ATEOF 3167 3168 3169cat >multi3 <<'_ATEOF' 3170 3171#include "multi3.h" 3172 3173static int stat = 100; 3174 3175static void _bar(int x) 3176{ 3177 stat += x; 3178} 3179 3180int foo2(int y) 3181{ 3182 static int local_stat = 1; 3183 _bar(local_stat + y + glob); 3184 return local_stat; 3185} 3186_ATEOF 3187 3188 3189cat >expout <<'_ATEOF' 3190main() <int main (int argc, char **argv) at multi1:7>: 3191 local_stat <int local_stat at multi1:9> 3192 foo1() <int foo1 (int y) at multi2:13>: 3193 _bar() <void _bar (int x) at multi2:8>: 3194 glob <int glob at multi2:5> 3195 foo2() <int foo2 (int y) at multi3:11>: 3196 _bar() <void _bar (int x) at multi3:6>: 3197 stat <int stat at multi3:4> 3198 local_stat <int local_stat at multi3:13> 3199 glob <int glob at multi2:5> 3200 stat <int stat at multi2:6> 3201 glob <int glob at multi2:5> 3202 foo2() <int foo2 (int y) at multi3:11>: 3203 _bar() <void _bar (int x) at multi3:6>: 3204 stat <int stat at multi3:4> 3205 local_stat <int local_stat at multi3:13> 3206 glob <int glob at multi2:5> 3207 stat <int stat at multi1:5> 3208_ATEOF 3209 3210 3211{ set +x 3212$as_echo "$at_srcdir/multi.at:20: cflow -ix_ multi1 multi2 multi3" 3213at_fn_check_prepare_trace "multi.at:20" 3214( $at_check_trace; cflow -ix_ multi1 multi2 multi3 3215) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3216at_status=$? at_failed=false 3217$at_check_filter 3218at_fn_diff_devnull "$at_stderr" || at_failed=: 3219$at_diff expout "$at_stdout" || at_failed=: 3220at_fn_check_status 0 $at_status "$at_srcdir/multi.at:20" 3221$at_failed && at_fn_log_failure 3222$at_traceon; } 3223 3224 3225 3226 3227 3228 set +x 3229 $at_times_p && times >"$at_times_file" 3230) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3231read at_status <"$at_status_file" 3232#AT_STOP_18 3233#AT_START_19 3234at_fn_group_banner 19 'bartest.at:20' \ 3235 "vertical bar in tree output" " " 3236at_xfail=no 3237( 3238 $as_echo "19. $at_setup_line: testing $at_desc ..." 3239 $at_traceon 3240 3241 3242 3243 3244 3245 3246 3247cat >prog <<'_ATEOF' 3248int main() 3249{ 3250 hello(NULL); 3251 printf("Hello\n"); 3252} 3253hello(const char *data) 3254{ 3255 printf("Hello\n"); 3256} 3257 3258_ATEOF 3259 3260 3261cat >expout <<'_ATEOF' 3262 1 +-main() <int main () at prog:1> 3263 2 +-hello() <hello (const char *data) at prog:6> 3264 3 | \-printf() 3265 4 \-printf() 3266_ATEOF 3267 3268{ set +x 3269$as_echo "$at_srcdir/bartest.at:23: cflow --tree --number prog" 3270at_fn_check_prepare_trace "bartest.at:23" 3271( $at_check_trace; cflow --tree --number prog 3272) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3273at_status=$? at_failed=false 3274$at_check_filter 3275at_fn_diff_devnull "$at_stderr" || at_failed=: 3276$at_diff expout "$at_stdout" || at_failed=: 3277at_fn_check_status 0 $at_status "$at_srcdir/bartest.at:23" 3278$at_failed && at_fn_log_failure 3279$at_traceon; } 3280 3281 3282 3283 3284 set +x 3285 $at_times_p && times >"$at_times_file" 3286) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3287read at_status <"$at_status_file" 3288#AT_STOP_19 3289#AT_START_20 3290at_fn_group_banner 20 'decl01.at:17' \ 3291 "same type declaration" " " 3292at_xfail=no 3293( 3294 $as_echo "20. $at_setup_line: testing $at_desc ..." 3295 $at_traceon 3296 3297 3298 3299 3300 3301 3302 3303cat >prog <<'_ATEOF' 3304static struct X *a, *b, *c; 3305_ATEOF 3306 3307 3308: >expout 3309{ set +x 3310$as_echo "$at_srcdir/decl01.at:20: cflow --debug prog" 3311at_fn_check_prepare_trace "decl01.at:20" 3312( $at_check_trace; cflow --debug prog 3313) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3314at_status=$? at_failed=false 3315$at_check_filter 3316echo >>"$at_stderr"; $as_echo "prog:1: a/-1 defined to struct X *a 3317prog:1: b/-1 defined to struct X *b 3318prog:1: c/-1 defined to struct X *c 3319" | \ 3320 $at_diff - "$at_stderr" || at_failed=: 3321$at_diff expout "$at_stdout" || at_failed=: 3322at_fn_check_status 0 $at_status "$at_srcdir/decl01.at:20" 3323$at_failed && at_fn_log_failure 3324$at_traceon; } 3325 3326 3327 3328 set +x 3329 $at_times_p && times >"$at_times_file" 3330) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3331read at_status <"$at_status_file" 3332#AT_STOP_20 3333#AT_START_21 3334at_fn_group_banner 21 'invalid.at:17' \ 3335 "invalid input" " " 3336at_xfail=no 3337( 3338 $as_echo "21. $at_setup_line: testing $at_desc ..." 3339 $at_traceon 3340 3341 3342 3343# See https://savannah.gnu.org/bugs/?44113 3344 3345cat >prog <<'_ATEOF' 3346 3347m{int 3348r(a(n){}e 3349 3350_ATEOF 3351 3352 3353: >expout 3354{ set +x 3355$as_echo "$at_srcdir/invalid.at:21: cflow prog" 3356at_fn_check_prepare_trace "invalid.at:21" 3357( $at_check_trace; cflow prog 3358) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3359at_status=$? at_failed=false 3360$at_check_filter 3361at_fn_diff_devnull "$at_stderr" || at_failed=: 3362$at_diff expout "$at_stdout" || at_failed=: 3363at_fn_check_status 0 $at_status "$at_srcdir/invalid.at:21" 3364$at_failed && at_fn_log_failure 3365$at_traceon; } 3366 3367 3368 3369cat >prog <<'_ATEOF' 3370 3371e(S,t)e(S{ 3372 3373_ATEOF 3374 3375 3376: >expout 3377{ set +x 3378$as_echo "$at_srcdir/invalid.at:26: cflow prog" 3379at_fn_check_prepare_trace "invalid.at:26" 3380( $at_check_trace; cflow prog 3381) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3382at_status=$? at_failed=false 3383$at_check_filter 3384at_fn_diff_devnull "$at_stderr" || at_failed=: 3385$at_diff expout "$at_stdout" || at_failed=: 3386at_fn_check_status 0 $at_status "$at_srcdir/invalid.at:26" 3387$at_failed && at_fn_log_failure 3388$at_traceon; } 3389 3390 3391 3392cat >prog <<'_ATEOF' 3393 3394n{void y(r(i){}a 3395 3396_ATEOF 3397 3398 3399: >expout 3400{ set +x 3401$as_echo "$at_srcdir/invalid.at:30: cflow prog" 3402at_fn_check_prepare_trace "invalid.at:30" 3403( $at_check_trace; cflow prog 3404) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3405at_status=$? at_failed=false 3406$at_check_filter 3407at_fn_diff_devnull "$at_stderr" || at_failed=: 3408$at_diff expout "$at_stdout" || at_failed=: 3409at_fn_check_status 0 $at_status "$at_srcdir/invalid.at:30" 3410$at_failed && at_fn_log_failure 3411$at_traceon; } 3412 3413 3414 set +x 3415 $at_times_p && times >"$at_times_file" 3416) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3417read at_status <"$at_status_file" 3418#AT_STOP_21 3419#AT_START_22 3420at_fn_group_banner 22 'memberof.at:17' \ 3421 "member of" " " 3422at_xfail=no 3423( 3424 $as_echo "22. $at_setup_line: testing $at_desc ..." 3425 $at_traceon 3426 3427 3428 3429 3430cat >prog <<'_ATEOF' 3431int bar(struct foo *a) { 3432 return a.bar(); 3433} 3434 3435_ATEOF 3436 3437 3438cat >expout <<'_ATEOF' 3439bar() <int bar (struct foo *a) at prog:1> 3440_ATEOF 3441 3442{ set +x 3443$as_echo "$at_srcdir/memberof.at:20: cflow prog" 3444at_fn_check_prepare_trace "memberof.at:20" 3445( $at_check_trace; cflow prog 3446) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3447at_status=$? at_failed=false 3448$at_check_filter 3449at_fn_diff_devnull "$at_stderr" || at_failed=: 3450$at_diff expout "$at_stdout" || at_failed=: 3451at_fn_check_status 0 $at_status "$at_srcdir/memberof.at:20" 3452$at_failed && at_fn_log_failure 3453$at_traceon; } 3454 3455 3456# https://savannah.gnu.org/bugs/index.php?47110 3457 3458cat >prog <<'_ATEOF' 3459int bar(struct foo *a) { 3460 return (*a).bar(); 3461} 3462 3463_ATEOF 3464 3465 3466cat >expout <<'_ATEOF' 3467bar() <int bar (struct foo *a) at prog:1> 3468_ATEOF 3469 3470{ set +x 3471$as_echo "$at_srcdir/memberof.at:29: cflow prog" 3472at_fn_check_prepare_trace "memberof.at:29" 3473( $at_check_trace; cflow prog 3474) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3475at_status=$? at_failed=false 3476$at_check_filter 3477at_fn_diff_devnull "$at_stderr" || at_failed=: 3478$at_diff expout "$at_stdout" || at_failed=: 3479at_fn_check_status 0 $at_status "$at_srcdir/memberof.at:29" 3480$at_failed && at_fn_log_failure 3481$at_traceon; } 3482 3483 3484 3485cat >prog <<'_ATEOF' 3486int bar(struct foo **a) { 3487 return (*a)->bar(); 3488} 3489 3490_ATEOF 3491 3492 3493cat >expout <<'_ATEOF' 3494bar() <int bar (struct foo **a) at prog:1> 3495_ATEOF 3496 3497{ set +x 3498$as_echo "$at_srcdir/memberof.at:37: cflow prog" 3499at_fn_check_prepare_trace "memberof.at:37" 3500( $at_check_trace; cflow prog 3501) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3502at_status=$? at_failed=false 3503$at_check_filter 3504at_fn_diff_devnull "$at_stderr" || at_failed=: 3505$at_diff expout "$at_stdout" || at_failed=: 3506at_fn_check_status 0 $at_status "$at_srcdir/memberof.at:37" 3507$at_failed && at_fn_log_failure 3508$at_traceon; } 3509 3510 3511 3512cat >prog <<'_ATEOF' 3513int bar(void *a) { 3514 return (*(struct foo*)a).bar(); 3515} 3516 3517_ATEOF 3518 3519 3520cat >expout <<'_ATEOF' 3521bar() <int bar (void *a) at prog:1> 3522_ATEOF 3523 3524{ set +x 3525$as_echo "$at_srcdir/memberof.at:45: cflow prog" 3526at_fn_check_prepare_trace "memberof.at:45" 3527( $at_check_trace; cflow prog 3528) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3529at_status=$? at_failed=false 3530$at_check_filter 3531at_fn_diff_devnull "$at_stderr" || at_failed=: 3532$at_diff expout "$at_stdout" || at_failed=: 3533at_fn_check_status 0 $at_status "$at_srcdir/memberof.at:45" 3534$at_failed && at_fn_log_failure 3535$at_traceon; } 3536 3537 3538 3539cat >prog <<'_ATEOF' 3540int bar(void *a) { 3541 return (*(struct foo*)(((struct qux*)a)->foo)).bar(); 3542} 3543 3544_ATEOF 3545 3546 3547cat >expout <<'_ATEOF' 3548bar() <int bar (void *a) at prog:1> 3549_ATEOF 3550 3551{ set +x 3552$as_echo "$at_srcdir/memberof.at:53: cflow prog" 3553at_fn_check_prepare_trace "memberof.at:53" 3554( $at_check_trace; cflow prog 3555) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3556at_status=$? at_failed=false 3557$at_check_filter 3558at_fn_diff_devnull "$at_stderr" || at_failed=: 3559$at_diff expout "$at_stdout" || at_failed=: 3560at_fn_check_status 0 $at_status "$at_srcdir/memberof.at:53" 3561$at_failed && at_fn_log_failure 3562$at_traceon; } 3563 3564 3565 set +x 3566 $at_times_p && times >"$at_times_file" 3567) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3568read at_status <"$at_status_file" 3569#AT_STOP_22 3570#AT_START_23 3571at_fn_group_banner 23 'struct.at:19' \ 3572 "struct definition followed by attribute" " " 1 3573at_xfail=no 3574( 3575 $as_echo "23. $at_setup_line: testing $at_desc ..." 3576 $at_traceon 3577 3578 3579 3580cat >prog <<'_ATEOF' 3581struct bar { 3582 struct foo *dummy; 3583} __attribute__((aligned(8))); 3584 3585int 3586main(int argc, char **argv) 3587{ 3588} 3589 3590_ATEOF 3591 3592 3593cat >expout <<'_ATEOF' 3594main() <int main (int argc, char **argv) at prog:6> 3595_ATEOF 3596 3597{ set +x 3598$as_echo "$at_srcdir/struct.at:19: cflow prog" 3599at_fn_check_prepare_trace "struct.at:19" 3600( $at_check_trace; cflow prog 3601) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3602at_status=$? at_failed=false 3603$at_check_filter 3604at_fn_diff_devnull "$at_stderr" || at_failed=: 3605$at_diff expout "$at_stdout" || at_failed=: 3606at_fn_check_status 0 $at_status "$at_srcdir/struct.at:19" 3607$at_failed && at_fn_log_failure 3608$at_traceon; } 3609 3610 set +x 3611 $at_times_p && times >"$at_times_file" 3612) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3613read at_status <"$at_status_file" 3614#AT_STOP_23 3615#AT_START_24 3616at_fn_group_banner 24 'struct.at:33' \ 3617 "struct definition followed by wrapper" " " 1 3618at_xfail=no 3619( 3620 $as_echo "24. $at_setup_line: testing $at_desc ..." 3621 $at_traceon 3622 3623 3624 3625cat >prog <<'_ATEOF' 3626struct bar { 3627 struct foo *dummy; 3628} __attribute__((aligned(8))); 3629 3630int 3631main(int argc, char **argv) 3632{ 3633} 3634 3635_ATEOF 3636 3637 3638cat >expout <<'_ATEOF' 3639main() <int main (int argc, char **argv) at prog:6> 3640_ATEOF 3641 3642{ set +x 3643$as_echo "$at_srcdir/struct.at:33: cflow --symbol __attribute__:wrapper prog" 3644at_fn_check_prepare_trace "struct.at:33" 3645( $at_check_trace; cflow --symbol __attribute__:wrapper prog 3646) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3647at_status=$? at_failed=false 3648$at_check_filter 3649at_fn_diff_devnull "$at_stderr" || at_failed=: 3650$at_diff expout "$at_stdout" || at_failed=: 3651at_fn_check_status 0 $at_status "$at_srcdir/struct.at:33" 3652$at_failed && at_fn_log_failure 3653$at_traceon; } 3654 3655 set +x 3656 $at_times_p && times >"$at_times_file" 3657) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3658read at_status <"$at_status_file" 3659#AT_STOP_24 3660#AT_START_25 3661at_fn_group_banner 25 'struct.at:49' \ 3662 "ANSI C function returning a struct" " " 1 3663at_xfail=no 3664( 3665 $as_echo "25. $at_setup_line: testing $at_desc ..." 3666 $at_traceon 3667 3668 3669 3670cat >prog <<'_ATEOF' 3671struct s * 3672foo(int arg) 3673{ 3674 bar(); 3675} 3676int 3677main(int argc, char **argv) 3678{ 3679 foo(); 3680} 3681 3682_ATEOF 3683 3684 3685cat >expout <<'_ATEOF' 3686main() <int main (int argc, char **argv) at prog:7>: 3687 foo() <struct s *foo (int arg) at prog:2>: 3688 bar() 3689_ATEOF 3690 3691{ set +x 3692$as_echo "$at_srcdir/struct.at:49: cflow prog" 3693at_fn_check_prepare_trace "struct.at:49" 3694( $at_check_trace; cflow prog 3695) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3696at_status=$? at_failed=false 3697$at_check_filter 3698at_fn_diff_devnull "$at_stderr" || at_failed=: 3699$at_diff expout "$at_stdout" || at_failed=: 3700at_fn_check_status 0 $at_status "$at_srcdir/struct.at:49" 3701$at_failed && at_fn_log_failure 3702$at_traceon; } 3703 3704 set +x 3705 $at_times_p && times >"$at_times_file" 3706) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3707read at_status <"$at_status_file" 3708#AT_STOP_25 3709#AT_START_26 3710at_fn_group_banner 26 'struct.at:67' \ 3711 "K&R C function returning a struct" " " 1 3712at_xfail=no 3713( 3714 $as_echo "26. $at_setup_line: testing $at_desc ..." 3715 $at_traceon 3716 3717 3718 3719cat >prog <<'_ATEOF' 3720struct s * 3721foo(arg) 3722 int arg; 3723{ 3724 bar(); 3725} 3726int 3727main(argc, argv) 3728 int argc; 3729 char **argv; 3730{ 3731 foo(); 3732} 3733 3734_ATEOF 3735 3736 3737cat >expout <<'_ATEOF' 3738main() <int main (argc, argv) at prog:8>: 3739 foo() <struct s *foo (arg) at prog:2>: 3740 bar() 3741_ATEOF 3742 3743{ set +x 3744$as_echo "$at_srcdir/struct.at:67: cflow prog" 3745at_fn_check_prepare_trace "struct.at:67" 3746( $at_check_trace; cflow prog 3747) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3748at_status=$? at_failed=false 3749$at_check_filter 3750at_fn_diff_devnull "$at_stderr" || at_failed=: 3751$at_diff expout "$at_stdout" || at_failed=: 3752at_fn_check_status 0 $at_status "$at_srcdir/struct.at:67" 3753$at_failed && at_fn_log_failure 3754$at_traceon; } 3755 3756 set +x 3757 $at_times_p && times >"$at_times_file" 3758) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3759read at_status <"$at_status_file" 3760#AT_STOP_26 3761#AT_START_27 3762at_fn_group_banner 27 'struct.at:88' \ 3763 "struct as argument" " " 1 3764at_xfail=no 3765( 3766 $as_echo "27. $at_setup_line: testing $at_desc ..." 3767 $at_traceon 3768 3769 3770 3771cat >prog <<'_ATEOF' 3772int 3773foo(struct bar *x) 3774{ 3775} 3776 3777_ATEOF 3778 3779 3780cat >expout <<'_ATEOF' 3781foo() <int foo (struct bar *x) at prog:2> 3782_ATEOF 3783 3784{ set +x 3785$as_echo "$at_srcdir/struct.at:88: cflow -m foo prog" 3786at_fn_check_prepare_trace "struct.at:88" 3787( $at_check_trace; cflow -m foo prog 3788) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3789at_status=$? at_failed=false 3790$at_check_filter 3791at_fn_diff_devnull "$at_stderr" || at_failed=: 3792$at_diff expout "$at_stdout" || at_failed=: 3793at_fn_check_status 0 $at_status "$at_srcdir/struct.at:88" 3794$at_failed && at_fn_log_failure 3795$at_traceon; } 3796 3797 set +x 3798 $at_times_p && times >"$at_times_file" 3799) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3800read at_status <"$at_status_file" 3801#AT_STOP_27 3802#AT_START_28 3803at_fn_group_banner 28 'struct.at:100' \ 3804 "struct variable" " " 1 3805at_xfail=no 3806( 3807 $as_echo "28. $at_setup_line: testing $at_desc ..." 3808 $at_traceon 3809 3810 3811 3812cat >prog <<'_ATEOF' 3813struct { int x; int y; } point; 3814 3815_ATEOF 3816 3817 3818cat >expout <<'_ATEOF' 3819point * prog:1 struct { ... } point 3820_ATEOF 3821 3822{ set +x 3823$as_echo "$at_srcdir/struct.at:100: cflow -x -ix prog" 3824at_fn_check_prepare_trace "struct.at:100" 3825( $at_check_trace; cflow -x -ix prog 3826) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3827at_status=$? at_failed=false 3828$at_check_filter 3829at_fn_diff_devnull "$at_stderr" || at_failed=: 3830$at_diff expout "$at_stdout" || at_failed=: 3831at_fn_check_status 0 $at_status "$at_srcdir/struct.at:100" 3832$at_failed && at_fn_log_failure 3833$at_traceon; } 3834 3835 set +x 3836 $at_times_p && times >"$at_times_file" 3837) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3838read at_status <"$at_status_file" 3839#AT_STOP_28 3840#AT_START_29 3841at_fn_group_banner 29 'struct.at:109' \ 3842 "array of structs" " " 1 3843at_xfail=no 3844( 3845 $as_echo "29. $at_setup_line: testing $at_desc ..." 3846 $at_traceon 3847 3848 3849 3850cat >prog <<'_ATEOF' 3851struct X { 3852 char *name; 3853} X[] = { 3854 { "foo" }, 3855}; 3856 3857_ATEOF 3858 3859 3860cat >expout <<'_ATEOF' 3861X * prog:3 struct X { char *name } X[] 3862_ATEOF 3863 3864{ set +x 3865$as_echo "$at_srcdir/struct.at:109: cflow -x -ix prog" 3866at_fn_check_prepare_trace "struct.at:109" 3867( $at_check_trace; cflow -x -ix prog 3868) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3869at_status=$? at_failed=false 3870$at_check_filter 3871at_fn_diff_devnull "$at_stderr" || at_failed=: 3872$at_diff expout "$at_stdout" || at_failed=: 3873at_fn_check_status 0 $at_status "$at_srcdir/struct.at:109" 3874$at_failed && at_fn_log_failure 3875$at_traceon; } 3876 3877 set +x 3878 $at_times_p && times >"$at_times_file" 3879) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3880read at_status <"$at_status_file" 3881#AT_STOP_29 3882#AT_START_30 3883at_fn_group_banner 30 'typedef.at:19' \ 3884 "structs with same members" " " 2 3885at_xfail=no 3886( 3887 $as_echo "30. $at_setup_line: testing $at_desc ..." 3888 $at_traceon 3889 3890 3891 3892cat >prog <<'_ATEOF' 3893typedef struct x { 3894 char **foo; 3895} X; 3896typedef struct y { 3897 char **foo; 3898} Y; 3899 3900_ATEOF 3901 3902 3903cat >expout <<'_ATEOF' 3904X t prog:3 3905Y t prog:6 3906_ATEOF 3907 3908{ set +x 3909$as_echo "$at_srcdir/typedef.at:19: cflow -x -it prog" 3910at_fn_check_prepare_trace "typedef.at:19" 3911( $at_check_trace; cflow -x -it prog 3912) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3913at_status=$? at_failed=false 3914$at_check_filter 3915at_fn_diff_devnull "$at_stderr" || at_failed=: 3916$at_diff expout "$at_stdout" || at_failed=: 3917at_fn_check_status 0 $at_status "$at_srcdir/typedef.at:19" 3918$at_failed && at_fn_log_failure 3919$at_traceon; } 3920 3921 set +x 3922 $at_times_p && times >"$at_times_file" 3923) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3924read at_status <"$at_status_file" 3925#AT_STOP_30 3926#AT_START_31 3927at_fn_group_banner 31 'typedef.at:19' \ 3928 "structs with tags matching typedef" " " 2 3929at_xfail=no 3930( 3931 $as_echo "31. $at_setup_line: testing $at_desc ..." 3932 $at_traceon 3933 3934 3935 3936cat >prog <<'_ATEOF' 3937typedef struct X { 3938 char **foo; 3939} X; 3940typedef struct Y { 3941 char **foo; 3942} Y; 3943 3944_ATEOF 3945 3946 3947cat >expout <<'_ATEOF' 3948X t prog:3 3949Y t prog:6 3950_ATEOF 3951 3952{ set +x 3953$as_echo "$at_srcdir/typedef.at:19: cflow -x -it prog" 3954at_fn_check_prepare_trace "typedef.at:19" 3955( $at_check_trace; cflow -x -it prog 3956) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3957at_status=$? at_failed=false 3958$at_check_filter 3959at_fn_diff_devnull "$at_stderr" || at_failed=: 3960$at_diff expout "$at_stdout" || at_failed=: 3961at_fn_check_status 0 $at_status "$at_srcdir/typedef.at:19" 3962$at_failed && at_fn_log_failure 3963$at_traceon; } 3964 3965 set +x 3966 $at_times_p && times >"$at_times_file" 3967) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3968read at_status <"$at_status_file" 3969#AT_STOP_31 3970#AT_START_32 3971at_fn_group_banner 32 'typedef.at:19' \ 3972 "typedef to pointer" " " 2 3973at_xfail=no 3974( 3975 $as_echo "32. $at_setup_line: testing $at_desc ..." 3976 $at_traceon 3977 3978 3979 3980cat >prog <<'_ATEOF' 3981typedef struct X { 3982 char **foo; 3983} **X; 3984 3985_ATEOF 3986 3987 3988cat >expout <<'_ATEOF' 3989X t prog:3 3990_ATEOF 3991 3992{ set +x 3993$as_echo "$at_srcdir/typedef.at:19: cflow -x -it prog" 3994at_fn_check_prepare_trace "typedef.at:19" 3995( $at_check_trace; cflow -x -it prog 3996) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3997at_status=$? at_failed=false 3998$at_check_filter 3999at_fn_diff_devnull "$at_stderr" || at_failed=: 4000$at_diff expout "$at_stdout" || at_failed=: 4001at_fn_check_status 0 $at_status "$at_srcdir/typedef.at:19" 4002$at_failed && at_fn_log_failure 4003$at_traceon; } 4004 4005 set +x 4006 $at_times_p && times >"$at_times_file" 4007) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4008read at_status <"$at_status_file" 4009#AT_STOP_32 4010#AT_START_33 4011at_fn_group_banner 33 'typedef.at:19' \ 4012 "modifiers" " " 2 4013at_xfail=no 4014( 4015 $as_echo "33. $at_setup_line: testing $at_desc ..." 4016 $at_traceon 4017 4018 4019 4020cat >prog <<'_ATEOF' 4021typedef struct X const *Y; 4022 4023_ATEOF 4024 4025 4026cat >expout <<'_ATEOF' 4027Y t prog:1 4028_ATEOF 4029 4030{ set +x 4031$as_echo "$at_srcdir/typedef.at:19: cflow -x -it prog" 4032at_fn_check_prepare_trace "typedef.at:19" 4033( $at_check_trace; cflow -x -it prog 4034) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4035at_status=$? at_failed=false 4036$at_check_filter 4037at_fn_diff_devnull "$at_stderr" || at_failed=: 4038$at_diff expout "$at_stdout" || at_failed=: 4039at_fn_check_status 0 $at_status "$at_srcdir/typedef.at:19" 4040$at_failed && at_fn_log_failure 4041$at_traceon; } 4042 4043 set +x 4044 $at_times_p && times >"$at_times_file" 4045) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4046read at_status <"$at_status_file" 4047#AT_STOP_33 4048#AT_START_34 4049at_fn_group_banner 34 'all.at:20' \ 4050 "default" " " 3 4051at_xfail=no 4052( 4053 $as_echo "34. $at_setup_line: testing $at_desc ..." 4054 $at_traceon 4055 4056 4057 4058cat >prog <<'_ATEOF' 4059int 4060foo(void) 4061{ 4062 baz(); 4063} 4064int 4065bar(void) 4066{ 4067 qux(); 4068} 4069void 4070qux(void) 4071{ 4072 boom(); 4073} 4074 4075_ATEOF 4076 4077 4078cat >expout <<'_ATEOF' 4079bar() <int bar (void) at prog:7>: 4080 qux() <void qux (void) at prog:12>: 4081 boom() 4082foo() <int foo (void) at prog:2>: 4083 baz() 4084_ATEOF 4085 4086{ set +x 4087$as_echo "$at_srcdir/all.at:20: cflow prog" 4088at_fn_check_prepare_trace "all.at:20" 4089( $at_check_trace; cflow prog 4090) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4091at_status=$? at_failed=false 4092$at_check_filter 4093at_fn_diff_devnull "$at_stderr" || at_failed=: 4094$at_diff expout "$at_stdout" || at_failed=: 4095at_fn_check_status 0 $at_status "$at_srcdir/all.at:20" 4096$at_failed && at_fn_log_failure 4097$at_traceon; } 4098 4099 set +x 4100 $at_times_p && times >"$at_times_file" 4101) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4102read at_status <"$at_status_file" 4103#AT_STOP_34 4104#AT_START_35 4105at_fn_group_banner 35 'all.at:47' \ 4106 "default (main present)" " " 3 4107at_xfail=no 4108( 4109 $as_echo "35. $at_setup_line: testing $at_desc ..." 4110 $at_traceon 4111 4112 4113 4114cat >prog <<'_ATEOF' 4115int 4116foo(void) 4117{ 4118 baz(); 4119} 4120int 4121bar(void) 4122{ 4123 qux(); 4124} 4125void 4126qux(void) 4127{ 4128 boom(); 4129} 4130int 4131main(void) 4132{ 4133 zuuq(); 4134} 4135 4136_ATEOF 4137 4138 4139cat >expout <<'_ATEOF' 4140main() <int main (void) at prog:17>: 4141 zuuq() 4142_ATEOF 4143 4144{ set +x 4145$as_echo "$at_srcdir/all.at:47: cflow prog" 4146at_fn_check_prepare_trace "all.at:47" 4147( $at_check_trace; cflow prog 4148) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4149at_status=$? at_failed=false 4150$at_check_filter 4151at_fn_diff_devnull "$at_stderr" || at_failed=: 4152$at_diff expout "$at_stdout" || at_failed=: 4153at_fn_check_status 0 $at_status "$at_srcdir/all.at:47" 4154$at_failed && at_fn_log_failure 4155$at_traceon; } 4156 4157 set +x 4158 $at_times_p && times >"$at_times_file" 4159) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4160read at_status <"$at_status_file" 4161#AT_STOP_35 4162#AT_START_36 4163at_fn_group_banner 36 'all.at:76' \ 4164 "the --main option" " " 3 4165at_xfail=no 4166( 4167 $as_echo "36. $at_setup_line: testing $at_desc ..." 4168 $at_traceon 4169 4170 4171 4172cat >prog <<'_ATEOF' 4173int 4174foo(void) 4175{ 4176 baz(); 4177} 4178int 4179bar(void) 4180{ 4181 qux(); 4182} 4183void 4184qux(void) 4185{ 4186 boom(); 4187} 4188 4189_ATEOF 4190 4191 4192cat >expout <<'_ATEOF' 4193foo() <int foo (void) at prog:2>: 4194 baz() 4195_ATEOF 4196 4197{ set +x 4198$as_echo "$at_srcdir/all.at:76: cflow --main=foo prog" 4199at_fn_check_prepare_trace "all.at:76" 4200( $at_check_trace; cflow --main=foo prog 4201) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4202at_status=$? at_failed=false 4203$at_check_filter 4204at_fn_diff_devnull "$at_stderr" || at_failed=: 4205$at_diff expout "$at_stdout" || at_failed=: 4206at_fn_check_status 0 $at_status "$at_srcdir/all.at:76" 4207$at_failed && at_fn_log_failure 4208$at_traceon; } 4209 4210 set +x 4211 $at_times_p && times >"$at_times_file" 4212) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4213read at_status <"$at_status_file" 4214#AT_STOP_36 4215#AT_START_37 4216at_fn_group_banner 37 'all.at:102' \ 4217 "the --all option" " " 3 4218at_xfail=no 4219( 4220 $as_echo "37. $at_setup_line: testing $at_desc ..." 4221 $at_traceon 4222 4223 4224 4225cat >prog <<'_ATEOF' 4226int 4227foo(void) 4228{ 4229 baz(); 4230} 4231int 4232bar(void) 4233{ 4234 qux(); 4235} 4236void 4237qux(void) 4238{ 4239 boom(); 4240} 4241 4242_ATEOF 4243 4244 4245cat >expout <<'_ATEOF' 4246bar() <int bar (void) at prog:7>: 4247 qux() <void qux (void) at prog:12>: 4248 boom() 4249foo() <int foo (void) at prog:2>: 4250 baz() 4251_ATEOF 4252 4253{ set +x 4254$as_echo "$at_srcdir/all.at:102: cflow --all prog" 4255at_fn_check_prepare_trace "all.at:102" 4256( $at_check_trace; cflow --all prog 4257) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4258at_status=$? at_failed=false 4259$at_check_filter 4260at_fn_diff_devnull "$at_stderr" || at_failed=: 4261$at_diff expout "$at_stdout" || at_failed=: 4262at_fn_check_status 0 $at_status "$at_srcdir/all.at:102" 4263$at_failed && at_fn_log_failure 4264$at_traceon; } 4265 4266 set +x 4267 $at_times_p && times >"$at_times_file" 4268) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4269read at_status <"$at_status_file" 4270#AT_STOP_37 4271#AT_START_38 4272at_fn_group_banner 38 'all.at:131' \ 4273 "the --all --all option" " " 3 4274at_xfail=no 4275( 4276 $as_echo "38. $at_setup_line: testing $at_desc ..." 4277 $at_traceon 4278 4279 4280 4281cat >prog <<'_ATEOF' 4282int 4283foo(void) 4284{ 4285 baz(); 4286} 4287int 4288bar(void) 4289{ 4290 qux(); 4291} 4292void 4293qux(void) 4294{ 4295 boom(); 4296} 4297 4298_ATEOF 4299 4300 4301cat >expout <<'_ATEOF' 4302bar() <int bar (void) at prog:7>: 4303 qux() <void qux (void) at prog:12>: 4304 boom() 4305foo() <int foo (void) at prog:2>: 4306 baz() 4307qux() <void qux (void) at prog:12>: 4308 boom() 4309_ATEOF 4310 4311{ set +x 4312$as_echo "$at_srcdir/all.at:131: cflow --all --all prog" 4313at_fn_check_prepare_trace "all.at:131" 4314( $at_check_trace; cflow --all --all prog 4315) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4316at_status=$? at_failed=false 4317$at_check_filter 4318at_fn_diff_devnull "$at_stderr" || at_failed=: 4319$at_diff expout "$at_stdout" || at_failed=: 4320at_fn_check_status 0 $at_status "$at_srcdir/all.at:131" 4321$at_failed && at_fn_log_failure 4322$at_traceon; } 4323 4324 set +x 4325 $at_times_p && times >"$at_times_file" 4326) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4327read at_status <"$at_status_file" 4328#AT_STOP_38 4329#AT_START_39 4330at_fn_group_banner 39 'all.at:162' \ 4331 "the --all option with main" " " 3 4332at_xfail=no 4333( 4334 $as_echo "39. $at_setup_line: testing $at_desc ..." 4335 $at_traceon 4336 4337 4338 4339cat >prog <<'_ATEOF' 4340int 4341foo(void) 4342{ 4343 baz(); 4344} 4345int 4346bar(void) 4347{ 4348 qux(); 4349} 4350void 4351qux(void) 4352{ 4353 boom(); 4354} 4355int 4356main(void) 4357{ 4358 zuuq(); 4359} 4360 4361_ATEOF 4362 4363 4364cat >expout <<'_ATEOF' 4365main() <int main (void) at prog:17>: 4366 zuuq() 4367bar() <int bar (void) at prog:7>: 4368 qux() <void qux (void) at prog:12>: 4369 boom() 4370foo() <int foo (void) at prog:2>: 4371 baz() 4372_ATEOF 4373 4374{ set +x 4375$as_echo "$at_srcdir/all.at:162: cflow --all prog" 4376at_fn_check_prepare_trace "all.at:162" 4377( $at_check_trace; cflow --all prog 4378) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4379at_status=$? at_failed=false 4380$at_check_filter 4381at_fn_diff_devnull "$at_stderr" || at_failed=: 4382$at_diff expout "$at_stdout" || at_failed=: 4383at_fn_check_status 0 $at_status "$at_srcdir/all.at:162" 4384$at_failed && at_fn_log_failure 4385$at_traceon; } 4386 4387 set +x 4388 $at_times_p && times >"$at_times_file" 4389) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4390read at_status <"$at_status_file" 4391#AT_STOP_39 4392#AT_START_40 4393at_fn_group_banner 40 'all.at:198' \ 4394 "the --all --all option with main" " " 3 4395at_xfail=no 4396( 4397 $as_echo "40. $at_setup_line: testing $at_desc ..." 4398 $at_traceon 4399 4400 4401 4402cat >prog <<'_ATEOF' 4403int 4404foo(void) 4405{ 4406 baz(); 4407} 4408int 4409bar(void) 4410{ 4411 qux(); 4412} 4413void 4414qux(void) 4415{ 4416 boom(); 4417} 4418int 4419main(void) 4420{ 4421 zuuq(); 4422} 4423 4424_ATEOF 4425 4426 4427cat >expout <<'_ATEOF' 4428main() <int main (void) at prog:17>: 4429 zuuq() 4430bar() <int bar (void) at prog:7>: 4431 qux() <void qux (void) at prog:12>: 4432 boom() 4433foo() <int foo (void) at prog:2>: 4434 baz() 4435qux() <void qux (void) at prog:12>: 4436 boom() 4437_ATEOF 4438 4439{ set +x 4440$as_echo "$at_srcdir/all.at:198: cflow --all --all prog" 4441at_fn_check_prepare_trace "all.at:198" 4442( $at_check_trace; cflow --all --all prog 4443) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4444at_status=$? at_failed=false 4445$at_check_filter 4446at_fn_diff_devnull "$at_stderr" || at_failed=: 4447$at_diff expout "$at_stdout" || at_failed=: 4448at_fn_check_status 0 $at_status "$at_srcdir/all.at:198" 4449$at_failed && at_fn_log_failure 4450$at_traceon; } 4451 4452 set +x 4453 $at_times_p && times >"$at_times_file" 4454) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4455read at_status <"$at_status_file" 4456#AT_STOP_40 4457#AT_START_41 4458at_fn_group_banner 41 'all.at:236' \ 4459 "the --no-main option" " " 3 4460at_xfail=no 4461( 4462 $as_echo "41. $at_setup_line: testing $at_desc ..." 4463 $at_traceon 4464 4465 4466 4467cat >prog <<'_ATEOF' 4468int 4469foo(void) 4470{ 4471 baz(); 4472} 4473int 4474bar(void) 4475{ 4476 qux(); 4477} 4478void 4479qux(void) 4480{ 4481 boom(); 4482} 4483 4484_ATEOF 4485 4486 4487cat >expout <<'_ATEOF' 4488bar() <int bar (void) at prog:7>: 4489 qux() <void qux (void) at prog:12>: 4490 boom() 4491foo() <int foo (void) at prog:2>: 4492 baz() 4493_ATEOF 4494 4495{ set +x 4496$as_echo "$at_srcdir/all.at:236: cflow --no-main prog" 4497at_fn_check_prepare_trace "all.at:236" 4498( $at_check_trace; cflow --no-main prog 4499) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4500at_status=$? at_failed=false 4501$at_check_filter 4502at_fn_diff_devnull "$at_stderr" || at_failed=: 4503$at_diff expout "$at_stdout" || at_failed=: 4504at_fn_check_status 0 $at_status "$at_srcdir/all.at:236" 4505$at_failed && at_fn_log_failure 4506$at_traceon; } 4507 4508 set +x 4509 $at_times_p && times >"$at_times_file" 4510) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4511read at_status <"$at_status_file" 4512#AT_STOP_41 4513#AT_START_42 4514at_fn_group_banner 42 'all.at:266' \ 4515 "the --no-main option with main" " " 3 4516at_xfail=no 4517( 4518 $as_echo "42. $at_setup_line: testing $at_desc ..." 4519 $at_traceon 4520 4521 4522 4523cat >prog <<'_ATEOF' 4524int 4525foo(void) 4526{ 4527 baz(); 4528} 4529int 4530bar(void) 4531{ 4532 qux(); 4533} 4534void 4535qux(void) 4536{ 4537 boom(); 4538} 4539int 4540main(void) 4541{ 4542 zuuq(); 4543} 4544 4545_ATEOF 4546 4547 4548cat >expout <<'_ATEOF' 4549bar() <int bar (void) at prog:7>: 4550 qux() <void qux (void) at prog:12>: 4551 boom() 4552foo() <int foo (void) at prog:2>: 4553 baz() 4554main() <int main (void) at prog:17>: 4555 zuuq() 4556_ATEOF 4557 4558{ set +x 4559$as_echo "$at_srcdir/all.at:266: cflow --no-main prog" 4560at_fn_check_prepare_trace "all.at:266" 4561( $at_check_trace; cflow --no-main prog 4562) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4563at_status=$? at_failed=false 4564$at_check_filter 4565at_fn_diff_devnull "$at_stderr" || at_failed=: 4566$at_diff expout "$at_stdout" || at_failed=: 4567at_fn_check_status 0 $at_status "$at_srcdir/all.at:266" 4568$at_failed && at_fn_log_failure 4569$at_traceon; } 4570 4571 set +x 4572 $at_times_p && times >"$at_times_file" 4573) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4574read at_status <"$at_status_file" 4575#AT_STOP_42 4576