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='pies' 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;GNU pies version;; 5942;control.at:17;Control interface;; 5953;cyclic.at:17;Detecting cyclic dependencies;; 5964;respawn.at:17;Respawn components;; 5975;redirect.at:17;stdout redirection;redirect; 5986;ret-exec.at:17;Exec on return code;ret-exec; 5997;ret-notify.at:17;Notify on return code;ret-notify; 6008;startup.at:17;Startup components;; 6019;shutdown.at:17;Shutdown components;; 60210;shell.at:17;flags shell;; 60311;expandenv.at:17;flags expandenv;; 60412;inet.at:16;inet component;; 60513;maxinst.at:17;inet component: max instances;; 60614;builtin.at:107;echo;inetd builtin internal echo; 60715;builtin.at:117;discard;inetd builtin internal discard; 60816;builtin.at:123;time;inetd builtin internal time; 60917;builtin.at:124;daytime;inetd builtin internal daytime; 61018;builtin.at:125;chargen;inetd builtin internal chargen; 61119;builtin.at:126;qotd;inetd builtin internal qotd; 61220;builtin.at:196;tcpmux: help;inetd builtin internal tcpmux help; 61321;builtin.at:201;tcpmux: service;inetd builtin internal tcpmux service; 61422;passfd.at:16;pass-fd component;; 61523;accept.at:16;accept component;; 61624;envop.at:31;default environment;envop defenv; 61725;envop.at:43;clear;envop clear; 61826;envop.at:45;keep name;envop keep; 61927;envop.at:50;keep name=value;envop keep; 62028;envop.at:54;keep name=value (mismatch);envop keep; 62129;envop.at:56;keep wildcard;envop keep; 62230;envop.at:63;keep wildcard (2);envop keep; 62331;envop.at:68;keep wildcard (mismatch);envop keep; 62432;envop.at:70;set;envop set; 62533;envop.at:84;set (variable expansion);envop set; 62634;envop.at:96;unset name;envop unset; 62735;envop.at:107;unset wildcard;envop unset; 62836;envop.at:115;unset with value;envop unset; 62937;envop.at:126;unset with value (mismatch);envop unset; 63038;env.at:54;clear;env clear; 63139;env.at:56;keep;env keep; 63240;env.at:63;set;env set; 63341;env.at:77;unset;env unset; 63442;env.at:122;clear;env clear; 63543;env.at:123;keep;env keep; 63644;env.at:128;set;env set; 63745;env.at:143;unset;env unset; 63846;envglobal.at:54;clear;env clear; 63947;envglobal.at:56;keep;env keep; 64048;envglobal.at:63;set;env set; 64149;envglobal.at:77;unset;env unset; 642" 643# List of the all the test groups. 644at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'` 645 646# at_fn_validate_ranges NAME... 647# ----------------------------- 648# Validate and normalize the test group number contained in each variable 649# NAME. Leading zeroes are treated as decimal. 650at_fn_validate_ranges () 651{ 652 for at_grp 653 do 654 eval at_value=\$$at_grp 655 if test $at_value -lt 1 || test $at_value -gt 49; then 656 $as_echo "invalid test group: $at_value" >&2 657 exit 1 658 fi 659 case $at_value in 660 0*) # We want to treat leading 0 as decimal, like expr and test, but 661 # AS_VAR_ARITH treats it as octal if it uses $(( )). 662 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the 663 # expr fork, but it is not worth the effort to determine if the 664 # shell supports XSI when the user can just avoid leading 0. 665 eval $at_grp='`expr $at_value + 0`' ;; 666 esac 667 done 668} 669 670at_prev= 671for at_option 672do 673 # If the previous option needs an argument, assign it. 674 if test -n "$at_prev"; then 675 at_option=$at_prev=$at_option 676 at_prev= 677 fi 678 679 case $at_option in 680 *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;; 681 *) at_optarg= ;; 682 esac 683 684 # Accept the important Cygnus configure options, so we can diagnose typos. 685 686 case $at_option in 687 --help | -h ) 688 at_help_p=: 689 ;; 690 691 --list | -l ) 692 at_list_p=: 693 ;; 694 695 --version | -V ) 696 at_version_p=: 697 ;; 698 699 --clean | -c ) 700 at_clean=: 701 ;; 702 703 --color ) 704 at_color=always 705 ;; 706 --color=* ) 707 case $at_optarg in 708 no | never | none) at_color=never ;; 709 auto | tty | if-tty) at_color=auto ;; 710 always | yes | force) at_color=always ;; 711 *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'` 712 as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;; 713 esac 714 ;; 715 716 --debug | -d ) 717 at_debug_p=: 718 ;; 719 720 --errexit | -e ) 721 at_debug_p=: 722 at_errexit_p=: 723 ;; 724 725 --verbose | -v ) 726 at_verbose=; at_quiet=: 727 ;; 728 729 --trace | -x ) 730 at_traceon='set -x' 731 at_trace_echo=echo 732 at_check_filter_trace=at_fn_filter_trace 733 ;; 734 735 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]) 736 at_fn_validate_ranges at_option 737 as_fn_append at_groups "$at_option$as_nl" 738 ;; 739 740 # Ranges 741 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-) 742 at_range_start=`echo $at_option |tr -d X-` 743 at_fn_validate_ranges at_range_start 744 at_range=`$as_echo "$at_groups_all" | \ 745 sed -ne '/^'$at_range_start'$/,$p'` 746 as_fn_append at_groups "$at_range$as_nl" 747 ;; 748 749 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]) 750 at_range_end=`echo $at_option |tr -d X-` 751 at_fn_validate_ranges at_range_end 752 at_range=`$as_echo "$at_groups_all" | \ 753 sed -ne '1,/^'$at_range_end'$/p'` 754 as_fn_append at_groups "$at_range$as_nl" 755 ;; 756 757 [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \ 758 [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \ 759 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \ 760 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \ 761 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \ 762 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] ) 763 at_range_start=`expr $at_option : '\(.*\)-'` 764 at_range_end=`expr $at_option : '.*-\(.*\)'` 765 if test $at_range_start -gt $at_range_end; then 766 at_tmp=$at_range_end 767 at_range_end=$at_range_start 768 at_range_start=$at_tmp 769 fi 770 at_fn_validate_ranges at_range_start at_range_end 771 at_range=`$as_echo "$at_groups_all" | \ 772 sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'` 773 as_fn_append at_groups "$at_range$as_nl" 774 ;; 775 776 # Directory selection. 777 --directory | -C ) 778 at_prev=--directory 779 ;; 780 --directory=* ) 781 at_change_dir=: 782 at_dir=$at_optarg 783 if test x- = "x$at_dir" ; then 784 at_dir=./- 785 fi 786 ;; 787 788 # Parallel execution. 789 --jobs | -j ) 790 at_jobs=0 791 ;; 792 --jobs=* | -j[0-9]* ) 793 if test -n "$at_optarg"; then 794 at_jobs=$at_optarg 795 else 796 at_jobs=`expr X$at_option : 'X-j\(.*\)'` 797 fi 798 case $at_jobs in *[!0-9]*) 799 at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'` 800 as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;; 801 esac 802 ;; 803 804 # Keywords. 805 --keywords | -k ) 806 at_prev=--keywords 807 ;; 808 --keywords=* ) 809 at_groups_selected=$at_help_all 810 at_save_IFS=$IFS 811 IFS=, 812 set X $at_optarg 813 shift 814 IFS=$at_save_IFS 815 for at_keyword 816 do 817 at_invert= 818 case $at_keyword in 819 '!'*) 820 at_invert="-v" 821 at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'` 822 ;; 823 esac 824 # It is on purpose that we match the test group titles too. 825 at_groups_selected=`$as_echo "$at_groups_selected" | 826 grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"` 827 done 828 # Smash the keywords. 829 at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'` 830 as_fn_append at_groups "$at_groups_selected$as_nl" 831 ;; 832 --recheck) 833 at_recheck=: 834 ;; 835 836 *=*) 837 at_envvar=`expr "x$at_option" : 'x\([^=]*\)='` 838 # Reject names that are not valid shell variable names. 839 case $at_envvar in 840 '' | [0-9]* | *[!_$as_cr_alnum]* ) 841 as_fn_error $? "invalid variable name: \`$at_envvar'" ;; 842 esac 843 at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` 844 # Export now, but save eval for later and for debug scripts. 845 export $at_envvar 846 as_fn_append at_debug_args " $at_envvar='$at_value'" 847 ;; 848 849 *) $as_echo "$as_me: invalid option: $at_option" >&2 850 $as_echo "Try \`$0 --help' for more information." >&2 851 exit 1 852 ;; 853 esac 854done 855 856# Verify our last option didn't require an argument 857if test -n "$at_prev"; then : 858 as_fn_error $? "\`$at_prev' requires an argument" 859fi 860 861# The file containing the suite. 862at_suite_log=$at_dir/$as_me.log 863 864# Selected test groups. 865if test -z "$at_groups$at_recheck"; then 866 at_groups=$at_groups_all 867else 868 if test -n "$at_recheck" && test -r "$at_suite_log"; then 869 at_oldfails=`sed -n ' 870 /^Failed tests:$/,/^Skipped tests:$/{ 871 s/^[ ]*\([1-9][0-9]*\):.*/\1/p 872 } 873 /^Unexpected passes:$/,/^## Detailed failed tests/{ 874 s/^[ ]*\([1-9][0-9]*\):.*/\1/p 875 } 876 /^## Detailed failed tests/q 877 ' "$at_suite_log"` 878 as_fn_append at_groups "$at_oldfails$as_nl" 879 fi 880 # Sort the tests, removing duplicates. 881 at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'` 882fi 883 884if test x"$at_color" = xalways \ 885 || { test x"$at_color" = xauto && test -t 1; }; then 886 at_red=`printf '\033[0;31m'` 887 at_grn=`printf '\033[0;32m'` 888 at_lgn=`printf '\033[1;32m'` 889 at_blu=`printf '\033[1;34m'` 890 at_std=`printf '\033[m'` 891else 892 at_red= at_grn= at_lgn= at_blu= at_std= 893fi 894 895# Help message. 896if $at_help_p; then 897 cat <<_ATEOF || at_write_fail=1 898Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS] 899 900Run all the tests, or the selected TESTS, given by numeric ranges, and 901save a detailed log file. Upon failure, create debugging scripts. 902 903Do not change environment variables directly. Instead, set them via 904command line arguments. Set \`AUTOTEST_PATH' to select the executables 905to exercise. Each relative directory is expanded as build and source 906directories relative to the top level of this distribution. 907E.g., from within the build directory /tmp/foo-1.0, invoking this: 908 909 $ $0 AUTOTEST_PATH=bin 910 911is equivalent to the following, assuming the source directory is /src/foo-1.0: 912 913 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0 914_ATEOF 915cat <<_ATEOF || at_write_fail=1 916 917Operation modes: 918 -h, --help print the help message, then exit 919 -V, --version print version number, then exit 920 -c, --clean remove all the files this test suite might create and exit 921 -l, --list describes all the tests, or the selected TESTS 922_ATEOF 923cat <<_ATEOF || at_write_fail=1 924 925Execution tuning: 926 -C, --directory=DIR 927 change to directory DIR before starting 928 --color[=never|auto|always] 929 enable colored test results on terminal, or always 930 -j, --jobs[=N] 931 Allow N jobs at once; infinite jobs with no arg (default 1) 932 -k, --keywords=KEYWORDS 933 select the tests matching all the comma-separated KEYWORDS 934 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD 935 --recheck select all tests that failed or passed unexpectedly last time 936 -e, --errexit abort as soon as a test fails; implies --debug 937 -v, --verbose force more detailed output 938 default for debugging scripts 939 -d, --debug inhibit clean up and top-level logging 940 default for debugging scripts 941 -x, --trace enable tests shell tracing 942_ATEOF 943cat <<_ATEOF || at_write_fail=1 944 945Report bugs to <bug-pies@gnu.org.ua>. 946General help using GNU software: <http://www.gnu.org/gethelp/>. 947_ATEOF 948 exit $at_write_fail 949fi 950 951# List of tests. 952if $at_list_p; then 953 cat <<_ATEOF || at_write_fail=1 954GNU Pies 1.5 test suite test groups: 955 956 NUM: FILE-NAME:LINE TEST-GROUP-NAME 957 KEYWORDS 958 959_ATEOF 960 # Pass an empty line as separator between selected groups and help. 961 $as_echo "$at_groups$as_nl$as_nl$at_help_all" | 962 awk 'NF == 1 && FS != ";" { 963 selected[$ 1] = 1 964 next 965 } 966 /^$/ { FS = ";" } 967 NF > 0 { 968 if (selected[$ 1]) { 969 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 970 if ($ 4) { 971 lmax = 79 972 indent = " " 973 line = indent 974 len = length (line) 975 n = split ($ 4, a, " ") 976 for (i = 1; i <= n; i++) { 977 l = length (a[i]) + 1 978 if (i > 1 && len + l > lmax) { 979 print line 980 line = indent " " a[i] 981 len = length (line) 982 } else { 983 line = line " " a[i] 984 len += l 985 } 986 } 987 if (n) 988 print line 989 } 990 } 991 }' || at_write_fail=1 992 exit $at_write_fail 993fi 994if $at_version_p; then 995 $as_echo "$as_me (GNU Pies 1.5)" && 996 cat <<\_ATEOF || at_write_fail=1 997 998Copyright (C) 2012 Free Software Foundation, Inc. 999This test suite is free software; the Free Software Foundation gives 1000unlimited permission to copy, distribute and modify it. 1001_ATEOF 1002 exit $at_write_fail 1003fi 1004 1005# Should we print banners? Yes if more than one test is run. 1006case $at_groups in #( 1007 *$as_nl* ) 1008 at_print_banners=: ;; #( 1009 * ) at_print_banners=false ;; 1010esac 1011# Text for banner N, set to a single space once printed. 1012# Banner 1. testsuite.at:59 1013# Category starts at test group 1. 1014at_banner_text_1="Initial" 1015# Banner 2. testsuite.at:62 1016# Category starts at test group 3. 1017at_banner_text_2="Dependencies" 1018# Banner 3. testsuite.at:64 1019# Category starts at test group 4. 1020at_banner_text_3="Components" 1021# Banner 4. builtin.at:16 1022# Category starts at test group 14. 1023at_banner_text_4="inetd built-in services" 1024# Banner 5. envop.at:29 1025# Category starts at test group 24. 1026at_banner_text_5="Environment modification framework" 1027# Banner 6. env.at:52 1028# Category starts at test group 38. 1029at_banner_text_6="Environment statement" 1030# Banner 7. env.at:91 1031# Category starts at test group 42. 1032at_banner_text_7="env: legacy syntax" 1033# Banner 8. envglobal.at:52 1034# Category starts at test group 46. 1035at_banner_text_8="Global environment statement" 1036 1037# Take any -C into account. 1038if $at_change_dir ; then 1039 test x != "x$at_dir" && cd "$at_dir" \ 1040 || as_fn_error $? "unable to change directory" 1041 at_dir=`pwd` 1042fi 1043 1044# Load the config files for any default variable assignments. 1045for at_file in atconfig atlocal 1046do 1047 test -r $at_file || continue 1048 . ./$at_file || as_fn_error $? "invalid content: $at_file" 1049done 1050 1051# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: 1052: "${at_top_build_prefix=$at_top_builddir}" 1053 1054# Perform any assignments requested during argument parsing. 1055eval "$at_debug_args" 1056 1057# atconfig delivers names relative to the directory the test suite is 1058# in, but the groups themselves are run in testsuite-dir/group-dir. 1059if test -n "$at_top_srcdir"; then 1060 builddir=../.. 1061 for at_dir_var in srcdir top_srcdir top_build_prefix 1062 do 1063 eval at_val=\$at_$at_dir_var 1064 case $at_val in 1065 [\\/$]* | ?:[\\/]* ) at_prefix= ;; 1066 *) at_prefix=../../ ;; 1067 esac 1068 eval "$at_dir_var=\$at_prefix\$at_val" 1069 done 1070fi 1071 1072## -------------------- ## 1073## Directory structure. ## 1074## -------------------- ## 1075 1076# This is the set of directories and files used by this script 1077# (non-literals are capitalized): 1078# 1079# TESTSUITE - the testsuite 1080# TESTSUITE.log - summarizes the complete testsuite run 1081# TESTSUITE.dir/ - created during a run, remains after -d or failed test 1082# + at-groups/ - during a run: status of all groups in run 1083# | + NNN/ - during a run: meta-data about test group NNN 1084# | | + check-line - location (source file and line) of current AT_CHECK 1085# | | + status - exit status of current AT_CHECK 1086# | | + stdout - stdout of current AT_CHECK 1087# | | + stder1 - stderr, including trace 1088# | | + stderr - stderr, with trace filtered out 1089# | | + test-source - portion of testsuite that defines group 1090# | | + times - timestamps for computing duration 1091# | | + pass - created if group passed 1092# | | + xpass - created if group xpassed 1093# | | + fail - created if group failed 1094# | | + xfail - created if group xfailed 1095# | | + skip - created if group skipped 1096# + at-stop - during a run: end the run if this file exists 1097# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction 1098# + 0..NNN/ - created for each group NNN, remains after -d or failed test 1099# | + TESTSUITE.log - summarizes the group results 1100# | + ... - files created during the group 1101 1102# The directory the whole suite works in. 1103# Should be absolute to let the user `cd' at will. 1104at_suite_dir=$at_dir/$as_me.dir 1105# The file containing the suite ($at_dir might have changed since earlier). 1106at_suite_log=$at_dir/$as_me.log 1107# The directory containing helper files per test group. 1108at_helper_dir=$at_suite_dir/at-groups 1109# Stop file: if it exists, do not start new jobs. 1110at_stop_file=$at_suite_dir/at-stop 1111# The fifo used for the job dispatcher. 1112at_job_fifo=$at_suite_dir/at-job-fifo 1113 1114if $at_clean; then 1115 test -d "$at_suite_dir" && 1116 find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; 1117 rm -f -r "$at_suite_dir" "$at_suite_log" 1118 exit $? 1119fi 1120 1121# Don't take risks: use only absolute directories in PATH. 1122# 1123# For stand-alone test suites (ie. atconfig was not found), 1124# AUTOTEST_PATH is relative to `.'. 1125# 1126# For embedded test suites, AUTOTEST_PATH is relative to the top level 1127# of the package. Then expand it into build/src parts, since users 1128# may create executables in both places. 1129AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"` 1130at_path= 1131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1132for as_dir in $AUTOTEST_PATH $PATH 1133do 1134 IFS=$as_save_IFS 1135 test -z "$as_dir" && as_dir=. 1136 test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR 1137case $as_dir in 1138 [\\/]* | ?:[\\/]* ) 1139 as_fn_append at_path "$as_dir" 1140 ;; 1141 * ) 1142 if test -z "$at_top_build_prefix"; then 1143 # Stand-alone test suite. 1144 as_fn_append at_path "$as_dir" 1145 else 1146 # Embedded test suite. 1147 as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR" 1148 as_fn_append at_path "$at_top_srcdir/$as_dir" 1149 fi 1150 ;; 1151esac 1152 done 1153IFS=$as_save_IFS 1154 1155 1156# Now build and simplify PATH. 1157# 1158# There might be directories that don't exist, but don't redirect 1159# builtins' (eg., cd) stderr directly: Ultrix's sh hates that. 1160at_new_path= 1161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1162for as_dir in $at_path 1163do 1164 IFS=$as_save_IFS 1165 test -z "$as_dir" && as_dir=. 1166 test -d "$as_dir" || continue 1167case $as_dir in 1168 [\\/]* | ?:[\\/]* ) ;; 1169 * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; 1170esac 1171case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in 1172 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; 1173 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; 1174 *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;; 1175esac 1176 done 1177IFS=$as_save_IFS 1178 1179PATH=$at_new_path 1180export PATH 1181 1182# Setting up the FDs. 1183 1184 1185 1186# 5 is the log file. Not to be overwritten if `-d'. 1187if $at_debug_p; then 1188 at_suite_log=/dev/null 1189else 1190 : >"$at_suite_log" 1191fi 1192exec 5>>"$at_suite_log" 1193 1194# Banners and logs. 1195$as_echo "## ------------------------ ## 1196## GNU Pies 1.5 test suite. ## 1197## ------------------------ ##" 1198{ 1199 $as_echo "## ------------------------ ## 1200## GNU Pies 1.5 test suite. ## 1201## ------------------------ ##" 1202 echo 1203 1204 $as_echo "$as_me: command line was:" 1205 $as_echo " \$ $0 $at_cli_args" 1206 echo 1207 1208 # If ChangeLog exists, list a few lines in case it might help determining 1209 # the exact version. 1210 if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then 1211 $as_echo "## ---------- ## 1212## ChangeLog. ## 1213## ---------- ##" 1214 echo 1215 sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog" 1216 echo 1217 fi 1218 1219 { 1220cat <<_ASUNAME 1221## --------- ## 1222## Platform. ## 1223## --------- ## 1224 1225hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 1226uname -m = `(uname -m) 2>/dev/null || echo unknown` 1227uname -r = `(uname -r) 2>/dev/null || echo unknown` 1228uname -s = `(uname -s) 2>/dev/null || echo unknown` 1229uname -v = `(uname -v) 2>/dev/null || echo unknown` 1230 1231/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 1232/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 1233 1234/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 1235/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 1236/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 1237/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 1238/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 1239/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1240/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1241 1242_ASUNAME 1243 1244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1245for as_dir in $PATH 1246do 1247 IFS=$as_save_IFS 1248 test -z "$as_dir" && as_dir=. 1249 $as_echo "PATH: $as_dir" 1250 done 1251IFS=$as_save_IFS 1252 1253} 1254 echo 1255 1256 # Contents of the config files. 1257 for at_file in atconfig atlocal 1258 do 1259 test -r $at_file || continue 1260 $as_echo "$as_me: $at_file:" 1261 sed 's/^/| /' $at_file 1262 echo 1263 done 1264} >&5 1265 1266 1267## ------------------------- ## 1268## Autotest shell functions. ## 1269## ------------------------- ## 1270 1271# at_fn_banner NUMBER 1272# ------------------- 1273# Output banner NUMBER, provided the testsuite is running multiple groups and 1274# this particular banner has not yet been printed. 1275at_fn_banner () 1276{ 1277 $at_print_banners || return 0 1278 eval at_banner_text=\$at_banner_text_$1 1279 test "x$at_banner_text" = "x " && return 0 1280 eval "at_banner_text_$1=\" \"" 1281 if test -z "$at_banner_text"; then 1282 $at_first || echo 1283 else 1284 $as_echo "$as_nl$at_banner_text$as_nl" 1285 fi 1286} # at_fn_banner 1287 1288# at_fn_check_prepare_notrace REASON LINE 1289# --------------------------------------- 1290# Perform AT_CHECK preparations for the command at LINE for an untraceable 1291# command; REASON is the reason for disabling tracing. 1292at_fn_check_prepare_notrace () 1293{ 1294 $at_trace_echo "Not enabling shell tracing (command contains $1)" 1295 $as_echo "$2" >"$at_check_line_file" 1296 at_check_trace=: at_check_filter=: 1297 : >"$at_stdout"; : >"$at_stderr" 1298} 1299 1300# at_fn_check_prepare_trace LINE 1301# ------------------------------ 1302# Perform AT_CHECK preparations for the command at LINE for a traceable 1303# command. 1304at_fn_check_prepare_trace () 1305{ 1306 $as_echo "$1" >"$at_check_line_file" 1307 at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace 1308 : >"$at_stdout"; : >"$at_stderr" 1309} 1310 1311# at_fn_check_prepare_dynamic COMMAND LINE 1312# ---------------------------------------- 1313# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate 1314# preparation function. 1315at_fn_check_prepare_dynamic () 1316{ 1317 case $1 in 1318 *$as_nl*) 1319 at_fn_check_prepare_notrace 'an embedded newline' "$2" ;; 1320 *) 1321 at_fn_check_prepare_trace "$2" ;; 1322 esac 1323} 1324 1325# at_fn_filter_trace 1326# ------------------ 1327# Remove the lines in the file "$at_stderr" generated by "set -x" and print 1328# them to stderr. 1329at_fn_filter_trace () 1330{ 1331 mv "$at_stderr" "$at_stder1" 1332 grep '^ *+' "$at_stder1" >&2 1333 grep -v '^ *+' "$at_stder1" >"$at_stderr" 1334} 1335 1336# at_fn_log_failure FILE-LIST 1337# --------------------------- 1338# Copy the files in the list on stdout with a "> " prefix, and exit the shell 1339# with a failure exit code. 1340at_fn_log_failure () 1341{ 1342 for file 1343 do $as_echo "$file:"; sed 's/^/> /' "$file"; done 1344 echo 1 > "$at_status_file" 1345 exit 1 1346} 1347 1348# at_fn_check_skip EXIT-CODE LINE 1349# ------------------------------- 1350# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit 1351# the test group subshell with that same exit code. Use LINE in any report 1352# about test failure. 1353at_fn_check_skip () 1354{ 1355 case $1 in 1356 99) echo 99 > "$at_status_file"; at_failed=: 1357 $as_echo "$2: hard failure"; exit 99;; 1358 77) echo 77 > "$at_status_file"; exit 77;; 1359 esac 1360} 1361 1362# at_fn_check_status EXPECTED EXIT-CODE LINE 1363# ------------------------------------------ 1364# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing. 1365# Otherwise, if it is 77 or 99, exit the test group subshell with that same 1366# exit code; if it is anything else print an error message referring to LINE, 1367# and fail the test. 1368at_fn_check_status () 1369{ 1370 case $2 in 1371 $1 ) ;; 1372 77) echo 77 > "$at_status_file"; exit 77;; 1373 99) echo 99 > "$at_status_file"; at_failed=: 1374 $as_echo "$3: hard failure"; exit 99;; 1375 *) $as_echo "$3: exit code was $2, expected $1" 1376 at_failed=:;; 1377 esac 1378} 1379 1380# at_fn_diff_devnull FILE 1381# ----------------------- 1382# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff 1383# invocations. 1384at_fn_diff_devnull () 1385{ 1386 test -s "$1" || return 0 1387 $at_diff "$at_devnull" "$1" 1388} 1389 1390# at_fn_test NUMBER 1391# ----------------- 1392# Parse out test NUMBER from the tail of this file. 1393at_fn_test () 1394{ 1395 eval at_sed=\$at_sed$1 1396 sed "$at_sed" "$at_myself" > "$at_test_source" 1397} 1398 1399# at_fn_create_debugging_script 1400# ----------------------------- 1401# Create the debugging script $at_group_dir/run which will reproduce the 1402# current test group. 1403at_fn_create_debugging_script () 1404{ 1405 { 1406 echo "#! /bin/sh" && 1407 echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' && 1408 $as_echo "cd '$at_dir'" && 1409 $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" && 1410 echo 'exit 1' 1411 } >"$at_group_dir/run" && 1412 chmod +x "$at_group_dir/run" 1413} 1414 1415## -------------------------------- ## 1416## End of autotest shell functions. ## 1417## -------------------------------- ## 1418{ 1419 $as_echo "## ---------------- ## 1420## Tested programs. ## 1421## ---------------- ##" 1422 echo 1423} >&5 1424 1425# Report what programs are being tested. 1426for at_program in : $at_tested 1427do 1428 test "$at_program" = : && continue 1429 case $at_program in 1430 [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;; 1431 * ) 1432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1433for as_dir in $PATH 1434do 1435 IFS=$as_save_IFS 1436 test -z "$as_dir" && as_dir=. 1437 test -f "$as_dir/$at_program" && break 1438 done 1439IFS=$as_save_IFS 1440 1441 at_program_=$as_dir/$at_program ;; 1442 esac 1443 if test -f "$at_program_"; then 1444 { 1445 $as_echo "$at_srcdir/testsuite.at:55: $at_program_ --version" 1446 "$at_program_" --version </dev/null 1447 echo 1448 } >&5 2>&1 1449 else 1450 as_fn_error $? "cannot find $at_program" "$LINENO" 5 1451 fi 1452done 1453 1454{ 1455 $as_echo "## ------------------ ## 1456## Running the tests. ## 1457## ------------------ ##" 1458} >&5 1459 1460at_start_date=`date` 1461at_start_time=`date +%s 2>/dev/null` 1462$as_echo "$as_me: starting at: $at_start_date" >&5 1463 1464# Create the master directory if it doesn't already exist. 1465as_dir="$at_suite_dir"; as_fn_mkdir_p || 1466 as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5 1467 1468# Can we diff with `/dev/null'? DU 5.0 refuses. 1469if diff /dev/null /dev/null >/dev/null 2>&1; then 1470 at_devnull=/dev/null 1471else 1472 at_devnull=$at_suite_dir/devnull 1473 >"$at_devnull" 1474fi 1475 1476# Use `diff -u' when possible. 1477if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff" 1478then 1479 at_diff='diff -u' 1480else 1481 at_diff=diff 1482fi 1483 1484# Get the last needed group. 1485for at_group in : $at_groups; do :; done 1486 1487# Extract the start and end lines of each test group at the tail 1488# of this file 1489awk ' 1490BEGIN { FS="" } 1491/^#AT_START_/ { 1492 start = NR 1493} 1494/^#AT_STOP_/ { 1495 test = substr ($ 0, 10) 1496 print "at_sed" test "=\"1," start "d;" (NR-1) "q\"" 1497 if (test == "'"$at_group"'") exit 1498}' "$at_myself" > "$at_suite_dir/at-source-lines" && 1499. "$at_suite_dir/at-source-lines" || 1500 as_fn_error $? "cannot create test line number cache" "$LINENO" 5 1501rm -f "$at_suite_dir/at-source-lines" 1502 1503# Set number of jobs for `-j'; avoid more jobs than test groups. 1504set X $at_groups; shift; at_max_jobs=$# 1505if test $at_max_jobs -eq 0; then 1506 at_jobs=1 1507fi 1508if test $at_jobs -ne 1 && 1509 { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then 1510 at_jobs=$at_max_jobs 1511fi 1512 1513# If parallel mode, don't output banners, don't split summary lines. 1514if test $at_jobs -ne 1; then 1515 at_print_banners=false 1516 at_quiet=: 1517fi 1518 1519# Set up helper dirs. 1520rm -rf "$at_helper_dir" && 1521mkdir "$at_helper_dir" && 1522cd "$at_helper_dir" && 1523{ test -z "$at_groups" || mkdir $at_groups; } || 1524as_fn_error $? "testsuite directory setup failed" "$LINENO" 5 1525 1526# Functions for running a test group. We leave the actual 1527# test group execution outside of a shell function in order 1528# to avoid hitting zsh 4.x exit status bugs. 1529 1530# at_fn_group_prepare 1531# ------------------- 1532# Prepare for running a test group. 1533at_fn_group_prepare () 1534{ 1535 # The directory for additional per-group helper files. 1536 at_job_dir=$at_helper_dir/$at_group 1537 # The file containing the location of the last AT_CHECK. 1538 at_check_line_file=$at_job_dir/check-line 1539 # The file containing the exit status of the last command. 1540 at_status_file=$at_job_dir/status 1541 # The files containing the output of the tested commands. 1542 at_stdout=$at_job_dir/stdout 1543 at_stder1=$at_job_dir/stder1 1544 at_stderr=$at_job_dir/stderr 1545 # The file containing the code for a test group. 1546 at_test_source=$at_job_dir/test-source 1547 # The file containing dates. 1548 at_times_file=$at_job_dir/times 1549 1550 # Be sure to come back to the top test directory. 1551 cd "$at_suite_dir" 1552 1553 # Clearly separate the test groups when verbose. 1554 $at_first || $at_verbose echo 1555 1556 at_group_normalized=$at_group 1557 1558 eval 'while :; do 1559 case $at_group_normalized in #( 1560 '"$at_format"'*) break;; 1561 esac 1562 at_group_normalized=0$at_group_normalized 1563 done' 1564 1565 1566 # Create a fresh directory for the next test group, and enter. 1567 # If one already exists, the user may have invoked ./run from 1568 # within that directory; we remove the contents, but not the 1569 # directory itself, so that we aren't pulling the rug out from 1570 # under the shell's notion of the current directory. 1571 at_group_dir=$at_suite_dir/$at_group_normalized 1572 at_group_log=$at_group_dir/$as_me.log 1573 if test -d "$at_group_dir"; then 1574 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \; 1575 rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??* 1576fi || 1577 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5 1578$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;} 1579 # Be tolerant if the above `rm' was not able to remove the directory. 1580 as_dir="$at_group_dir"; as_fn_mkdir_p 1581 1582 echo 0 > "$at_status_file" 1583 1584 # In verbose mode, append to the log file *and* show on 1585 # the standard output; in quiet mode only write to the log. 1586 if test -z "$at_verbose"; then 1587 at_tee_pipe='tee -a "$at_group_log"' 1588 else 1589 at_tee_pipe='cat >> "$at_group_log"' 1590 fi 1591} 1592 1593# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER] 1594# ------------------------------------------------- 1595# Declare the test group ORDINAL, located at LINE with group description DESC, 1596# and residing under BANNER. Use PAD to align the status column. 1597at_fn_group_banner () 1598{ 1599 at_setup_line="$2" 1600 test -n "$5" && at_fn_banner $5 1601 at_desc="$3" 1602 case $1 in 1603 [0-9]) at_desc_line=" $1: ";; 1604 [0-9][0-9]) at_desc_line=" $1: " ;; 1605 *) at_desc_line="$1: " ;; 1606 esac 1607 as_fn_append at_desc_line "$3$4" 1608 $at_quiet $as_echo_n "$at_desc_line" 1609 echo "# -*- compilation -*-" >> "$at_group_log" 1610} 1611 1612# at_fn_group_postprocess 1613# ----------------------- 1614# Perform cleanup after running a test group. 1615at_fn_group_postprocess () 1616{ 1617 # Be sure to come back to the suite directory, in particular 1618 # since below we might `rm' the group directory we are in currently. 1619 cd "$at_suite_dir" 1620 1621 if test ! -f "$at_check_line_file"; then 1622 sed "s/^ */$as_me: WARNING: /" <<_ATEOF 1623 A failure happened in a test group before any test could be 1624 run. This means that test suite is improperly designed. Please 1625 report this failure to <bug-pies@gnu.org.ua>. 1626_ATEOF 1627 $as_echo "$at_setup_line" >"$at_check_line_file" 1628 at_status=99 1629 fi 1630 $at_verbose $as_echo_n "$at_group. $at_setup_line: " 1631 $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log" 1632 case $at_xfail:$at_status in 1633 yes:0) 1634 at_msg="UNEXPECTED PASS" 1635 at_res=xpass 1636 at_errexit=$at_errexit_p 1637 at_color=$at_red 1638 ;; 1639 no:0) 1640 at_msg="ok" 1641 at_res=pass 1642 at_errexit=false 1643 at_color=$at_grn 1644 ;; 1645 *:77) 1646 at_msg='skipped ('`cat "$at_check_line_file"`')' 1647 at_res=skip 1648 at_errexit=false 1649 at_color=$at_blu 1650 ;; 1651 no:* | *:99) 1652 at_msg='FAILED ('`cat "$at_check_line_file"`')' 1653 at_res=fail 1654 at_errexit=$at_errexit_p 1655 at_color=$at_red 1656 ;; 1657 yes:*) 1658 at_msg='expected failure ('`cat "$at_check_line_file"`')' 1659 at_res=xfail 1660 at_errexit=false 1661 at_color=$at_lgn 1662 ;; 1663 esac 1664 echo "$at_res" > "$at_job_dir/$at_res" 1665 # In parallel mode, output the summary line only afterwards. 1666 if test $at_jobs -ne 1 && test -n "$at_verbose"; then 1667 $as_echo "$at_desc_line $at_color$at_msg$at_std" 1668 else 1669 # Make sure there is a separator even with long titles. 1670 $as_echo " $at_color$at_msg$at_std" 1671 fi 1672 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" 1673 case $at_status in 1674 0|77) 1675 # $at_times_file is only available if the group succeeded. 1676 # We're not including the group log, so the success message 1677 # is written in the global log separately. But we also 1678 # write to the group log in case they're using -d. 1679 if test -f "$at_times_file"; then 1680 at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' 1681 rm -f "$at_times_file" 1682 fi 1683 $as_echo "$at_log_msg" >> "$at_group_log" 1684 $as_echo "$at_log_msg" >&5 1685 1686 # Cleanup the group directory, unless the user wants the files 1687 # or the success was unexpected. 1688 if $at_debug_p || test $at_res = xpass; then 1689 at_fn_create_debugging_script 1690 if test $at_res = xpass && $at_errexit; then 1691 echo stop > "$at_stop_file" 1692 fi 1693 else 1694 if test -d "$at_group_dir"; then 1695 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; 1696 rm -fr "$at_group_dir" 1697 fi 1698 rm -f "$at_test_source" 1699 fi 1700 ;; 1701 *) 1702 # Upon failure, include the log into the testsuite's global 1703 # log. The failure message is written in the group log. It 1704 # is later included in the global log. 1705 $as_echo "$at_log_msg" >> "$at_group_log" 1706 1707 # Upon failure, keep the group directory for autopsy, and create 1708 # the debugging script. With -e, do not start any further tests. 1709 at_fn_create_debugging_script 1710 if $at_errexit; then 1711 echo stop > "$at_stop_file" 1712 fi 1713 ;; 1714 esac 1715} 1716 1717 1718## ------------ ## 1719## Driver loop. ## 1720## ------------ ## 1721 1722 1723if (set -m && set +m && set +b) >/dev/null 2>&1; then 1724 set +b 1725 at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=- 1726else 1727 at_job_control_on=: at_job_control_off=: at_job_group= 1728fi 1729 1730for at_signal in 1 2 15; do 1731 trap 'set +x; set +e 1732 $at_job_control_off 1733 at_signal='"$at_signal"' 1734 echo stop > "$at_stop_file" 1735 trap "" $at_signal 1736 at_pgids= 1737 for at_pgid in `jobs -p 2>/dev/null`; do 1738 at_pgids="$at_pgids $at_job_group$at_pgid" 1739 done 1740 test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null 1741 wait 1742 if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then 1743 echo >&2 1744 fi 1745 at_signame=`kill -l $at_signal 2>&1 || echo $at_signal` 1746 set x $at_signame 1747 test 0 -gt 2 && at_signame=$at_signal 1748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5 1749$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;} 1750 as_fn_arith 128 + $at_signal && exit_status=$as_val 1751 as_fn_exit $exit_status' $at_signal 1752done 1753 1754rm -f "$at_stop_file" 1755at_first=: 1756 1757if test $at_jobs -ne 1 && 1758 rm -f "$at_job_fifo" && 1759 test -n "$at_job_group" && 1760 ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null 1761then 1762 # FIFO job dispatcher. 1763 1764 trap 'at_pids= 1765 for at_pid in `jobs -p`; do 1766 at_pids="$at_pids $at_job_group$at_pid" 1767 done 1768 if test -n "$at_pids"; then 1769 at_sig=TSTP 1770 test "${TMOUT+set}" = set && at_sig=STOP 1771 kill -$at_sig $at_pids 2>/dev/null 1772 fi 1773 kill -STOP $$ 1774 test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP 1775 1776 echo 1777 # Turn jobs into a list of numbers, starting from 1. 1778 at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p` 1779 1780 set X $at_joblist 1781 shift 1782 for at_group in $at_groups; do 1783 $at_job_control_on 2>/dev/null 1784 ( 1785 # Start one test group. 1786 $at_job_control_off 1787 if $at_first; then 1788 exec 7>"$at_job_fifo" 1789 else 1790 exec 6<&- 1791 fi 1792 trap 'set +x; set +e 1793 trap "" PIPE 1794 echo stop > "$at_stop_file" 1795 echo >&7 1796 as_fn_exit 141' PIPE 1797 at_fn_group_prepare 1798 if cd "$at_group_dir" && 1799 at_fn_test $at_group && 1800 . "$at_test_source" 1801 then :; else 1802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 1803$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} 1804 at_failed=: 1805 fi 1806 at_fn_group_postprocess 1807 echo >&7 1808 ) & 1809 $at_job_control_off 1810 if $at_first; then 1811 at_first=false 1812 exec 6<"$at_job_fifo" 7>"$at_job_fifo" 1813 fi 1814 shift # Consume one token. 1815 if test $# -gt 0; then :; else 1816 read at_token <&6 || break 1817 set x $* 1818 fi 1819 test -f "$at_stop_file" && break 1820 done 1821 exec 7>&- 1822 # Read back the remaining ($at_jobs - 1) tokens. 1823 set X $at_joblist 1824 shift 1825 if test $# -gt 0; then 1826 shift 1827 for at_job 1828 do 1829 read at_token 1830 done <&6 1831 fi 1832 exec 6<&- 1833 wait 1834else 1835 # Run serially, avoid forks and other potential surprises. 1836 for at_group in $at_groups; do 1837 at_fn_group_prepare 1838 if cd "$at_group_dir" && 1839 at_fn_test $at_group && 1840 . "$at_test_source"; then :; else 1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 1842$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} 1843 at_failed=: 1844 fi 1845 at_fn_group_postprocess 1846 test -f "$at_stop_file" && break 1847 at_first=false 1848 done 1849fi 1850 1851# Wrap up the test suite with summary statistics. 1852cd "$at_helper_dir" 1853 1854# Use ?..???? when the list must remain sorted, the faster * otherwise. 1855at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'` 1856at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'` 1857at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'` 1858at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do 1859 echo $f; done | sed '/?/d; s,/xpass,,'` 1860at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do 1861 echo $f; done | sed '/?/d; s,/fail,,'` 1862 1863set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list 1864shift; at_group_count=$# 1865set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$* 1866set X $at_xfail_list; shift; at_xfail_count=$# 1867set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$* 1868set X $at_skip_list; shift; at_skip_count=$# 1869 1870as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val 1871as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val 1872as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val 1873 1874# Back to the top directory. 1875cd "$at_dir" 1876rm -rf "$at_helper_dir" 1877 1878# Compute the duration of the suite. 1879at_stop_date=`date` 1880at_stop_time=`date +%s 2>/dev/null` 1881$as_echo "$as_me: ending at: $at_stop_date" >&5 1882case $at_start_time,$at_stop_time in 1883 [0-9]*,[0-9]*) 1884 as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val 1885 as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val 1886 as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val 1887 as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val 1888 as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val 1889 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" 1890 $as_echo "$as_me: test suite duration: $at_duration" >&5 1891 ;; 1892esac 1893 1894echo 1895$as_echo "## ------------- ## 1896## Test results. ## 1897## ------------- ##" 1898echo 1899{ 1900 echo 1901 $as_echo "## ------------- ## 1902## Test results. ## 1903## ------------- ##" 1904 echo 1905} >&5 1906 1907if test $at_run_count = 1; then 1908 at_result="1 test" 1909 at_were=was 1910else 1911 at_result="$at_run_count tests" 1912 at_were=were 1913fi 1914if $at_errexit_p && test $at_unexpected_count != 0; then 1915 if test $at_xpass_count = 1; then 1916 at_result="$at_result $at_were run, one passed" 1917 else 1918 at_result="$at_result $at_were run, one failed" 1919 fi 1920 at_result="$at_result unexpectedly and inhibited subsequent tests." 1921 at_color=$at_red 1922else 1923 # Don't you just love exponential explosion of the number of cases? 1924 at_color=$at_red 1925 case $at_xpass_count:$at_fail_count:$at_xfail_count in 1926 # So far, so good. 1927 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;; 1928 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;; 1929 1930 # Some unexpected failures 1931 0:*:0) at_result="$at_result $at_were run, 1932$at_fail_count failed unexpectedly." ;; 1933 1934 # Some failures, both expected and unexpected 1935 0:*:1) at_result="$at_result $at_were run, 1936$at_total_fail_count failed ($at_xfail_count expected failure)." ;; 1937 0:*:*) at_result="$at_result $at_were run, 1938$at_total_fail_count failed ($at_xfail_count expected failures)." ;; 1939 1940 # No unexpected failures, but some xpasses 1941 *:0:*) at_result="$at_result $at_were run, 1942$at_xpass_count passed unexpectedly." ;; 1943 1944 # No expected failures, but failures and xpasses 1945 *:1:0) at_result="$at_result $at_were run, 1946$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;; 1947 *:*:0) at_result="$at_result $at_were run, 1948$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;; 1949 1950 # All of them. 1951 *:*:1) at_result="$at_result $at_were run, 1952$at_xpass_count passed unexpectedly, 1953$at_total_fail_count failed ($at_xfail_count expected failure)." ;; 1954 *:*:*) at_result="$at_result $at_were run, 1955$at_xpass_count passed unexpectedly, 1956$at_total_fail_count failed ($at_xfail_count expected failures)." ;; 1957 esac 1958 1959 if test $at_skip_count = 0 && test $at_run_count -gt 1; then 1960 at_result="All $at_result" 1961 fi 1962fi 1963 1964# Now put skips in the mix. 1965case $at_skip_count in 1966 0) ;; 1967 1) at_result="$at_result 19681 test was skipped." ;; 1969 *) at_result="$at_result 1970$at_skip_count tests were skipped." ;; 1971esac 1972 1973if test $at_unexpected_count = 0; then 1974 echo "$at_color$at_result$at_std" 1975 echo "$at_result" >&5 1976else 1977 echo "${at_color}ERROR: $at_result$at_std" >&2 1978 echo "ERROR: $at_result" >&5 1979 { 1980 echo 1981 $as_echo "## ------------------------ ## 1982## Summary of the failures. ## 1983## ------------------------ ##" 1984 1985 # Summary of failed and skipped tests. 1986 if test $at_fail_count != 0; then 1987 echo "Failed tests:" 1988 $SHELL "$at_myself" $at_fail_list --list 1989 echo 1990 fi 1991 if test $at_skip_count != 0; then 1992 echo "Skipped tests:" 1993 $SHELL "$at_myself" $at_skip_list --list 1994 echo 1995 fi 1996 if test $at_xpass_count != 0; then 1997 echo "Unexpected passes:" 1998 $SHELL "$at_myself" $at_xpass_list --list 1999 echo 2000 fi 2001 if test $at_fail_count != 0; then 2002 $as_echo "## ---------------------- ## 2003## Detailed failed tests. ## 2004## ---------------------- ##" 2005 echo 2006 for at_group in $at_fail_list 2007 do 2008 at_group_normalized=$at_group 2009 2010 eval 'while :; do 2011 case $at_group_normalized in #( 2012 '"$at_format"'*) break;; 2013 esac 2014 at_group_normalized=0$at_group_normalized 2015 done' 2016 2017 cat "$at_suite_dir/$at_group_normalized/$as_me.log" 2018 echo 2019 done 2020 echo 2021 fi 2022 if test -n "$at_top_srcdir"; then 2023 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 2024## ${at_top_build_prefix}config.log ## 2025_ASBOX 2026 sed 's/^/| /' ${at_top_build_prefix}config.log 2027 echo 2028 fi 2029 } >&5 2030 2031 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 2032## $as_me.log was created. ## 2033_ASBOX 2034 2035 echo 2036 if $at_debug_p; then 2037 at_msg='per-test log files' 2038 else 2039 at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'" 2040 fi 2041 $as_echo "Please send $at_msg and all information you think might help: 2042 2043 To: <bug-pies@gnu.org.ua> 2044 Subject: [GNU Pies 1.5] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} 2045 2046You may investigate any problem if you feel able to do so, in which 2047case the test suite provides a good starting point. Its output may 2048be found below \`${at_testdir+${at_testdir}/}$as_me.dir'. 2049" 2050 exit 1 2051fi 2052 2053exit 0 2054 2055## ------------- ## 2056## Actual tests. ## 2057## ------------- ## 2058#AT_START_1 2059at_fn_group_banner 1 'version.at:17' \ 2060 "GNU pies version" " " 1 2061at_xfail=no 2062( 2063 $as_echo "1. $at_setup_line: testing $at_desc ..." 2064 $at_traceon 2065 2066 2067{ set +x 2068$as_echo "$at_srcdir/version.at:19: pies --version | sed -n '1{s/ *\\[.*\\]//;p;}' " 2069at_fn_check_prepare_notrace 'a shell pipeline' "version.at:19" 2070( $at_check_trace; pies --version | sed -n '1{s/ *\[.*\]//;p;}' 2071) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2072at_status=$? at_failed=false 2073$at_check_filter 2074at_fn_diff_devnull "$at_stderr" || at_failed=: 2075echo >>"$at_stdout"; $as_echo "pies (GNU Pies) 1.5 2076" | \ 2077 $at_diff - "$at_stdout" || at_failed=: 2078at_fn_check_status 0 $at_status "$at_srcdir/version.at:19" 2079if $at_failed; then : 2080 cat >$XFAILFILE <<'_EOT' 2081============================================================== 2082WARNING: Not using the proper version, *all* checks dubious... 2083============================================================== 2084_EOT 2085 2086 2087else 2088 rm -f $XFAILFILE 2089fi 2090$at_failed && at_fn_log_failure 2091$at_traceon; } 2092 2093 2094 set +x 2095 $at_times_p && times >"$at_times_file" 2096) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2097read at_status <"$at_status_file" 2098#AT_STOP_1 2099#AT_START_2 2100at_fn_group_banner 2 'control.at:17' \ 2101 "Control interface" " " 1 2102at_xfail=no 2103 test -f $XFAILFILE && at_xfail=yes 2104( 2105 $as_echo "2. $at_setup_line: testing $at_desc ..." 2106 $at_traceon 2107 2108 2109{ set +x 2110$as_echo "$at_srcdir/control.at:19: 2111 2112 2113PIES_PIDFILE=\"\$PWD/pies.pid\" 2114PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 2115export PIES_PIDFILE PIES_CTLSOCK 2116cat > control.conf <<_EOT 2117pidfile \"\$PIES_PIDFILE\"; 2118control { 2119 socket \"\$PIES_CTLSOCK\"; 2120} 2121_EOT 2122 2123 2124pies --config-file control.conf 2125 2126sleep 1 2127PIESCTL=\"piesctl --no-netrc --url '\$PIES_CTLSOCK'\" 2128if test -f \$PIES_PIDFILE; then 2129 pid0=\`head -1 \$PIES_PIDFILE\` 2130 pid1=\`\$PIESCTL id PID|sed 's/^PID: //'\` 2131 if test \"\$pid1\" = \"\$pid0\"; then 2132 if \$PIESCTL shutdown; then 2133 sleep 1 2134 if test -f \$PIES_PIDFILE; then 2135 cat >\$XFAILFILE <<'_EOT' 2136============================================================== 2137pies does not respond to control commands 2138============================================================== 2139_EOT 2140 2141 kill -9 \$pid0 2142 exit 1 2143 else 2144 exit 0 2145 fi 2146 else 2147 cat >\$XFAILFILE <<'_EOT' 2148============================================================== 2149can't send control commands 2150============================================================== 2151_EOT 2152 2153 kill -9 \$pid0 2154 exit 1 2155 fi 2156 else 2157 cat >\$XFAILFILE <<'_EOT' 2158============================================================== 2159Control interface non-functional 2160============================================================== 2161_EOT 2162 2163 exit 1 2164 fi 2165else 2166 cat >\$XFAILFILE <<'_EOT' 2167============================================================== 2168pies failed to start 2169============================================================== 2170_EOT 2171 2172 exit 1 2173fi 2174" 2175at_fn_check_prepare_notrace 'a `...` command substitution' "control.at:19" 2176( $at_check_trace; 2177 2178 2179PIES_PIDFILE="$PWD/pies.pid" 2180PIES_CTLSOCK="unix://$PWD/pies.ctl"; 2181export PIES_PIDFILE PIES_CTLSOCK 2182cat > control.conf <<_EOT 2183pidfile "$PIES_PIDFILE"; 2184control { 2185 socket "$PIES_CTLSOCK"; 2186} 2187_EOT 2188 2189 2190pies --config-file control.conf 2191 2192sleep 1 2193PIESCTL="piesctl --no-netrc --url '$PIES_CTLSOCK'" 2194if test -f $PIES_PIDFILE; then 2195 pid0=`head -1 $PIES_PIDFILE` 2196 pid1=`$PIESCTL id PID|sed 's/^PID: //'` 2197 if test "$pid1" = "$pid0"; then 2198 if $PIESCTL shutdown; then 2199 sleep 1 2200 if test -f $PIES_PIDFILE; then 2201 cat >$XFAILFILE <<'_EOT' 2202============================================================== 2203pies does not respond to control commands 2204============================================================== 2205_EOT 2206 2207 kill -9 $pid0 2208 exit 1 2209 else 2210 exit 0 2211 fi 2212 else 2213 cat >$XFAILFILE <<'_EOT' 2214============================================================== 2215can't send control commands 2216============================================================== 2217_EOT 2218 2219 kill -9 $pid0 2220 exit 1 2221 fi 2222 else 2223 cat >$XFAILFILE <<'_EOT' 2224============================================================== 2225Control interface non-functional 2226============================================================== 2227_EOT 2228 2229 exit 1 2230 fi 2231else 2232 cat >$XFAILFILE <<'_EOT' 2233============================================================== 2234pies failed to start 2235============================================================== 2236_EOT 2237 2238 exit 1 2239fi 2240 2241) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2242at_status=$? at_failed=false 2243$at_check_filter 2244at_fn_diff_devnull "$at_stderr" || at_failed=: 2245at_fn_diff_devnull "$at_stdout" || at_failed=: 2246at_fn_check_status 0 $at_status "$at_srcdir/control.at:19" 2247$at_failed && at_fn_log_failure 2248$at_traceon; } 2249 2250 2251 set +x 2252 $at_times_p && times >"$at_times_file" 2253) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2254read at_status <"$at_status_file" 2255#AT_STOP_2 2256#AT_START_3 2257at_fn_group_banner 3 'cyclic.at:17' \ 2258 "Detecting cyclic dependencies" " " 2 2259at_xfail=no 2260 test -f $XFAILFILE && at_xfail=yes 2261( 2262 $as_echo "3. $at_setup_line: testing $at_desc ..." 2263 $at_traceon 2264 2265 2266{ set +x 2267$as_echo "$at_srcdir/cyclic.at:19: 2268 2269# The following matrices describe the test.conf configuration file below. 2270# 2271# Dependency matrix: 2272# 0 1 2 3 4 5 6 7 2273# 0 X X 2274# 1 X 2275# 2 X 2276# 3 X 2277# 4 X 2278# 5 2279# 6 X 2280# 7 2281# 2282# Transitive closure: 2283# 0 1 2 3 4 5 6 7 2284# 0 X X X X X 2285# 1 X 2286# 2 X X X X X 2287# 3 X X X X X 2288# 4 X X X X X 2289# 5 2290# 6 X 2291# 7 2292# 2293# Legend: 2294# 0: a 2295# 1: b 2296# 2: c 2297# 3: d 2298# 4: e 2299# 5: f 2300# 6: g 2301# 7: h 2302 2303cat >test.conf <<'_ATEOF' 2304component a { 2305 command \"a\"; 2306 prerequisites (b,d); 2307} 2308 2309component b { 2310 command \"b\"; 2311 prerequisites (b); 2312} 2313 2314component c { 2315 command \"c\"; 2316 prerequisites (e); 2317} 2318 2319component d { 2320 command \"d\"; 2321 prerequisites (c); 2322} 2323 2324component e { 2325 command \"e\"; 2326 prerequisites (a); 2327} 2328 2329component f { 2330 command \"f\"; 2331} 2332 2333component g { 2334 command \"g\"; 2335 prerequisites (h); 2336} 2337 2338component h { 2339 command \"h\"; 2340} 2341_ATEOF 2342 2343 2344pies --config-file test.conf --dump-depmap | trimws 2345" 2346at_fn_check_prepare_notrace 'an embedded newline' "cyclic.at:19" 2347( $at_check_trace; 2348 2349# The following matrices describe the test.conf configuration file below. 2350# 2351# Dependency matrix: 2352# 0 1 2 3 4 5 6 7 2353# 0 X X 2354# 1 X 2355# 2 X 2356# 3 X 2357# 4 X 2358# 5 2359# 6 X 2360# 7 2361# 2362# Transitive closure: 2363# 0 1 2 3 4 5 6 7 2364# 0 X X X X X 2365# 1 X 2366# 2 X X X X X 2367# 3 X X X X X 2368# 4 X X X X X 2369# 5 2370# 6 X 2371# 7 2372# 2373# Legend: 2374# 0: a 2375# 1: b 2376# 2: c 2377# 3: d 2378# 4: e 2379# 5: f 2380# 6: g 2381# 7: h 2382 2383cat >test.conf <<'_ATEOF' 2384component a { 2385 command "a"; 2386 prerequisites (b,d); 2387} 2388 2389component b { 2390 command "b"; 2391 prerequisites (b); 2392} 2393 2394component c { 2395 command "c"; 2396 prerequisites (e); 2397} 2398 2399component d { 2400 command "d"; 2401 prerequisites (c); 2402} 2403 2404component e { 2405 command "e"; 2406 prerequisites (a); 2407} 2408 2409component f { 2410 command "f"; 2411} 2412 2413component g { 2414 command "g"; 2415 prerequisites (h); 2416} 2417 2418component h { 2419 command "h"; 2420} 2421_ATEOF 2422 2423 2424pies --config-file test.conf --dump-depmap | trimws 2425 2426) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2427at_status=$? at_failed=false 2428$at_check_filter 2429echo >>"$at_stderr"; $as_echo "pies: cyclic dependencies detected: 2430pies: a -> d -> c -> e -> a 2431pies: b -> b 2432" | \ 2433 $at_diff - "$at_stderr" || at_failed=: 2434echo >>"$at_stdout"; $as_echo "Dependency map: 2435 0 1 2 2436 0 2437 1 X 2438 2 2439 2440Legend: 2441 0: f 2442 1: g 2443 2: h 2444" | \ 2445 $at_diff - "$at_stdout" || at_failed=: 2446at_fn_check_status 0 $at_status "$at_srcdir/cyclic.at:19" 2447$at_failed && at_fn_log_failure 2448$at_traceon; } 2449 2450 2451{ set +x 2452$as_echo "$at_srcdir/cyclic.at:114: 2453cat >test.conf <<'_ATEOF' 2454 2455component a { 2456 command \"a\"; 2457 prerequisites (b,c); 2458} 2459component b { 2460 command \"b\"; 2461 prerequisites (c); 2462} 2463component c { 2464 command \"c\"; 2465 prerequisites (d); 2466} 2467component d { 2468 command \"d\"; 2469 prerequisites (a); 2470} 2471_ATEOF 2472 2473pies --config-file test.conf --dump-depmap | trimws 2474" 2475at_fn_check_prepare_notrace 'an embedded newline' "cyclic.at:114" 2476( $at_check_trace; 2477cat >test.conf <<'_ATEOF' 2478 2479component a { 2480 command "a"; 2481 prerequisites (b,c); 2482} 2483component b { 2484 command "b"; 2485 prerequisites (c); 2486} 2487component c { 2488 command "c"; 2489 prerequisites (d); 2490} 2491component d { 2492 command "d"; 2493 prerequisites (a); 2494} 2495_ATEOF 2496 2497pies --config-file test.conf --dump-depmap | trimws 2498 2499) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2500at_status=$? at_failed=false 2501$at_check_filter 2502echo >>"$at_stderr"; $as_echo "pies: cyclic dependencies detected: 2503pies: a -> c -> d -> a 2504pies: a -> b -> c -> d -> a 2505" | \ 2506 $at_diff - "$at_stderr" || at_failed=: 2507echo >>"$at_stdout"; $as_echo "No components defined 2508" | \ 2509 $at_diff - "$at_stdout" || at_failed=: 2510at_fn_check_status 0 $at_status "$at_srcdir/cyclic.at:114" 2511$at_failed && at_fn_log_failure 2512$at_traceon; } 2513 2514 2515 set +x 2516 $at_times_p && times >"$at_times_file" 2517) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2518read at_status <"$at_status_file" 2519#AT_STOP_3 2520#AT_START_4 2521at_fn_group_banner 4 'respawn.at:17' \ 2522 "Respawn components" " " 3 2523at_xfail=no 2524 test -f $XFAILFILE && at_xfail=yes 2525( 2526 $as_echo "4. $at_setup_line: testing $at_desc ..." 2527 $at_traceon 2528 2529 2530{ set +x 2531$as_echo "$at_srcdir/respawn.at:19: 2532 2533 2534PIES_PIDFILE=\"\$PWD/pies.pid\" 2535PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 2536export PIES_PIDFILE PIES_CTLSOCK 2537cat > control.conf <<_EOT 2538pidfile \"\$PIES_PIDFILE\"; 2539control { 2540 socket \"\$PIES_CTLSOCK\"; 2541} 2542_EOT 2543 2544statefile=\$PWD/state 2545cat > pies.conf <<_EOT 2546component test { 2547 mode respawn; 2548 command \"\$auxdir/respawn \$statefile 3\"; 2549 chdir \$PWD; 2550 return-code 1 { 2551 action disable; 2552 exec \"piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 2553 } 2554} 2555_EOT 2556 2557to 5 \\ 2558 pies --foreground --stderr \\ 2559 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 2560cat state 2561" 2562at_fn_check_prepare_notrace 'an embedded newline' "respawn.at:19" 2563( $at_check_trace; 2564 2565 2566PIES_PIDFILE="$PWD/pies.pid" 2567PIES_CTLSOCK="unix://$PWD/pies.ctl"; 2568export PIES_PIDFILE PIES_CTLSOCK 2569cat > control.conf <<_EOT 2570pidfile "$PIES_PIDFILE"; 2571control { 2572 socket "$PIES_CTLSOCK"; 2573} 2574_EOT 2575 2576statefile=$PWD/state 2577cat > pies.conf <<_EOT 2578component test { 2579 mode respawn; 2580 command "$auxdir/respawn $statefile 3"; 2581 chdir $PWD; 2582 return-code 1 { 2583 action disable; 2584 exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 2585 } 2586} 2587_EOT 2588 2589to 5 \ 2590 pies --foreground --stderr \ 2591 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 2592cat state 2593 2594) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2595at_status=$? at_failed=false 2596$at_check_filter 2597at_fn_diff_devnull "$at_stderr" || at_failed=: 2598echo >>"$at_stdout"; $as_echo "3 2599" | \ 2600 $at_diff - "$at_stdout" || at_failed=: 2601at_fn_check_status 0 $at_status "$at_srcdir/respawn.at:19" 2602$at_failed && at_fn_log_failure 2603$at_traceon; } 2604 2605 2606 set +x 2607 $at_times_p && times >"$at_times_file" 2608) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2609read at_status <"$at_status_file" 2610#AT_STOP_4 2611#AT_START_5 2612at_fn_group_banner 5 'redirect.at:17' \ 2613 "stdout redirection" " " 3 2614at_xfail=no 2615 test -f $XFAILFILE && at_xfail=yes 2616( 2617 $as_echo "5. $at_setup_line: testing $at_desc ..." 2618 $at_traceon 2619 2620 2621 2622{ set +x 2623$as_echo "$at_srcdir/redirect.at:20: 2624 2625 2626PIES_PIDFILE=\"\$PWD/pies.pid\" 2627PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 2628export PIES_PIDFILE PIES_CTLSOCK 2629cat > control.conf <<_EOT 2630pidfile \"\$PIES_PIDFILE\"; 2631control { 2632 socket \"\$PIES_CTLSOCK\"; 2633} 2634_EOT 2635 2636outfile=\$PWD/out 2637cat > pies.conf <<_EOT 2638component test { 2639 mode respawn; 2640 command \"echo pass\"; 2641 stdout file \"\$outfile\"; 2642} 2643_EOT 2644 2645pies --config-file control.conf --config-file pies.conf 2646 2647n=0 2648while : 2649do 2650 if test -f \$outfile; then 2651 lines=\`lines \$outfile\` 2652 if test \"\$lines\" -ge 2 ; then 2653 break 2654 fi 2655 fi 2656 sleep 1 2657 n=\$((\$n + 1)) 2658 if test \$n -gt 25; then 2659 echo >&2 \"timed out\" 2660 break 2661 fi 2662done 2663 2664 2665piesctl --no-netrc --url \"\$PIES_CTLSOCK\" shutdown 2666pies_stop_spinner=0 2667while test -f \$PIES_PIDFILE 2668do 2669 sleep 1 2670 pies_stop_spinner=\$((\$pies_stop_spinner + 1)) 2671 if test \$pies_stop_spinner -gt 3; then 2672 kill \`cat \$PIES_PIDFILE\` 2673 echo >&2 \"timed out waiting for shutdown\" 2674 fi 2675done 2676 2677head -2 \$outfile 2678" 2679at_fn_check_prepare_notrace 'a `...` command substitution' "redirect.at:20" 2680( $at_check_trace; 2681 2682 2683PIES_PIDFILE="$PWD/pies.pid" 2684PIES_CTLSOCK="unix://$PWD/pies.ctl"; 2685export PIES_PIDFILE PIES_CTLSOCK 2686cat > control.conf <<_EOT 2687pidfile "$PIES_PIDFILE"; 2688control { 2689 socket "$PIES_CTLSOCK"; 2690} 2691_EOT 2692 2693outfile=$PWD/out 2694cat > pies.conf <<_EOT 2695component test { 2696 mode respawn; 2697 command "echo pass"; 2698 stdout file "$outfile"; 2699} 2700_EOT 2701 2702pies --config-file control.conf --config-file pies.conf 2703 2704n=0 2705while : 2706do 2707 if test -f $outfile; then 2708 lines=`lines $outfile` 2709 if test "$lines" -ge 2 ; then 2710 break 2711 fi 2712 fi 2713 sleep 1 2714 n=$(($n + 1)) 2715 if test $n -gt 25; then 2716 echo >&2 "timed out" 2717 break 2718 fi 2719done 2720 2721 2722piesctl --no-netrc --url "$PIES_CTLSOCK" shutdown 2723pies_stop_spinner=0 2724while test -f $PIES_PIDFILE 2725do 2726 sleep 1 2727 pies_stop_spinner=$(($pies_stop_spinner + 1)) 2728 if test $pies_stop_spinner -gt 3; then 2729 kill `cat $PIES_PIDFILE` 2730 echo >&2 "timed out waiting for shutdown" 2731 fi 2732done 2733 2734head -2 $outfile 2735 2736) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2737at_status=$? at_failed=false 2738$at_check_filter 2739at_fn_diff_devnull "$at_stderr" || at_failed=: 2740echo >>"$at_stdout"; $as_echo "pass 2741pass 2742" | \ 2743 $at_diff - "$at_stdout" || at_failed=: 2744at_fn_check_status 0 $at_status "$at_srcdir/redirect.at:20" 2745$at_failed && at_fn_log_failure 2746$at_traceon; } 2747 2748 2749 set +x 2750 $at_times_p && times >"$at_times_file" 2751) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2752read at_status <"$at_status_file" 2753#AT_STOP_5 2754#AT_START_6 2755at_fn_group_banner 6 'ret-exec.at:17' \ 2756 "Exec on return code" " " 3 2757at_xfail=no 2758 test -f $XFAILFILE && at_xfail=yes 2759( 2760 $as_echo "6. $at_setup_line: testing $at_desc ..." 2761 $at_traceon 2762 2763 2764 2765{ set +x 2766$as_echo "$at_srcdir/ret-exec.at:20: 2767 2768 2769PIES_PIDFILE=\"\$PWD/pies.pid\" 2770PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 2771export PIES_PIDFILE PIES_CTLSOCK 2772cat > control.conf <<_EOT 2773pidfile \"\$PIES_PIDFILE\"; 2774control { 2775 socket \"\$PIES_CTLSOCK\"; 2776} 2777_EOT 2778 2779comp_pid_file=\$PWD/comp.pid 2780report_file=\$PWD/report 2781cat > pies.conf <<_EOT 2782component test { 2783 mode respawn; 2784 return-code 10 { 2785 exec \"\$auxdir/retcode \$report_file\"; 2786 action disable; 2787 } 2788 command \"\$auxdir/sleepexit 2 10 \$comp_pid_file\"; 2789} 2790_EOT 2791 2792>\$report_file 2793 2794pies --config-file control.conf --config-file pies.conf 2795 2796n=0 2797while test ! -s \$report_file 2798do 2799 sleep 1 2800 n=\$((\$n + 1)) 2801 if test \$n -gt 4; then 2802 echo >&2 \"timed out\" 2803 break 2804 fi 2805done 2806 2807 2808piesctl --no-netrc --url \"\$PIES_CTLSOCK\" shutdown 2809pies_stop_spinner=0 2810while test -f \$PIES_PIDFILE 2811do 2812 sleep 1 2813 pies_stop_spinner=\$((\$pies_stop_spinner + 1)) 2814 if test \$pies_stop_spinner -gt 3; then 2815 kill \`cat \$PIES_PIDFILE\` 2816 echo >&2 \"timed out waiting for shutdown\" 2817 fi 2818done 2819 2820if test -f \$report_file; then 2821 pid=\`head \$comp_pid_file\` 2822 sed \"s/\$pid/PID/\" \$report_file 2823else 2824 echo >&2 \"no report file\" 2825fi 2826" 2827at_fn_check_prepare_notrace 'a `...` command substitution' "ret-exec.at:20" 2828( $at_check_trace; 2829 2830 2831PIES_PIDFILE="$PWD/pies.pid" 2832PIES_CTLSOCK="unix://$PWD/pies.ctl"; 2833export PIES_PIDFILE PIES_CTLSOCK 2834cat > control.conf <<_EOT 2835pidfile "$PIES_PIDFILE"; 2836control { 2837 socket "$PIES_CTLSOCK"; 2838} 2839_EOT 2840 2841comp_pid_file=$PWD/comp.pid 2842report_file=$PWD/report 2843cat > pies.conf <<_EOT 2844component test { 2845 mode respawn; 2846 return-code 10 { 2847 exec "$auxdir/retcode $report_file"; 2848 action disable; 2849 } 2850 command "$auxdir/sleepexit 2 10 $comp_pid_file"; 2851} 2852_EOT 2853 2854>$report_file 2855 2856pies --config-file control.conf --config-file pies.conf 2857 2858n=0 2859while test ! -s $report_file 2860do 2861 sleep 1 2862 n=$(($n + 1)) 2863 if test $n -gt 4; then 2864 echo >&2 "timed out" 2865 break 2866 fi 2867done 2868 2869 2870piesctl --no-netrc --url "$PIES_CTLSOCK" shutdown 2871pies_stop_spinner=0 2872while test -f $PIES_PIDFILE 2873do 2874 sleep 1 2875 pies_stop_spinner=$(($pies_stop_spinner + 1)) 2876 if test $pies_stop_spinner -gt 3; then 2877 kill `cat $PIES_PIDFILE` 2878 echo >&2 "timed out waiting for shutdown" 2879 fi 2880done 2881 2882if test -f $report_file; then 2883 pid=`head $comp_pid_file` 2884 sed "s/$pid/PID/" $report_file 2885else 2886 echo >&2 "no report file" 2887fi 2888 2889) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2890at_status=$? at_failed=false 2891$at_check_filter 2892at_fn_diff_devnull "$at_stderr" || at_failed=: 2893echo >>"$at_stdout"; $as_echo "1.5 2894test 2895PID 289610 2897No signal 2898" | \ 2899 $at_diff - "$at_stdout" || at_failed=: 2900at_fn_check_status 0 $at_status "$at_srcdir/ret-exec.at:20" 2901$at_failed && at_fn_log_failure 2902$at_traceon; } 2903 2904 2905 set +x 2906 $at_times_p && times >"$at_times_file" 2907) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2908read at_status <"$at_status_file" 2909#AT_STOP_6 2910#AT_START_7 2911at_fn_group_banner 7 'ret-notify.at:17' \ 2912 "Notify on return code" " " 3 2913at_xfail=no 2914 test -f $XFAILFILE && at_xfail=yes 2915( 2916 $as_echo "7. $at_setup_line: testing $at_desc ..." 2917 $at_traceon 2918 2919 2920 2921{ set +x 2922$as_echo "$at_srcdir/ret-notify.at:20: 2923 2924 2925PIES_PIDFILE=\"\$PWD/pies.pid\" 2926PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 2927export PIES_PIDFILE PIES_CTLSOCK 2928cat > control.conf <<_EOT 2929pidfile \"\$PIES_PIDFILE\"; 2930control { 2931 socket \"\$PIES_CTLSOCK\"; 2932} 2933_EOT 2934 2935report_file=\$PWD/report 2936cat > pies.conf <<_EOT 2937mailer-program \"\$auxdir/mailer\"; 2938mailer-command-line \"\$auxdir/mailer \$report_file\"; 2939component test { 2940 mode respawn; 2941 return-code 10 { 2942 notify root; 2943 action disable; 2944 } 2945 command \"\$auxdir/sleepexit 2 10\"; 2946} 2947_EOT 2948 2949>\$report_file 2950 2951pies --config-file control.conf --config-file pies.conf 2952 2953n=0 2954while test ! -s \$report_file 2955do 2956 sleep 1 2957 n=\$((\$n + 1)) 2958 if test \$n -gt 4; then 2959 echo >&2 \"timed out\" 2960 break 2961 fi 2962done 2963sleep 1 2964 2965piesctl --no-netrc --url \"\$PIES_CTLSOCK\" shutdown 2966pies_stop_spinner=0 2967while test -f \$PIES_PIDFILE 2968do 2969 sleep 1 2970 pies_stop_spinner=\$((\$pies_stop_spinner + 1)) 2971 if test \$pies_stop_spinner -gt 3; then 2972 kill \`cat \$PIES_PIDFILE\` 2973 echo >&2 \"timed out waiting for shutdown\" 2974 fi 2975done 2976 2977if test -f \$report_file; then 2978 cat \$report_file 2979else 2980 echo >&2 \"no report file\" 2981fi 2982" 2983at_fn_check_prepare_notrace 'a `...` command substitution' "ret-notify.at:20" 2984( $at_check_trace; 2985 2986 2987PIES_PIDFILE="$PWD/pies.pid" 2988PIES_CTLSOCK="unix://$PWD/pies.ctl"; 2989export PIES_PIDFILE PIES_CTLSOCK 2990cat > control.conf <<_EOT 2991pidfile "$PIES_PIDFILE"; 2992control { 2993 socket "$PIES_CTLSOCK"; 2994} 2995_EOT 2996 2997report_file=$PWD/report 2998cat > pies.conf <<_EOT 2999mailer-program "$auxdir/mailer"; 3000mailer-command-line "$auxdir/mailer $report_file"; 3001component test { 3002 mode respawn; 3003 return-code 10 { 3004 notify root; 3005 action disable; 3006 } 3007 command "$auxdir/sleepexit 2 10"; 3008} 3009_EOT 3010 3011>$report_file 3012 3013pies --config-file control.conf --config-file pies.conf 3014 3015n=0 3016while test ! -s $report_file 3017do 3018 sleep 1 3019 n=$(($n + 1)) 3020 if test $n -gt 4; then 3021 echo >&2 "timed out" 3022 break 3023 fi 3024done 3025sleep 1 3026 3027piesctl --no-netrc --url "$PIES_CTLSOCK" shutdown 3028pies_stop_spinner=0 3029while test -f $PIES_PIDFILE 3030do 3031 sleep 1 3032 pies_stop_spinner=$(($pies_stop_spinner + 1)) 3033 if test $pies_stop_spinner -gt 3; then 3034 kill `cat $PIES_PIDFILE` 3035 echo >&2 "timed out waiting for shutdown" 3036 fi 3037done 3038 3039if test -f $report_file; then 3040 cat $report_file 3041else 3042 echo >&2 "no report file" 3043fi 3044 3045) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3046at_status=$? at_failed=false 3047$at_check_filter 3048at_fn_diff_devnull "$at_stderr" || at_failed=: 3049echo >>"$at_stdout"; $as_echo "root 3050From: <> 3051X-Agent: pies (GNU Pies 1.5) 3052Subject: Component test exited with code 10. 3053 3054" | \ 3055 $at_diff - "$at_stdout" || at_failed=: 3056at_fn_check_status 0 $at_status "$at_srcdir/ret-notify.at:20" 3057$at_failed && at_fn_log_failure 3058$at_traceon; } 3059 3060 3061 set +x 3062 $at_times_p && times >"$at_times_file" 3063) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3064read at_status <"$at_status_file" 3065#AT_STOP_7 3066#AT_START_8 3067at_fn_group_banner 8 'startup.at:17' \ 3068 "Startup components" " " 3 3069at_xfail=no 3070 test -f $XFAILFILE && at_xfail=yes 3071( 3072 $as_echo "8. $at_setup_line: testing $at_desc ..." 3073 $at_traceon 3074 3075 3076{ set +x 3077$as_echo "$at_srcdir/startup.at:19: 3078 3079 3080PIES_PIDFILE=\"\$PWD/pies.pid\" 3081PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 3082export PIES_PIDFILE PIES_CTLSOCK 3083cat > control.conf <<_EOT 3084pidfile \"\$PIES_PIDFILE\"; 3085control { 3086 socket \"\$PIES_CTLSOCK\"; 3087} 3088_EOT 3089 3090 3091cat > pies.conf <<_EOT 3092component b1 { 3093 mode startup; 3094 command \"\$auxdir/touchfile b1 1\"; 3095} 3096 3097component b2 { 3098 mode startup; 3099 command \"\$auxdir/touchfile b2 2\"; 3100} 3101 3102component test { 3103 mode respawn; 3104 command \"\$auxdir/startcheck b1 b2\"; 3105 chdir \$PWD; 3106 stdout file \"log.out\"; 3107 stderr file \"log.err\"; 3108 return-code * { 3109 action disable; 3110 exec \"piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 3111 } 3112} 3113_EOT 3114 3115set -e 3116to 5 \\ 3117 pies --foreground --stderr \\ 3118 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3119 3120cat log.out 3121cat log.err >&2 3122" 3123at_fn_check_prepare_notrace 'an embedded newline' "startup.at:19" 3124( $at_check_trace; 3125 3126 3127PIES_PIDFILE="$PWD/pies.pid" 3128PIES_CTLSOCK="unix://$PWD/pies.ctl"; 3129export PIES_PIDFILE PIES_CTLSOCK 3130cat > control.conf <<_EOT 3131pidfile "$PIES_PIDFILE"; 3132control { 3133 socket "$PIES_CTLSOCK"; 3134} 3135_EOT 3136 3137 3138cat > pies.conf <<_EOT 3139component b1 { 3140 mode startup; 3141 command "$auxdir/touchfile b1 1"; 3142} 3143 3144component b2 { 3145 mode startup; 3146 command "$auxdir/touchfile b2 2"; 3147} 3148 3149component test { 3150 mode respawn; 3151 command "$auxdir/startcheck b1 b2"; 3152 chdir $PWD; 3153 stdout file "log.out"; 3154 stderr file "log.err"; 3155 return-code * { 3156 action disable; 3157 exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 3158 } 3159} 3160_EOT 3161 3162set -e 3163to 5 \ 3164 pies --foreground --stderr \ 3165 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3166 3167cat log.out 3168cat log.err >&2 3169 3170) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3171at_status=$? at_failed=false 3172$at_check_filter 3173at_fn_diff_devnull "$at_stderr" || at_failed=: 3174echo >>"$at_stdout"; $as_echo "# b1 3175b1 3176# b2 3177b2 3178" | \ 3179 $at_diff - "$at_stdout" || at_failed=: 3180at_fn_check_status 0 $at_status "$at_srcdir/startup.at:19" 3181$at_failed && at_fn_log_failure 3182$at_traceon; } 3183 3184 3185 set +x 3186 $at_times_p && times >"$at_times_file" 3187) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3188read at_status <"$at_status_file" 3189#AT_STOP_8 3190#AT_START_9 3191at_fn_group_banner 9 'shutdown.at:17' \ 3192 "Shutdown components" " " 3 3193at_xfail=no 3194 test -f $XFAILFILE && at_xfail=yes 3195( 3196 $as_echo "9. $at_setup_line: testing $at_desc ..." 3197 $at_traceon 3198 3199 3200{ set +x 3201$as_echo "$at_srcdir/shutdown.at:19: 3202 3203 3204PIES_PIDFILE=\"\$PWD/pies.pid\" 3205PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 3206export PIES_PIDFILE PIES_CTLSOCK 3207cat > control.conf <<_EOT 3208pidfile \"\$PIES_PIDFILE\"; 3209control { 3210 socket \"\$PIES_CTLSOCK\"; 3211} 3212_EOT 3213 3214 3215statefile=\$PWD/state 3216 3217cat > pies.conf <<_EOT 3218component test { 3219 mode respawn; 3220 command \"\$auxdir/respawn \$statefile 3\"; 3221 chdir \$PWD; 3222 return-code 1 { 3223 action disable; 3224 exec \"piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 3225 } 3226} 3227 3228component s { 3229 mode shutdown; 3230 command \"\$auxdir/touchfile shutdown\"; 3231} 3232_EOT 3233 3234set -e 3235to 5 \\ 3236 pies --foreground --stderr \\ 3237 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3238 3239cat shutdown 3240" 3241at_fn_check_prepare_notrace 'an embedded newline' "shutdown.at:19" 3242( $at_check_trace; 3243 3244 3245PIES_PIDFILE="$PWD/pies.pid" 3246PIES_CTLSOCK="unix://$PWD/pies.ctl"; 3247export PIES_PIDFILE PIES_CTLSOCK 3248cat > control.conf <<_EOT 3249pidfile "$PIES_PIDFILE"; 3250control { 3251 socket "$PIES_CTLSOCK"; 3252} 3253_EOT 3254 3255 3256statefile=$PWD/state 3257 3258cat > pies.conf <<_EOT 3259component test { 3260 mode respawn; 3261 command "$auxdir/respawn $statefile 3"; 3262 chdir $PWD; 3263 return-code 1 { 3264 action disable; 3265 exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 3266 } 3267} 3268 3269component s { 3270 mode shutdown; 3271 command "$auxdir/touchfile shutdown"; 3272} 3273_EOT 3274 3275set -e 3276to 5 \ 3277 pies --foreground --stderr \ 3278 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3279 3280cat shutdown 3281 3282) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3283at_status=$? at_failed=false 3284$at_check_filter 3285at_fn_diff_devnull "$at_stderr" || at_failed=: 3286echo >>"$at_stdout"; $as_echo "shutdown 3287" | \ 3288 $at_diff - "$at_stdout" || at_failed=: 3289at_fn_check_status 0 $at_status "$at_srcdir/shutdown.at:19" 3290$at_failed && at_fn_log_failure 3291$at_traceon; } 3292 3293 3294 set +x 3295 $at_times_p && times >"$at_times_file" 3296) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3297read at_status <"$at_status_file" 3298#AT_STOP_9 3299#AT_START_10 3300at_fn_group_banner 10 'shell.at:17' \ 3301 "flags shell" " " 3 3302at_xfail=no 3303 test -f $XFAILFILE && at_xfail=yes 3304( 3305 $as_echo "10. $at_setup_line: testing $at_desc ..." 3306 $at_traceon 3307 3308 3309{ set +x 3310$as_echo "$at_srcdir/shell.at:19: 3311 3312 3313PIES_PIDFILE=\"\$PWD/pies.pid\" 3314PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 3315export PIES_PIDFILE PIES_CTLSOCK 3316cat > control.conf <<_EOT 3317pidfile \"\$PIES_PIDFILE\"; 3318control { 3319 socket \"\$PIES_CTLSOCK\"; 3320} 3321_EOT 3322 3323statefile=\$PWD/state 3324outfile=\$PWD/respawn.out 3325cat > pies.conf <<_EOT 3326component test { 3327 mode respawn; 3328 flags shell; 3329 command \"if \$auxdir/respawn \$statefile 3; then echo pass; else exit 1; fi >> \$outfile\"; 3330 chdir \$PWD; 3331 return-code 1 { 3332 action disable; 3333 exec \"piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 3334 } 3335} 3336_EOT 3337 3338set -e 3339to 5 \\ 3340 pies --foreground --stderr \\ 3341 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3342 3343echo state: 3344cat \$statefile 3345echo log: 3346cat \$outfile 3347" 3348at_fn_check_prepare_notrace 'an embedded newline' "shell.at:19" 3349( $at_check_trace; 3350 3351 3352PIES_PIDFILE="$PWD/pies.pid" 3353PIES_CTLSOCK="unix://$PWD/pies.ctl"; 3354export PIES_PIDFILE PIES_CTLSOCK 3355cat > control.conf <<_EOT 3356pidfile "$PIES_PIDFILE"; 3357control { 3358 socket "$PIES_CTLSOCK"; 3359} 3360_EOT 3361 3362statefile=$PWD/state 3363outfile=$PWD/respawn.out 3364cat > pies.conf <<_EOT 3365component test { 3366 mode respawn; 3367 flags shell; 3368 command "if $auxdir/respawn $statefile 3; then echo pass; else exit 1; fi >> $outfile"; 3369 chdir $PWD; 3370 return-code 1 { 3371 action disable; 3372 exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 3373 } 3374} 3375_EOT 3376 3377set -e 3378to 5 \ 3379 pies --foreground --stderr \ 3380 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3381 3382echo state: 3383cat $statefile 3384echo log: 3385cat $outfile 3386 3387) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3388at_status=$? at_failed=false 3389$at_check_filter 3390at_fn_diff_devnull "$at_stderr" || at_failed=: 3391echo >>"$at_stdout"; $as_echo "state: 33923 3393log: 3394pass 3395pass 3396pass 3397" | \ 3398 $at_diff - "$at_stdout" || at_failed=: 3399at_fn_check_status 0 $at_status "$at_srcdir/shell.at:19" 3400$at_failed && at_fn_log_failure 3401$at_traceon; } 3402 3403 3404 set +x 3405 $at_times_p && times >"$at_times_file" 3406) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3407read at_status <"$at_status_file" 3408#AT_STOP_10 3409#AT_START_11 3410at_fn_group_banner 11 'expandenv.at:17' \ 3411 "flags expandenv" " " 3 3412at_xfail=no 3413 test -f $XFAILFILE && at_xfail=yes 3414( 3415 $as_echo "11. $at_setup_line: testing $at_desc ..." 3416 $at_traceon 3417 3418 3419{ set +x 3420$as_echo "$at_srcdir/expandenv.at:19: 3421 3422 3423PIES_PIDFILE=\"\$PWD/pies.pid\" 3424PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 3425export PIES_PIDFILE PIES_CTLSOCK 3426cat > control.conf <<_EOT 3427pidfile \"\$PIES_PIDFILE\"; 3428control { 3429 socket \"\$PIES_CTLSOCK\"; 3430} 3431_EOT 3432 3433statefile=\$PWD/state 3434cat > pies.conf <<EOT 3435component test { 3436 mode respawn; 3437 flags expandenv; 3438 command \"\\\$auxdir/respawn \\\$statefile 3\"; 3439 chdir \"\$PWD\"; 3440 return-code 1 { 3441 action disable; 3442 exec \"piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 3443 } 3444} 3445EOT 3446 3447export auxdir 3448export statefile 3449 3450set -e 3451to 5 \\ 3452 pies --foreground --stderr \\ 3453 --config-file control.conf --config-file pies.conf --debug 4 2>errlog 3454 3455cat state 3456" 3457at_fn_check_prepare_notrace 'an embedded newline' "expandenv.at:19" 3458( $at_check_trace; 3459 3460 3461PIES_PIDFILE="$PWD/pies.pid" 3462PIES_CTLSOCK="unix://$PWD/pies.ctl"; 3463export PIES_PIDFILE PIES_CTLSOCK 3464cat > control.conf <<_EOT 3465pidfile "$PIES_PIDFILE"; 3466control { 3467 socket "$PIES_CTLSOCK"; 3468} 3469_EOT 3470 3471statefile=$PWD/state 3472cat > pies.conf <<EOT 3473component test { 3474 mode respawn; 3475 flags expandenv; 3476 command "\$auxdir/respawn \$statefile 3"; 3477 chdir "$PWD"; 3478 return-code 1 { 3479 action disable; 3480 exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 3481 } 3482} 3483EOT 3484 3485export auxdir 3486export statefile 3487 3488set -e 3489to 5 \ 3490 pies --foreground --stderr \ 3491 --config-file control.conf --config-file pies.conf --debug 4 2>errlog 3492 3493cat state 3494 3495) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3496at_status=$? at_failed=false 3497$at_check_filter 3498at_fn_diff_devnull "$at_stderr" || at_failed=: 3499echo >>"$at_stdout"; $as_echo "3 3500" | \ 3501 $at_diff - "$at_stdout" || at_failed=: 3502at_fn_check_status 0 $at_status "$at_srcdir/expandenv.at:19" 3503$at_failed && at_fn_log_failure 3504$at_traceon; } 3505 3506 3507 set +x 3508 $at_times_p && times >"$at_times_file" 3509) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3510read at_status <"$at_status_file" 3511#AT_STOP_11 3512#AT_START_12 3513at_fn_group_banner 12 'inet.at:16' \ 3514 "inet component" " " 3 3515at_xfail=no 3516 test -f $XFAILFILE && at_xfail=yes 3517( 3518 $as_echo "12. $at_setup_line: testing $at_desc ..." 3519 $at_traceon 3520 3521{ set +x 3522$as_echo "$at_srcdir/inet.at:17: 3523 3524 3525PIES_PIDFILE=\"\$PWD/pies.pid\" 3526PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 3527export PIES_PIDFILE PIES_CTLSOCK 3528cat > control.conf <<_EOT 3529pidfile \"\$PIES_PIDFILE\"; 3530control { 3531 socket \"\$PIES_CTLSOCK\"; 3532} 3533_EOT 3534 3535cat >input <<'_ATEOF' 3536line 1 3537line 2 3538stop 3539_ATEOF 3540 3541: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 3542cat > pies.conf <<_EOT 3543component in { 3544 command \"\$auxdir/in.test \$PWD/inlog\"; 3545 mode inetd; 3546 socket \"\$PIES_TEST_INET_SOCKET\"; 3547 stderr file \"\$PWD/log.err\"; 3548} 3549component controller { 3550 command \"nt -i input \$PIES_TEST_INET_SOCKET\"; 3551} 3552_EOT 3553set -e 3554to 10 \\ 3555 pies --foreground --stderr \\ 3556 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3557 3558cat inlog 3559cat log.err >&2 3560" 3561at_fn_check_prepare_notrace 'a ${...} parameter expansion' "inet.at:17" 3562( $at_check_trace; 3563 3564 3565PIES_PIDFILE="$PWD/pies.pid" 3566PIES_CTLSOCK="unix://$PWD/pies.ctl"; 3567export PIES_PIDFILE PIES_CTLSOCK 3568cat > control.conf <<_EOT 3569pidfile "$PIES_PIDFILE"; 3570control { 3571 socket "$PIES_CTLSOCK"; 3572} 3573_EOT 3574 3575cat >input <<'_ATEOF' 3576line 1 3577line 2 3578stop 3579_ATEOF 3580 3581: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 3582cat > pies.conf <<_EOT 3583component in { 3584 command "$auxdir/in.test $PWD/inlog"; 3585 mode inetd; 3586 socket "$PIES_TEST_INET_SOCKET"; 3587 stderr file "$PWD/log.err"; 3588} 3589component controller { 3590 command "nt -i input $PIES_TEST_INET_SOCKET"; 3591} 3592_EOT 3593set -e 3594to 10 \ 3595 pies --foreground --stderr \ 3596 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3597 3598cat inlog 3599cat log.err >&2 3600 3601) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3602at_status=$? at_failed=false 3603$at_check_filter 3604at_fn_diff_devnull "$at_stderr" || at_failed=: 3605echo >>"$at_stdout"; $as_echo "line 1 3606line 2 3607stop 3608" | \ 3609 $at_diff - "$at_stdout" || at_failed=: 3610at_fn_check_status 0 $at_status "$at_srcdir/inet.at:17" 3611$at_failed && at_fn_log_failure 3612$at_traceon; } 3613 3614 set +x 3615 $at_times_p && times >"$at_times_file" 3616) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3617read at_status <"$at_status_file" 3618#AT_STOP_12 3619#AT_START_13 3620at_fn_group_banner 13 'maxinst.at:17' \ 3621 "inet component: max instances" " " 3 3622at_xfail=no 3623 test -f $XFAILFILE && at_xfail=yes 3624( 3625 $as_echo "13. $at_setup_line: testing $at_desc ..." 3626 $at_traceon 3627 3628{ set +x 3629$as_echo "$at_srcdir/maxinst.at:18: 3630 3631 3632PIES_PIDFILE=\"\$PWD/pies.pid\" 3633PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 3634export PIES_PIDFILE PIES_CTLSOCK 3635cat > control.conf <<_EOT 3636pidfile \"\$PIES_PIDFILE\"; 3637control { 3638 socket \"\$PIES_CTLSOCK\"; 3639} 3640_EOT 3641 3642 3643cat >in1 <<'_ATEOF' 3644test 3645enable con2 3646sleep 10 3647quit 3648_ATEOF 3649 3650 3651cat >in2 <<'_ATEOF' 3652test 3653enable con3 3654sleep 10 3655quit 3656_ATEOF 3657 3658 3659: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 3660 3661cat > pies.conf <<_EOT 3662component in { 3663 command \"\$auxdir/in.test \$PWD/in.log\"; 3664 mode inetd; 3665 socket \"\$PIES_TEST_INET_SOCKET\"; 3666 stderr file \"\$PWD/in.err\"; 3667 max-instances 2; 3668 max-instances-message \"too many instances running\\n\"; 3669} 3670component con1 { 3671 command \"nt -i in1 -o con1.out \$PIES_TEST_INET_SOCKET\"; 3672 stderr file \"/tmp/con1.err\"; 3673} 3674component con2 { 3675 command \"nt -i in2 -o con2.out \$PIES_TEST_INET_SOCKET\"; 3676 stderr file \"/tmp/con2.err\"; 3677 flags (disable); 3678} 3679component con3 { 3680 flags (disable); 3681 command \"nt -o con3.out \$PIES_TEST_INET_SOCKET\"; 3682 stderr file \"/tmp/con3.err\"; 3683 return-code * { 3684 action disable; 3685 exec \"\$abs_top_builddir/src/piesctl --url unix://\$PWD/pies.ctl --no-netrc shutdown\"; 3686 } 3687} 3688_EOT 3689 3690set -e 3691to 10 \\ 3692 pies --foreground --stderr \\ 3693 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3694 3695cat con3.out 3696" 3697at_fn_check_prepare_notrace 'a ${...} parameter expansion' "maxinst.at:18" 3698( $at_check_trace; 3699 3700 3701PIES_PIDFILE="$PWD/pies.pid" 3702PIES_CTLSOCK="unix://$PWD/pies.ctl"; 3703export PIES_PIDFILE PIES_CTLSOCK 3704cat > control.conf <<_EOT 3705pidfile "$PIES_PIDFILE"; 3706control { 3707 socket "$PIES_CTLSOCK"; 3708} 3709_EOT 3710 3711 3712cat >in1 <<'_ATEOF' 3713test 3714enable con2 3715sleep 10 3716quit 3717_ATEOF 3718 3719 3720cat >in2 <<'_ATEOF' 3721test 3722enable con3 3723sleep 10 3724quit 3725_ATEOF 3726 3727 3728: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 3729 3730cat > pies.conf <<_EOT 3731component in { 3732 command "$auxdir/in.test $PWD/in.log"; 3733 mode inetd; 3734 socket "$PIES_TEST_INET_SOCKET"; 3735 stderr file "$PWD/in.err"; 3736 max-instances 2; 3737 max-instances-message "too many instances running\n"; 3738} 3739component con1 { 3740 command "nt -i in1 -o con1.out $PIES_TEST_INET_SOCKET"; 3741 stderr file "/tmp/con1.err"; 3742} 3743component con2 { 3744 command "nt -i in2 -o con2.out $PIES_TEST_INET_SOCKET"; 3745 stderr file "/tmp/con2.err"; 3746 flags (disable); 3747} 3748component con3 { 3749 flags (disable); 3750 command "nt -o con3.out $PIES_TEST_INET_SOCKET"; 3751 stderr file "/tmp/con3.err"; 3752 return-code * { 3753 action disable; 3754 exec "$abs_top_builddir/src/piesctl --url unix://$PWD/pies.ctl --no-netrc shutdown"; 3755 } 3756} 3757_EOT 3758 3759set -e 3760to 10 \ 3761 pies --foreground --stderr \ 3762 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3763 3764cat con3.out 3765 3766) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3767at_status=$? at_failed=false 3768$at_check_filter 3769at_fn_diff_devnull "$at_stderr" || at_failed=: 3770echo >>"$at_stdout"; $as_echo "too many instances running 3771" | \ 3772 $at_diff - "$at_stdout" || at_failed=: 3773at_fn_check_status 0 $at_status "$at_srcdir/maxinst.at:18" 3774$at_failed && at_fn_log_failure 3775$at_traceon; } 3776 3777 3778 set +x 3779 $at_times_p && times >"$at_times_file" 3780) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3781read at_status <"$at_status_file" 3782#AT_STOP_13 3783#AT_START_14 3784at_fn_group_banner 14 'builtin.at:107' \ 3785 "echo" " " 4 3786at_xfail=no 3787 test -f $XFAILFILE && at_xfail=yes 3788( 3789 $as_echo "14. $at_setup_line: testing $at_desc ..." 3790 $at_traceon 3791 3792 3793{ set +x 3794$as_echo "$at_srcdir/builtin.at:107: 3795 3796 3797PIES_PIDFILE=\"\$PWD/pies.pid\" 3798PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 3799export PIES_PIDFILE PIES_CTLSOCK 3800cat > control.conf <<_EOT 3801pidfile \"\$PIES_PIDFILE\"; 3802control { 3803 socket \"\$PIES_CTLSOCK\"; 3804} 3805_EOT 3806 3807cat >input <<'_ATEOF' 3808one 3809two 3810three 3811_ATEOF 3812 3813 3814: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 3815cat > pies.conf <<_EOT 3816 3817component in { 3818 mode inetd; 3819 socket \"\$PIES_TEST_INET_SOCKET\"; 3820 flags internal; 3821 service echo; 3822 stderr file \"\$PWD/log.err\"; 3823} 3824component controller { 3825 command \"nt -i input -o output \$PIES_TEST_INET_SOCKET\"; 3826 return-code * { 3827 action disable; 3828 exec \"piesctl --url '\$PIES_CTLSOCK' --no-netrc shutdown\"; 3829 } 3830} 3831_EOT 3832set -e 3833to 10 \\ 3834 pies --foreground --stderr \\ 3835 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3836 3837cat output 3838cat log.err >&2 3839" 3840at_fn_check_prepare_notrace 'a ${...} parameter expansion' "builtin.at:107" 3841( $at_check_trace; 3842 3843 3844PIES_PIDFILE="$PWD/pies.pid" 3845PIES_CTLSOCK="unix://$PWD/pies.ctl"; 3846export PIES_PIDFILE PIES_CTLSOCK 3847cat > control.conf <<_EOT 3848pidfile "$PIES_PIDFILE"; 3849control { 3850 socket "$PIES_CTLSOCK"; 3851} 3852_EOT 3853 3854cat >input <<'_ATEOF' 3855one 3856two 3857three 3858_ATEOF 3859 3860 3861: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 3862cat > pies.conf <<_EOT 3863 3864component in { 3865 mode inetd; 3866 socket "$PIES_TEST_INET_SOCKET"; 3867 flags internal; 3868 service echo; 3869 stderr file "$PWD/log.err"; 3870} 3871component controller { 3872 command "nt -i input -o output $PIES_TEST_INET_SOCKET"; 3873 return-code * { 3874 action disable; 3875 exec "piesctl --url '$PIES_CTLSOCK' --no-netrc shutdown"; 3876 } 3877} 3878_EOT 3879set -e 3880to 10 \ 3881 pies --foreground --stderr \ 3882 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3883 3884cat output 3885cat log.err >&2 3886 3887) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3888at_status=$? at_failed=false 3889$at_check_filter 3890at_fn_diff_devnull "$at_stderr" || at_failed=: 3891echo >>"$at_stdout"; $as_echo "one 3892two 3893three 3894" | \ 3895 $at_diff - "$at_stdout" || at_failed=: 3896at_fn_check_status 0 $at_status "$at_srcdir/builtin.at:107" 3897$at_failed && at_fn_log_failure 3898$at_traceon; } 3899 3900 set +x 3901 $at_times_p && times >"$at_times_file" 3902) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3903read at_status <"$at_status_file" 3904#AT_STOP_14 3905#AT_START_15 3906at_fn_group_banner 15 'builtin.at:117' \ 3907 "discard" " " 4 3908at_xfail=no 3909 test -f $XFAILFILE && at_xfail=yes 3910( 3911 $as_echo "15. $at_setup_line: testing $at_desc ..." 3912 $at_traceon 3913 3914 3915{ set +x 3916$as_echo "$at_srcdir/builtin.at:117: 3917 3918 3919PIES_PIDFILE=\"\$PWD/pies.pid\" 3920PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 3921export PIES_PIDFILE PIES_CTLSOCK 3922cat > control.conf <<_EOT 3923pidfile \"\$PIES_PIDFILE\"; 3924control { 3925 socket \"\$PIES_CTLSOCK\"; 3926} 3927_EOT 3928 3929cat >input <<'_ATEOF' 3930one 3931two 3932three 3933_ATEOF 3934 3935 3936: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 3937cat > pies.conf <<_EOT 3938 3939component in { 3940 mode inetd; 3941 socket \"\$PIES_TEST_INET_SOCKET\"; 3942 flags internal; 3943 service discard; 3944 stderr file \"\$PWD/log.err\"; 3945} 3946component controller { 3947 command \"nt -i input -o output \$PIES_TEST_INET_SOCKET\"; 3948 return-code * { 3949 action disable; 3950 exec \"piesctl --url '\$PIES_CTLSOCK' --no-netrc shutdown\"; 3951 } 3952} 3953_EOT 3954set -e 3955to 10 \\ 3956 pies --foreground --stderr \\ 3957 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 3958 3959cat output 3960cat log.err >&2 3961" 3962at_fn_check_prepare_notrace 'a ${...} parameter expansion' "builtin.at:117" 3963( $at_check_trace; 3964 3965 3966PIES_PIDFILE="$PWD/pies.pid" 3967PIES_CTLSOCK="unix://$PWD/pies.ctl"; 3968export PIES_PIDFILE PIES_CTLSOCK 3969cat > control.conf <<_EOT 3970pidfile "$PIES_PIDFILE"; 3971control { 3972 socket "$PIES_CTLSOCK"; 3973} 3974_EOT 3975 3976cat >input <<'_ATEOF' 3977one 3978two 3979three 3980_ATEOF 3981 3982 3983: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 3984cat > pies.conf <<_EOT 3985 3986component in { 3987 mode inetd; 3988 socket "$PIES_TEST_INET_SOCKET"; 3989 flags internal; 3990 service discard; 3991 stderr file "$PWD/log.err"; 3992} 3993component controller { 3994 command "nt -i input -o output $PIES_TEST_INET_SOCKET"; 3995 return-code * { 3996 action disable; 3997 exec "piesctl --url '$PIES_CTLSOCK' --no-netrc shutdown"; 3998 } 3999} 4000_EOT 4001set -e 4002to 10 \ 4003 pies --foreground --stderr \ 4004 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4005 4006cat output 4007cat log.err >&2 4008 4009) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4010at_status=$? at_failed=false 4011$at_check_filter 4012at_fn_diff_devnull "$at_stderr" || at_failed=: 4013at_fn_diff_devnull "$at_stdout" || at_failed=: 4014at_fn_check_status 0 $at_status "$at_srcdir/builtin.at:117" 4015$at_failed && at_fn_log_failure 4016$at_traceon; } 4017 4018 set +x 4019 $at_times_p && times >"$at_times_file" 4020) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4021read at_status <"$at_status_file" 4022#AT_STOP_15 4023#AT_START_16 4024at_fn_group_banner 16 'builtin.at:123' \ 4025 "time" " " 4 4026at_xfail=no 4027 test -f $XFAILFILE && at_xfail=yes 4028( 4029 $as_echo "16. $at_setup_line: testing $at_desc ..." 4030 $at_traceon 4031 4032 4033{ set +x 4034$as_echo "$at_srcdir/builtin.at:123: 4035 4036 4037PIES_PIDFILE=\"\$PWD/pies.pid\" 4038PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 4039export PIES_PIDFILE PIES_CTLSOCK 4040cat > control.conf <<_EOT 4041pidfile \"\$PIES_PIDFILE\"; 4042control { 4043 socket \"\$PIES_CTLSOCK\"; 4044} 4045_EOT 4046 4047: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 4048cat > pies.conf <<_EOT 4049component in { 4050 mode inetd; 4051 socket \"\$PIES_TEST_INET_SOCKET\"; 4052 flags internal; 4053 service time; 4054 stderr file \"\$PWD/in.err\"; 4055} 4056component controller { 4057 command \"readtime '\$PIES_TEST_INET_SOCKET'\"; 4058 stderr file \"\$PWD/controller.err\"; 4059 return-code * { 4060 action disable; 4061 exec \"echo \\\$PIES_STATUS > \$PWD/status ; piesctl --url '\$PIES_CTLSOCK' --no-netrc shutdown\"; 4062 } 4063} 4064_EOT 4065TZ=0 4066export TZ 4067set -e 4068to 10 \\ 4069 pies --foreground --stderr \\ 4070 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4071 4072if test -s in.err; then 4073 echo >&2 \"in.err:\" 4074 cat controller.err >&2 4075fi 4076if test -s controller.err; then 4077 echo >&2 \"controller.err:\" 4078 cat controller.err >&2 4079fi 4080exit \`cat status\` 4081" 4082at_fn_check_prepare_notrace 'a `...` command substitution' "builtin.at:123" 4083( $at_check_trace; 4084 4085 4086PIES_PIDFILE="$PWD/pies.pid" 4087PIES_CTLSOCK="unix://$PWD/pies.ctl"; 4088export PIES_PIDFILE PIES_CTLSOCK 4089cat > control.conf <<_EOT 4090pidfile "$PIES_PIDFILE"; 4091control { 4092 socket "$PIES_CTLSOCK"; 4093} 4094_EOT 4095 4096: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 4097cat > pies.conf <<_EOT 4098component in { 4099 mode inetd; 4100 socket "$PIES_TEST_INET_SOCKET"; 4101 flags internal; 4102 service time; 4103 stderr file "$PWD/in.err"; 4104} 4105component controller { 4106 command "readtime '$PIES_TEST_INET_SOCKET'"; 4107 stderr file "$PWD/controller.err"; 4108 return-code * { 4109 action disable; 4110 exec "echo \$PIES_STATUS > $PWD/status ; piesctl --url '$PIES_CTLSOCK' --no-netrc shutdown"; 4111 } 4112} 4113_EOT 4114TZ=0 4115export TZ 4116set -e 4117to 10 \ 4118 pies --foreground --stderr \ 4119 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4120 4121if test -s in.err; then 4122 echo >&2 "in.err:" 4123 cat controller.err >&2 4124fi 4125if test -s controller.err; then 4126 echo >&2 "controller.err:" 4127 cat controller.err >&2 4128fi 4129exit `cat status` 4130 4131) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4132at_status=$? at_failed=false 4133$at_check_filter 4134at_fn_diff_devnull "$at_stderr" || at_failed=: 4135at_fn_diff_devnull "$at_stdout" || at_failed=: 4136at_fn_check_status 0 $at_status "$at_srcdir/builtin.at:123" 4137$at_failed && at_fn_log_failure 4138$at_traceon; } 4139 4140 set +x 4141 $at_times_p && times >"$at_times_file" 4142) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4143read at_status <"$at_status_file" 4144#AT_STOP_16 4145#AT_START_17 4146at_fn_group_banner 17 'builtin.at:124' \ 4147 "daytime" " " 4 4148at_xfail=no 4149 test -f $XFAILFILE && at_xfail=yes 4150( 4151 $as_echo "17. $at_setup_line: testing $at_desc ..." 4152 $at_traceon 4153 4154 4155{ set +x 4156$as_echo "$at_srcdir/builtin.at:124: 4157 4158 4159PIES_PIDFILE=\"\$PWD/pies.pid\" 4160PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 4161export PIES_PIDFILE PIES_CTLSOCK 4162cat > control.conf <<_EOT 4163pidfile \"\$PIES_PIDFILE\"; 4164control { 4165 socket \"\$PIES_CTLSOCK\"; 4166} 4167_EOT 4168 4169: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 4170cat > pies.conf <<_EOT 4171component in { 4172 mode inetd; 4173 socket \"\$PIES_TEST_INET_SOCKET\"; 4174 flags internal; 4175 service daytime; 4176 stderr file \"\$PWD/in.err\"; 4177} 4178component controller { 4179 command \"readtime -H '\$PIES_TEST_INET_SOCKET'\"; 4180 stderr file \"\$PWD/controller.err\"; 4181 return-code * { 4182 action disable; 4183 exec \"echo \\\$PIES_STATUS > \$PWD/status ; piesctl --url '\$PIES_CTLSOCK' --no-netrc shutdown\"; 4184 } 4185} 4186_EOT 4187TZ=0 4188export TZ 4189set -e 4190to 10 \\ 4191 pies --foreground --stderr \\ 4192 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4193 4194if test -s in.err; then 4195 echo >&2 \"in.err:\" 4196 cat controller.err >&2 4197fi 4198if test -s controller.err; then 4199 echo >&2 \"controller.err:\" 4200 cat controller.err >&2 4201fi 4202exit \`cat status\` 4203" 4204at_fn_check_prepare_notrace 'a `...` command substitution' "builtin.at:124" 4205( $at_check_trace; 4206 4207 4208PIES_PIDFILE="$PWD/pies.pid" 4209PIES_CTLSOCK="unix://$PWD/pies.ctl"; 4210export PIES_PIDFILE PIES_CTLSOCK 4211cat > control.conf <<_EOT 4212pidfile "$PIES_PIDFILE"; 4213control { 4214 socket "$PIES_CTLSOCK"; 4215} 4216_EOT 4217 4218: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 4219cat > pies.conf <<_EOT 4220component in { 4221 mode inetd; 4222 socket "$PIES_TEST_INET_SOCKET"; 4223 flags internal; 4224 service daytime; 4225 stderr file "$PWD/in.err"; 4226} 4227component controller { 4228 command "readtime -H '$PIES_TEST_INET_SOCKET'"; 4229 stderr file "$PWD/controller.err"; 4230 return-code * { 4231 action disable; 4232 exec "echo \$PIES_STATUS > $PWD/status ; piesctl --url '$PIES_CTLSOCK' --no-netrc shutdown"; 4233 } 4234} 4235_EOT 4236TZ=0 4237export TZ 4238set -e 4239to 10 \ 4240 pies --foreground --stderr \ 4241 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4242 4243if test -s in.err; then 4244 echo >&2 "in.err:" 4245 cat controller.err >&2 4246fi 4247if test -s controller.err; then 4248 echo >&2 "controller.err:" 4249 cat controller.err >&2 4250fi 4251exit `cat status` 4252 4253) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4254at_status=$? at_failed=false 4255$at_check_filter 4256at_fn_diff_devnull "$at_stderr" || at_failed=: 4257at_fn_diff_devnull "$at_stdout" || at_failed=: 4258at_fn_check_status 0 $at_status "$at_srcdir/builtin.at:124" 4259$at_failed && at_fn_log_failure 4260$at_traceon; } 4261 4262 set +x 4263 $at_times_p && times >"$at_times_file" 4264) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4265read at_status <"$at_status_file" 4266#AT_STOP_17 4267#AT_START_18 4268at_fn_group_banner 18 'builtin.at:125' \ 4269 "chargen" " " 4 4270at_xfail=no 4271 test -f $XFAILFILE && at_xfail=yes 4272( 4273 $as_echo "18. $at_setup_line: testing $at_desc ..." 4274 $at_traceon 4275 4276 4277{ set +x 4278$as_echo "$at_srcdir/builtin.at:125: 4279 4280 4281PIES_PIDFILE=\"\$PWD/pies.pid\" 4282PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 4283export PIES_PIDFILE PIES_CTLSOCK 4284cat > control.conf <<_EOT 4285pidfile \"\$PIES_PIDFILE\"; 4286control { 4287 socket \"\$PIES_CTLSOCK\"; 4288} 4289_EOT 4290 4291: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 4292cat > pies.conf <<_EOT 4293component in { 4294 mode inetd; 4295 socket \"\$PIES_TEST_INET_SOCKET\"; 4296 flags internal; 4297 service chargen; 4298 stderr file \"\$PWD/in.err\"; 4299} 4300component controller { 4301 command \"chargen '\$PIES_TEST_INET_SOCKET'\"; 4302 stderr file \"\$PWD/controller.err\"; 4303 return-code * { 4304 action disable; 4305 exec \"echo \\\$PIES_STATUS > \$PWD/status ; piesctl --url '\$PIES_CTLSOCK' --no-netrc shutdown\"; 4306 } 4307} 4308_EOT 4309TZ=0 4310export TZ 4311set -e 4312to 10 \\ 4313 pies --foreground --stderr \\ 4314 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4315 4316if test -s in.err; then 4317 echo >&2 \"in.err:\" 4318 cat controller.err >&2 4319fi 4320if test -s controller.err; then 4321 echo >&2 \"controller.err:\" 4322 cat controller.err >&2 4323fi 4324exit \`cat status\` 4325" 4326at_fn_check_prepare_notrace 'a `...` command substitution' "builtin.at:125" 4327( $at_check_trace; 4328 4329 4330PIES_PIDFILE="$PWD/pies.pid" 4331PIES_CTLSOCK="unix://$PWD/pies.ctl"; 4332export PIES_PIDFILE PIES_CTLSOCK 4333cat > control.conf <<_EOT 4334pidfile "$PIES_PIDFILE"; 4335control { 4336 socket "$PIES_CTLSOCK"; 4337} 4338_EOT 4339 4340: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 4341cat > pies.conf <<_EOT 4342component in { 4343 mode inetd; 4344 socket "$PIES_TEST_INET_SOCKET"; 4345 flags internal; 4346 service chargen; 4347 stderr file "$PWD/in.err"; 4348} 4349component controller { 4350 command "chargen '$PIES_TEST_INET_SOCKET'"; 4351 stderr file "$PWD/controller.err"; 4352 return-code * { 4353 action disable; 4354 exec "echo \$PIES_STATUS > $PWD/status ; piesctl --url '$PIES_CTLSOCK' --no-netrc shutdown"; 4355 } 4356} 4357_EOT 4358TZ=0 4359export TZ 4360set -e 4361to 10 \ 4362 pies --foreground --stderr \ 4363 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4364 4365if test -s in.err; then 4366 echo >&2 "in.err:" 4367 cat controller.err >&2 4368fi 4369if test -s controller.err; then 4370 echo >&2 "controller.err:" 4371 cat controller.err >&2 4372fi 4373exit `cat status` 4374 4375) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4376at_status=$? at_failed=false 4377$at_check_filter 4378at_fn_diff_devnull "$at_stderr" || at_failed=: 4379at_fn_diff_devnull "$at_stdout" || at_failed=: 4380at_fn_check_status 0 $at_status "$at_srcdir/builtin.at:125" 4381$at_failed && at_fn_log_failure 4382$at_traceon; } 4383 4384 set +x 4385 $at_times_p && times >"$at_times_file" 4386) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4387read at_status <"$at_status_file" 4388#AT_STOP_18 4389#AT_START_19 4390at_fn_group_banner 19 'builtin.at:126' \ 4391 "qotd" " " 4 4392at_xfail=no 4393 test -f $XFAILFILE && at_xfail=yes 4394( 4395 $as_echo "19. $at_setup_line: testing $at_desc ..." 4396 $at_traceon 4397 4398 4399{ set +x 4400$as_echo "$at_srcdir/builtin.at:126: 4401 4402 4403PIES_PIDFILE=\"\$PWD/pies.pid\" 4404PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 4405export PIES_PIDFILE PIES_CTLSOCK 4406cat > control.conf <<_EOT 4407pidfile \"\$PIES_PIDFILE\"; 4408control { 4409 socket \"\$PIES_CTLSOCK\"; 4410} 4411_EOT 4412 4413: >input 4414cat >qotd <<'_ATEOF' 4415A useful debugging and measurement tool is a quote of the day service. 4416A quote of the day service simply sends a short message without regard 4417to the input. 4418_ATEOF 4419 4420: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 4421cat > pies.conf <<_EOT 4422qotd-file \"\$PWD/qotd\"; 4423 4424component in { 4425 mode inetd; 4426 socket \"\$PIES_TEST_INET_SOCKET\"; 4427 flags internal; 4428 service qotd; 4429 stderr file \"\$PWD/log.err\"; 4430} 4431component controller { 4432 command \"nt -i input -o output \$PIES_TEST_INET_SOCKET\"; 4433 return-code * { 4434 action disable; 4435 exec \"piesctl --url '\$PIES_CTLSOCK' --no-netrc shutdown\"; 4436 } 4437} 4438_EOT 4439set -e 4440to 10 \\ 4441 pies --foreground --stderr \\ 4442 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4443 4444cat output | tr -d '\\r' 4445cat log.err >&2 4446" 4447at_fn_check_prepare_notrace 'a ${...} parameter expansion' "builtin.at:126" 4448( $at_check_trace; 4449 4450 4451PIES_PIDFILE="$PWD/pies.pid" 4452PIES_CTLSOCK="unix://$PWD/pies.ctl"; 4453export PIES_PIDFILE PIES_CTLSOCK 4454cat > control.conf <<_EOT 4455pidfile "$PIES_PIDFILE"; 4456control { 4457 socket "$PIES_CTLSOCK"; 4458} 4459_EOT 4460 4461: >input 4462cat >qotd <<'_ATEOF' 4463A useful debugging and measurement tool is a quote of the day service. 4464A quote of the day service simply sends a short message without regard 4465to the input. 4466_ATEOF 4467 4468: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 4469cat > pies.conf <<_EOT 4470qotd-file "$PWD/qotd"; 4471 4472component in { 4473 mode inetd; 4474 socket "$PIES_TEST_INET_SOCKET"; 4475 flags internal; 4476 service qotd; 4477 stderr file "$PWD/log.err"; 4478} 4479component controller { 4480 command "nt -i input -o output $PIES_TEST_INET_SOCKET"; 4481 return-code * { 4482 action disable; 4483 exec "piesctl --url '$PIES_CTLSOCK' --no-netrc shutdown"; 4484 } 4485} 4486_EOT 4487set -e 4488to 10 \ 4489 pies --foreground --stderr \ 4490 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4491 4492cat output | tr -d '\r' 4493cat log.err >&2 4494 4495) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4496at_status=$? at_failed=false 4497$at_check_filter 4498at_fn_diff_devnull "$at_stderr" || at_failed=: 4499echo >>"$at_stdout"; $as_echo "A useful debugging and measurement tool is a quote of the day service. 4500A quote of the day service simply sends a short message without regard 4501to the input. 4502" | \ 4503 $at_diff - "$at_stdout" || at_failed=: 4504at_fn_check_status 0 $at_status "$at_srcdir/builtin.at:126" 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_19 4513#AT_START_20 4514at_fn_group_banner 20 'builtin.at:196' \ 4515 "tcpmux: help" " " 4 4516at_xfail=no 4517 test -f $XFAILFILE && at_xfail=yes 4518( 4519 $as_echo "20. $at_setup_line: testing $at_desc ..." 4520 $at_traceon 4521 4522 4523{ set +x 4524$as_echo "$at_srcdir/builtin.at:196: 4525 4526 4527PIES_PIDFILE=\"\$PWD/pies.pid\" 4528PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 4529export PIES_PIDFILE PIES_CTLSOCK 4530cat > control.conf <<_EOT 4531pidfile \"\$PIES_PIDFILE\"; 4532control { 4533 socket \"\$PIES_CTLSOCK\"; 4534} 4535_EOT 4536 4537: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 4538 4539cat > pies.conf <<_EOT 4540component master { 4541 socket \"\$PIES_TEST_INET_SOCKET\"; 4542 service tcpmux; 4543 flags internal; 4544} 4545component one { 4546 service one; 4547 flags (tcpmuxplus); 4548 tcpmux-master master; 4549 command \"\$auxdir/in.test \$PWD/one.log\"; 4550 stderr file \"\$PWD/one.err\"; 4551} 4552component two { 4553 service two; 4554 flags (tcpmuxplus); 4555 tcpmux-master master; 4556 command \"\$auxdir/in.test \$PWD/two.log\"; 4557 stderr file \"\$PWD/two.err\"; 4558} 4559component test { 4560 command \"nt -t help -o \$PWD/test.out '\$PIES_TEST_INET_SOCKET'\"; 4561 stderr file \"\$PWD/test.err\"; 4562 return-code * { 4563 action disable; 4564 exec \"piesctl --no-netrc --url=\$PIES_CTLSOCK shutdown\"; 4565 } 4566} 4567_EOT 4568 4569set -e 4570to 10 \\ 4571 pies --foreground --stderr \\ 4572 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4573 4574for err in one.err two.err test.err 4575do 4576 if test -s \$err; then 4577 echo \"\$err:\" 4578 cat \$err 4579 fi 4580done >&2 4581 4582if test -f test.out; then 4583 cat test.out | tr -d '\\r' 4584fi 4585" 4586at_fn_check_prepare_notrace 'a ${...} parameter expansion' "builtin.at:196" 4587( $at_check_trace; 4588 4589 4590PIES_PIDFILE="$PWD/pies.pid" 4591PIES_CTLSOCK="unix://$PWD/pies.ctl"; 4592export PIES_PIDFILE PIES_CTLSOCK 4593cat > control.conf <<_EOT 4594pidfile "$PIES_PIDFILE"; 4595control { 4596 socket "$PIES_CTLSOCK"; 4597} 4598_EOT 4599 4600: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 4601 4602cat > pies.conf <<_EOT 4603component master { 4604 socket "$PIES_TEST_INET_SOCKET"; 4605 service tcpmux; 4606 flags internal; 4607} 4608component one { 4609 service one; 4610 flags (tcpmuxplus); 4611 tcpmux-master master; 4612 command "$auxdir/in.test $PWD/one.log"; 4613 stderr file "$PWD/one.err"; 4614} 4615component two { 4616 service two; 4617 flags (tcpmuxplus); 4618 tcpmux-master master; 4619 command "$auxdir/in.test $PWD/two.log"; 4620 stderr file "$PWD/two.err"; 4621} 4622component test { 4623 command "nt -t help -o $PWD/test.out '$PIES_TEST_INET_SOCKET'"; 4624 stderr file "$PWD/test.err"; 4625 return-code * { 4626 action disable; 4627 exec "piesctl --no-netrc --url=$PIES_CTLSOCK shutdown"; 4628 } 4629} 4630_EOT 4631 4632set -e 4633to 10 \ 4634 pies --foreground --stderr \ 4635 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4636 4637for err in one.err two.err test.err 4638do 4639 if test -s $err; then 4640 echo "$err:" 4641 cat $err 4642 fi 4643done >&2 4644 4645if test -f test.out; then 4646 cat test.out | tr -d '\r' 4647fi 4648 4649) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4650at_status=$? at_failed=false 4651$at_check_filter 4652at_fn_diff_devnull "$at_stderr" || at_failed=: 4653echo >>"$at_stdout"; $as_echo "one 4654two 4655" | \ 4656 $at_diff - "$at_stdout" || at_failed=: 4657at_fn_check_status 0 $at_status "$at_srcdir/builtin.at:196" 4658$at_failed && at_fn_log_failure 4659$at_traceon; } 4660 4661 set +x 4662 $at_times_p && times >"$at_times_file" 4663) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4664read at_status <"$at_status_file" 4665#AT_STOP_20 4666#AT_START_21 4667at_fn_group_banner 21 'builtin.at:201' \ 4668 "tcpmux: service" " " 4 4669at_xfail=no 4670 test -f $XFAILFILE && at_xfail=yes 4671( 4672 $as_echo "21. $at_setup_line: testing $at_desc ..." 4673 $at_traceon 4674 4675 4676{ set +x 4677$as_echo "$at_srcdir/builtin.at:201: 4678 4679 4680PIES_PIDFILE=\"\$PWD/pies.pid\" 4681PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 4682export PIES_PIDFILE PIES_CTLSOCK 4683cat > control.conf <<_EOT 4684pidfile \"\$PIES_PIDFILE\"; 4685control { 4686 socket \"\$PIES_CTLSOCK\"; 4687} 4688_EOT 4689 4690: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 4691cat >input <<'_ATEOF' 4692Test one 4693quit 4694_ATEOF 4695 4696cat > pies.conf <<_EOT 4697component master { 4698 socket \"\$PIES_TEST_INET_SOCKET\"; 4699 service tcpmux; 4700 flags internal; 4701} 4702component one { 4703 service one; 4704 flags (tcpmuxplus); 4705 tcpmux-master master; 4706 command \"\$auxdir/in.test \$PWD/one.log\"; 4707 stderr file \"\$PWD/one.err\"; 4708} 4709component two { 4710 service two; 4711 flags (tcpmuxplus); 4712 tcpmux-master master; 4713 command \"\$auxdir/in.test \$PWD/two.log\"; 4714 stderr file \"\$PWD/two.err\"; 4715} 4716component test { 4717 command \"nt -t one -i \$PWD/input -o \$PWD/test.out '\$PIES_TEST_INET_SOCKET'\"; 4718 stderr file \"\$PWD/test.err\"; 4719 return-code * { 4720 action disable; 4721 exec \"piesctl --no-netrc --url=\$PIES_CTLSOCK shutdown\"; 4722 } 4723} 4724_EOT 4725 4726set -e 4727to 10 \\ 4728 pies --foreground --stderr \\ 4729 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4730 4731for err in one.err two.err test.err 4732do 4733 if test -s \$err; then 4734 echo \"\$err:\" 4735 cat \$err 4736 fi 4737done >&2 4738 4739if test -f test.out; then 4740 cat test.out | tr -d '\\r' 4741fi 4742" 4743at_fn_check_prepare_notrace 'a ${...} parameter expansion' "builtin.at:201" 4744( $at_check_trace; 4745 4746 4747PIES_PIDFILE="$PWD/pies.pid" 4748PIES_CTLSOCK="unix://$PWD/pies.ctl"; 4749export PIES_PIDFILE PIES_CTLSOCK 4750cat > control.conf <<_EOT 4751pidfile "$PIES_PIDFILE"; 4752control { 4753 socket "$PIES_CTLSOCK"; 4754} 4755_EOT 4756 4757: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 4758cat >input <<'_ATEOF' 4759Test one 4760quit 4761_ATEOF 4762 4763cat > pies.conf <<_EOT 4764component master { 4765 socket "$PIES_TEST_INET_SOCKET"; 4766 service tcpmux; 4767 flags internal; 4768} 4769component one { 4770 service one; 4771 flags (tcpmuxplus); 4772 tcpmux-master master; 4773 command "$auxdir/in.test $PWD/one.log"; 4774 stderr file "$PWD/one.err"; 4775} 4776component two { 4777 service two; 4778 flags (tcpmuxplus); 4779 tcpmux-master master; 4780 command "$auxdir/in.test $PWD/two.log"; 4781 stderr file "$PWD/two.err"; 4782} 4783component test { 4784 command "nt -t one -i $PWD/input -o $PWD/test.out '$PIES_TEST_INET_SOCKET'"; 4785 stderr file "$PWD/test.err"; 4786 return-code * { 4787 action disable; 4788 exec "piesctl --no-netrc --url=$PIES_CTLSOCK shutdown"; 4789 } 4790} 4791_EOT 4792 4793set -e 4794to 10 \ 4795 pies --foreground --stderr \ 4796 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4797 4798for err in one.err two.err test.err 4799do 4800 if test -s $err; then 4801 echo "$err:" 4802 cat $err 4803 fi 4804done >&2 4805 4806if test -f test.out; then 4807 cat test.out | tr -d '\r' 4808fi 4809 4810) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4811at_status=$? at_failed=false 4812$at_check_filter 4813at_fn_diff_devnull "$at_stderr" || at_failed=: 4814echo >>"$at_stdout"; $as_echo "OK Test one 4815" | \ 4816 $at_diff - "$at_stdout" || at_failed=: 4817at_fn_check_status 0 $at_status "$at_srcdir/builtin.at:201" 4818$at_failed && at_fn_log_failure 4819$at_traceon; } 4820 4821 set +x 4822 $at_times_p && times >"$at_times_file" 4823) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4824read at_status <"$at_status_file" 4825#AT_STOP_21 4826#AT_START_22 4827at_fn_group_banner 22 'passfd.at:16' \ 4828 "pass-fd component" " " 4 4829at_xfail=no 4830 test -f $XFAILFILE && at_xfail=yes 4831( 4832 $as_echo "22. $at_setup_line: testing $at_desc ..." 4833 $at_traceon 4834 4835{ set +x 4836$as_echo "$at_srcdir/passfd.at:17: 4837 4838 4839PIES_PIDFILE=\"\$PWD/pies.pid\" 4840PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 4841export PIES_PIDFILE PIES_CTLSOCK 4842cat > control.conf <<_EOT 4843pidfile \"\$PIES_PIDFILE\"; 4844control { 4845 socket \"\$PIES_CTLSOCK\"; 4846} 4847_EOT 4848 4849 4850cat >input <<'_ATEOF' 4851now is 4852the time 4853stop 4854_ATEOF 4855 4856 4857: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 4858PIES_FD_SOCKET=\$PWD/pfd.sock 4859 4860cat > pies.conf <<_EOT 4861component pfd { 4862 command \"recvfd -s '\$PIES_FD_SOCKET' \$auxdir/in.test \$PWD/inlog\"; 4863 mode pass-fd; 4864 pass-fd-timeout 3; 4865 pass-fd-socket \"\$PIES_FD_SOCKET\"; 4866 socket \"\$PIES_TEST_INET_SOCKET\"; 4867 stderr file \"\$PWD/log.err\"; 4868} 4869component controller { 4870 command \"nt -i input \$PIES_TEST_INET_SOCKET\"; 4871} 4872_EOT 4873 4874set -e 4875to 10 \\ 4876 pies --foreground --stderr \\ 4877 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4878 4879cat inlog 4880cat log.err >&2 4881" 4882at_fn_check_prepare_notrace 'a ${...} parameter expansion' "passfd.at:17" 4883( $at_check_trace; 4884 4885 4886PIES_PIDFILE="$PWD/pies.pid" 4887PIES_CTLSOCK="unix://$PWD/pies.ctl"; 4888export PIES_PIDFILE PIES_CTLSOCK 4889cat > control.conf <<_EOT 4890pidfile "$PIES_PIDFILE"; 4891control { 4892 socket "$PIES_CTLSOCK"; 4893} 4894_EOT 4895 4896 4897cat >input <<'_ATEOF' 4898now is 4899the time 4900stop 4901_ATEOF 4902 4903 4904: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 4905PIES_FD_SOCKET=$PWD/pfd.sock 4906 4907cat > pies.conf <<_EOT 4908component pfd { 4909 command "recvfd -s '$PIES_FD_SOCKET' $auxdir/in.test $PWD/inlog"; 4910 mode pass-fd; 4911 pass-fd-timeout 3; 4912 pass-fd-socket "$PIES_FD_SOCKET"; 4913 socket "$PIES_TEST_INET_SOCKET"; 4914 stderr file "$PWD/log.err"; 4915} 4916component controller { 4917 command "nt -i input $PIES_TEST_INET_SOCKET"; 4918} 4919_EOT 4920 4921set -e 4922to 10 \ 4923 pies --foreground --stderr \ 4924 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4925 4926cat inlog 4927cat log.err >&2 4928 4929) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4930at_status=$? at_failed=false 4931$at_check_filter 4932at_fn_diff_devnull "$at_stderr" || at_failed=: 4933echo >>"$at_stdout"; $as_echo "now is 4934the time 4935stop 4936" | \ 4937 $at_diff - "$at_stdout" || at_failed=: 4938at_fn_check_status 0 $at_status "$at_srcdir/passfd.at:17" 4939$at_failed && at_fn_log_failure 4940$at_traceon; } 4941 4942 set +x 4943 $at_times_p && times >"$at_times_file" 4944) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4945read at_status <"$at_status_file" 4946#AT_STOP_22 4947#AT_START_23 4948at_fn_group_banner 23 'accept.at:16' \ 4949 "accept component" " " 4 4950at_xfail=no 4951 test -f $XFAILFILE && at_xfail=yes 4952( 4953 $as_echo "23. $at_setup_line: testing $at_desc ..." 4954 $at_traceon 4955 4956{ set +x 4957$as_echo "$at_srcdir/accept.at:17: 4958 4959 4960PIES_PIDFILE=\"\$PWD/pies.pid\" 4961PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 4962export PIES_PIDFILE PIES_CTLSOCK 4963cat > control.conf <<_EOT 4964pidfile \"\$PIES_PIDFILE\"; 4965control { 4966 socket \"\$PIES_CTLSOCK\"; 4967} 4968_EOT 4969 4970 4971cat >input <<'_ATEOF' 4972now is 4973the time 4974stop 4975_ATEOF 4976 4977 4978: \${PIES_TEST_INET_SOCKET:=unix://\$PWD/in.sock} 4979 4980cat > pies.conf <<_EOT 4981component pfd { 4982 command \"recvfd \$auxdir/in.test \$PWD/inlog\"; 4983 mode accept; 4984 socket \"\$PIES_TEST_INET_SOCKET\"; 4985 stderr file \"\$PWD/log.err\"; 4986} 4987component controller { 4988 command \"nt -i input \$PIES_TEST_INET_SOCKET\"; 4989} 4990_EOT 4991 4992set -e 4993to 10 \\ 4994 pies --foreground --stderr \\ 4995 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 4996 4997cat inlog 4998cat log.err >&2 4999" 5000at_fn_check_prepare_notrace 'a ${...} parameter expansion' "accept.at:17" 5001( $at_check_trace; 5002 5003 5004PIES_PIDFILE="$PWD/pies.pid" 5005PIES_CTLSOCK="unix://$PWD/pies.ctl"; 5006export PIES_PIDFILE PIES_CTLSOCK 5007cat > control.conf <<_EOT 5008pidfile "$PIES_PIDFILE"; 5009control { 5010 socket "$PIES_CTLSOCK"; 5011} 5012_EOT 5013 5014 5015cat >input <<'_ATEOF' 5016now is 5017the time 5018stop 5019_ATEOF 5020 5021 5022: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock} 5023 5024cat > pies.conf <<_EOT 5025component pfd { 5026 command "recvfd $auxdir/in.test $PWD/inlog"; 5027 mode accept; 5028 socket "$PIES_TEST_INET_SOCKET"; 5029 stderr file "$PWD/log.err"; 5030} 5031component controller { 5032 command "nt -i input $PIES_TEST_INET_SOCKET"; 5033} 5034_EOT 5035 5036set -e 5037to 10 \ 5038 pies --foreground --stderr \ 5039 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 5040 5041cat inlog 5042cat log.err >&2 5043 5044) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5045at_status=$? at_failed=false 5046$at_check_filter 5047at_fn_diff_devnull "$at_stderr" || at_failed=: 5048echo >>"$at_stdout"; $as_echo "now is 5049the time 5050stop 5051" | \ 5052 $at_diff - "$at_stdout" || at_failed=: 5053at_fn_check_status 0 $at_status "$at_srcdir/accept.at:17" 5054$at_failed && at_fn_log_failure 5055$at_traceon; } 5056 5057 set +x 5058 $at_times_p && times >"$at_times_file" 5059) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5060read at_status <"$at_status_file" 5061#AT_STOP_23 5062#AT_START_24 5063at_fn_group_banner 24 'envop.at:31' \ 5064 "default environment" " " 5 5065at_xfail=no 5066( 5067 $as_echo "24. $at_setup_line: testing $at_desc ..." 5068 $at_traceon 5069 5070 5071{ set +x 5072$as_echo "$at_srcdir/envop.at:31: envtest " 5073at_fn_check_prepare_trace "envop.at:31" 5074( $at_check_trace; envtest 5075) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5076at_status=$? at_failed=false 5077$at_check_filter 5078at_fn_diff_devnull "$at_stderr" || at_failed=: 5079echo >>"$at_stdout"; $as_echo "HOME=\"/home/user\" 5080LC_ALL=\"C\" 5081LC_CTYPE=\"C\" 5082LC_MESSAGES=\"C\" 5083LC_NUMERIC=\"C\" 5084LOGIN=\"user\" 5085PATH=\"/usr/local/bin:/usr/bin:/bin\" 5086PWD=\"/home\" 5087USER=\"user\" 5088" | \ 5089 $at_diff - "$at_stdout" || at_failed=: 5090at_fn_check_status 0 $at_status "$at_srcdir/envop.at:31" 5091$at_failed && at_fn_log_failure 5092$at_traceon; } 5093 5094 set +x 5095 $at_times_p && times >"$at_times_file" 5096) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5097read at_status <"$at_status_file" 5098#AT_STOP_24 5099#AT_START_25 5100at_fn_group_banner 25 'envop.at:43' \ 5101 "clear" " " 5 5102at_xfail=no 5103( 5104 $as_echo "25. $at_setup_line: testing $at_desc ..." 5105 $at_traceon 5106 5107 5108{ set +x 5109$as_echo "$at_srcdir/envop.at:43: envtest -clear" 5110at_fn_check_prepare_trace "envop.at:43" 5111( $at_check_trace; envtest -clear 5112) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5113at_status=$? at_failed=false 5114$at_check_filter 5115at_fn_diff_devnull "$at_stderr" || at_failed=: 5116at_fn_diff_devnull "$at_stdout" || at_failed=: 5117at_fn_check_status 0 $at_status "$at_srcdir/envop.at:43" 5118$at_failed && at_fn_log_failure 5119$at_traceon; } 5120 5121 set +x 5122 $at_times_p && times >"$at_times_file" 5123) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5124read at_status <"$at_status_file" 5125#AT_STOP_25 5126#AT_START_26 5127at_fn_group_banner 26 'envop.at:45' \ 5128 "keep name" " " 5 5129at_xfail=no 5130( 5131 $as_echo "26. $at_setup_line: testing $at_desc ..." 5132 $at_traceon 5133 5134 5135{ set +x 5136$as_echo "$at_srcdir/envop.at:45: envtest -clear -keep HOME USER" 5137at_fn_check_prepare_trace "envop.at:45" 5138( $at_check_trace; envtest -clear -keep HOME USER 5139) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5140at_status=$? at_failed=false 5141$at_check_filter 5142at_fn_diff_devnull "$at_stderr" || at_failed=: 5143echo >>"$at_stdout"; $as_echo "HOME=\"/home/user\" 5144USER=\"user\" 5145" | \ 5146 $at_diff - "$at_stdout" || at_failed=: 5147at_fn_check_status 0 $at_status "$at_srcdir/envop.at:45" 5148$at_failed && at_fn_log_failure 5149$at_traceon; } 5150 5151 set +x 5152 $at_times_p && times >"$at_times_file" 5153) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5154read at_status <"$at_status_file" 5155#AT_STOP_26 5156#AT_START_27 5157at_fn_group_banner 27 'envop.at:50' \ 5158 "keep name=value" " " 5 5159at_xfail=no 5160( 5161 $as_echo "27. $at_setup_line: testing $at_desc ..." 5162 $at_traceon 5163 5164 5165{ set +x 5166$as_echo "$at_srcdir/envop.at:50: envtest -clear -keep USER=user" 5167at_fn_check_prepare_trace "envop.at:50" 5168( $at_check_trace; envtest -clear -keep USER=user 5169) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5170at_status=$? at_failed=false 5171$at_check_filter 5172at_fn_diff_devnull "$at_stderr" || at_failed=: 5173echo >>"$at_stdout"; $as_echo "USER=\"user\" 5174" | \ 5175 $at_diff - "$at_stdout" || at_failed=: 5176at_fn_check_status 0 $at_status "$at_srcdir/envop.at:50" 5177$at_failed && at_fn_log_failure 5178$at_traceon; } 5179 5180 set +x 5181 $at_times_p && times >"$at_times_file" 5182) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5183read at_status <"$at_status_file" 5184#AT_STOP_27 5185#AT_START_28 5186at_fn_group_banner 28 'envop.at:54' \ 5187 "keep name=value (mismatch)" " " 5 5188at_xfail=no 5189( 5190 $as_echo "28. $at_setup_line: testing $at_desc ..." 5191 $at_traceon 5192 5193 5194{ set +x 5195$as_echo "$at_srcdir/envop.at:54: envtest -clear -keep USER=gray" 5196at_fn_check_prepare_trace "envop.at:54" 5197( $at_check_trace; envtest -clear -keep USER=gray 5198) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5199at_status=$? at_failed=false 5200$at_check_filter 5201at_fn_diff_devnull "$at_stderr" || at_failed=: 5202at_fn_diff_devnull "$at_stdout" || at_failed=: 5203at_fn_check_status 0 $at_status "$at_srcdir/envop.at:54" 5204$at_failed && at_fn_log_failure 5205$at_traceon; } 5206 5207 set +x 5208 $at_times_p && times >"$at_times_file" 5209) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5210read at_status <"$at_status_file" 5211#AT_STOP_28 5212#AT_START_29 5213at_fn_group_banner 29 'envop.at:56' \ 5214 "keep wildcard" " " 5 5215at_xfail=no 5216( 5217 $as_echo "29. $at_setup_line: testing $at_desc ..." 5218 $at_traceon 5219 5220 5221{ set +x 5222$as_echo "$at_srcdir/envop.at:56: envtest -clear -keep 'LC_*'" 5223at_fn_check_prepare_trace "envop.at:56" 5224( $at_check_trace; envtest -clear -keep 'LC_*' 5225) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5226at_status=$? at_failed=false 5227$at_check_filter 5228at_fn_diff_devnull "$at_stderr" || at_failed=: 5229echo >>"$at_stdout"; $as_echo "LC_ALL=\"C\" 5230LC_CTYPE=\"C\" 5231LC_MESSAGES=\"C\" 5232LC_NUMERIC=\"C\" 5233" | \ 5234 $at_diff - "$at_stdout" || at_failed=: 5235at_fn_check_status 0 $at_status "$at_srcdir/envop.at:56" 5236$at_failed && at_fn_log_failure 5237$at_traceon; } 5238 5239 set +x 5240 $at_times_p && times >"$at_times_file" 5241) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5242read at_status <"$at_status_file" 5243#AT_STOP_29 5244#AT_START_30 5245at_fn_group_banner 30 'envop.at:63' \ 5246 "keep wildcard (2)" " " 5 5247at_xfail=no 5248( 5249 $as_echo "30. $at_setup_line: testing $at_desc ..." 5250 $at_traceon 5251 5252 5253{ set +x 5254$as_echo "$at_srcdir/envop.at:63: envtest -clear -keep 'LC_*A*'" 5255at_fn_check_prepare_trace "envop.at:63" 5256( $at_check_trace; envtest -clear -keep 'LC_*A*' 5257) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5258at_status=$? at_failed=false 5259$at_check_filter 5260at_fn_diff_devnull "$at_stderr" || at_failed=: 5261echo >>"$at_stdout"; $as_echo "LC_ALL=\"C\" 5262LC_MESSAGES=\"C\" 5263" | \ 5264 $at_diff - "$at_stdout" || at_failed=: 5265at_fn_check_status 0 $at_status "$at_srcdir/envop.at:63" 5266$at_failed && at_fn_log_failure 5267$at_traceon; } 5268 5269 set +x 5270 $at_times_p && times >"$at_times_file" 5271) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5272read at_status <"$at_status_file" 5273#AT_STOP_30 5274#AT_START_31 5275at_fn_group_banner 31 'envop.at:68' \ 5276 "keep wildcard (mismatch)" " " 5 5277at_xfail=no 5278( 5279 $as_echo "31. $at_setup_line: testing $at_desc ..." 5280 $at_traceon 5281 5282 5283{ set +x 5284$as_echo "$at_srcdir/envop.at:68: envtest -clear -keep 'LC_*A*R'" 5285at_fn_check_prepare_trace "envop.at:68" 5286( $at_check_trace; envtest -clear -keep 'LC_*A*R' 5287) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5288at_status=$? at_failed=false 5289$at_check_filter 5290at_fn_diff_devnull "$at_stderr" || at_failed=: 5291at_fn_diff_devnull "$at_stdout" || at_failed=: 5292at_fn_check_status 0 $at_status "$at_srcdir/envop.at:68" 5293$at_failed && at_fn_log_failure 5294$at_traceon; } 5295 5296 set +x 5297 $at_times_p && times >"$at_times_file" 5298) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5299read at_status <"$at_status_file" 5300#AT_STOP_31 5301#AT_START_32 5302at_fn_group_banner 32 'envop.at:70' \ 5303 "set" " " 5 5304at_xfail=no 5305( 5306 $as_echo "32. $at_setup_line: testing $at_desc ..." 5307 $at_traceon 5308 5309 5310{ set +x 5311$as_echo "$at_srcdir/envop.at:70: envtest -set FOO=bar BAR=bar" 5312at_fn_check_prepare_trace "envop.at:70" 5313( $at_check_trace; envtest -set FOO=bar BAR=bar 5314) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5315at_status=$? at_failed=false 5316$at_check_filter 5317at_fn_diff_devnull "$at_stderr" || at_failed=: 5318echo >>"$at_stdout"; $as_echo "BAR=\"bar\" 5319FOO=\"bar\" 5320HOME=\"/home/user\" 5321LC_ALL=\"C\" 5322LC_CTYPE=\"C\" 5323LC_MESSAGES=\"C\" 5324LC_NUMERIC=\"C\" 5325LOGIN=\"user\" 5326PATH=\"/usr/local/bin:/usr/bin:/bin\" 5327PWD=\"/home\" 5328USER=\"user\" 5329" | \ 5330 $at_diff - "$at_stdout" || at_failed=: 5331at_fn_check_status 0 $at_status "$at_srcdir/envop.at:70" 5332$at_failed && at_fn_log_failure 5333$at_traceon; } 5334 5335 set +x 5336 $at_times_p && times >"$at_times_file" 5337) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5338read at_status <"$at_status_file" 5339#AT_STOP_32 5340#AT_START_33 5341at_fn_group_banner 33 'envop.at:84' \ 5342 "set (variable expansion)" " " 5 5343at_xfail=no 5344( 5345 $as_echo "33. $at_setup_line: testing $at_desc ..." 5346 $at_traceon 5347 5348 5349{ set +x 5350$as_echo "$at_srcdir/envop.at:84: envtest -set 'PATH=\${PATH}\${PATH:+:}\$HOME'" 5351at_fn_check_prepare_notrace 'a ${...} parameter expansion' "envop.at:84" 5352( $at_check_trace; envtest -set 'PATH=${PATH}${PATH:+:}$HOME' 5353) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5354at_status=$? at_failed=false 5355$at_check_filter 5356at_fn_diff_devnull "$at_stderr" || at_failed=: 5357echo >>"$at_stdout"; $as_echo "HOME=\"/home/user\" 5358LC_ALL=\"C\" 5359LC_CTYPE=\"C\" 5360LC_MESSAGES=\"C\" 5361LC_NUMERIC=\"C\" 5362LOGIN=\"user\" 5363PATH=\"/usr/local/bin:/usr/bin:/bin:/home/user\" 5364PWD=\"/home\" 5365USER=\"user\" 5366" | \ 5367 $at_diff - "$at_stdout" || at_failed=: 5368at_fn_check_status 0 $at_status "$at_srcdir/envop.at:84" 5369$at_failed && at_fn_log_failure 5370$at_traceon; } 5371 5372 set +x 5373 $at_times_p && times >"$at_times_file" 5374) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5375read at_status <"$at_status_file" 5376#AT_STOP_33 5377#AT_START_34 5378at_fn_group_banner 34 'envop.at:96' \ 5379 "unset name" " " 5 5380at_xfail=no 5381( 5382 $as_echo "34. $at_setup_line: testing $at_desc ..." 5383 $at_traceon 5384 5385 5386{ set +x 5387$as_echo "$at_srcdir/envop.at:96: envtest -unset HOME" 5388at_fn_check_prepare_trace "envop.at:96" 5389( $at_check_trace; envtest -unset HOME 5390) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5391at_status=$? at_failed=false 5392$at_check_filter 5393at_fn_diff_devnull "$at_stderr" || at_failed=: 5394echo >>"$at_stdout"; $as_echo "LC_ALL=\"C\" 5395LC_CTYPE=\"C\" 5396LC_MESSAGES=\"C\" 5397LC_NUMERIC=\"C\" 5398LOGIN=\"user\" 5399PATH=\"/usr/local/bin:/usr/bin:/bin\" 5400PWD=\"/home\" 5401USER=\"user\" 5402" | \ 5403 $at_diff - "$at_stdout" || at_failed=: 5404at_fn_check_status 0 $at_status "$at_srcdir/envop.at:96" 5405$at_failed && at_fn_log_failure 5406$at_traceon; } 5407 5408 set +x 5409 $at_times_p && times >"$at_times_file" 5410) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5411read at_status <"$at_status_file" 5412#AT_STOP_34 5413#AT_START_35 5414at_fn_group_banner 35 'envop.at:107' \ 5415 "unset wildcard" " " 5 5416at_xfail=no 5417( 5418 $as_echo "35. $at_setup_line: testing $at_desc ..." 5419 $at_traceon 5420 5421 5422{ set +x 5423$as_echo "$at_srcdir/envop.at:107: envtest -unset 'LC_*'" 5424at_fn_check_prepare_trace "envop.at:107" 5425( $at_check_trace; envtest -unset 'LC_*' 5426) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5427at_status=$? at_failed=false 5428$at_check_filter 5429at_fn_diff_devnull "$at_stderr" || at_failed=: 5430echo >>"$at_stdout"; $as_echo "HOME=\"/home/user\" 5431LOGIN=\"user\" 5432PATH=\"/usr/local/bin:/usr/bin:/bin\" 5433PWD=\"/home\" 5434USER=\"user\" 5435" | \ 5436 $at_diff - "$at_stdout" || at_failed=: 5437at_fn_check_status 0 $at_status "$at_srcdir/envop.at:107" 5438$at_failed && at_fn_log_failure 5439$at_traceon; } 5440 5441 set +x 5442 $at_times_p && times >"$at_times_file" 5443) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5444read at_status <"$at_status_file" 5445#AT_STOP_35 5446#AT_START_36 5447at_fn_group_banner 36 'envop.at:115' \ 5448 "unset with value" " " 5 5449at_xfail=no 5450( 5451 $as_echo "36. $at_setup_line: testing $at_desc ..." 5452 $at_traceon 5453 5454 5455{ set +x 5456$as_echo "$at_srcdir/envop.at:115: envtest -unset 'LOGIN=user'" 5457at_fn_check_prepare_trace "envop.at:115" 5458( $at_check_trace; envtest -unset 'LOGIN=user' 5459) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5460at_status=$? at_failed=false 5461$at_check_filter 5462at_fn_diff_devnull "$at_stderr" || at_failed=: 5463echo >>"$at_stdout"; $as_echo "HOME=\"/home/user\" 5464LC_ALL=\"C\" 5465LC_CTYPE=\"C\" 5466LC_MESSAGES=\"C\" 5467LC_NUMERIC=\"C\" 5468PATH=\"/usr/local/bin:/usr/bin:/bin\" 5469PWD=\"/home\" 5470USER=\"user\" 5471" | \ 5472 $at_diff - "$at_stdout" || at_failed=: 5473at_fn_check_status 0 $at_status "$at_srcdir/envop.at:115" 5474$at_failed && at_fn_log_failure 5475$at_traceon; } 5476 5477 set +x 5478 $at_times_p && times >"$at_times_file" 5479) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5480read at_status <"$at_status_file" 5481#AT_STOP_36 5482#AT_START_37 5483at_fn_group_banner 37 'envop.at:126' \ 5484 "unset with value (mismatch)" " " 5 5485at_xfail=no 5486( 5487 $as_echo "37. $at_setup_line: testing $at_desc ..." 5488 $at_traceon 5489 5490 5491{ set +x 5492$as_echo "$at_srcdir/envop.at:126: envtest -unset 'LOGIN=another'" 5493at_fn_check_prepare_trace "envop.at:126" 5494( $at_check_trace; envtest -unset 'LOGIN=another' 5495) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5496at_status=$? at_failed=false 5497$at_check_filter 5498at_fn_diff_devnull "$at_stderr" || at_failed=: 5499echo >>"$at_stdout"; $as_echo "HOME=\"/home/user\" 5500LC_ALL=\"C\" 5501LC_CTYPE=\"C\" 5502LC_MESSAGES=\"C\" 5503LC_NUMERIC=\"C\" 5504LOGIN=\"user\" 5505PATH=\"/usr/local/bin:/usr/bin:/bin\" 5506PWD=\"/home\" 5507USER=\"user\" 5508" | \ 5509 $at_diff - "$at_stdout" || at_failed=: 5510at_fn_check_status 0 $at_status "$at_srcdir/envop.at:126" 5511$at_failed && at_fn_log_failure 5512$at_traceon; } 5513 5514 set +x 5515 $at_times_p && times >"$at_times_file" 5516) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5517read at_status <"$at_status_file" 5518#AT_STOP_37 5519#AT_START_38 5520at_fn_group_banner 38 'env.at:54' \ 5521 "clear" " " 6 5522at_xfail=no 5523 test -f $XFAILFILE && at_xfail=yes 5524( 5525 $as_echo "38. $at_setup_line: testing $at_desc ..." 5526 $at_traceon 5527 5528 5529{ set +x 5530$as_echo "$at_srcdir/env.at:54: 5531 5532 5533PIES_PIDFILE=\"\$PWD/pies.pid\" 5534PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 5535export PIES_PIDFILE PIES_CTLSOCK 5536cat > control.conf <<_EOT 5537pidfile \"\$PIES_PIDFILE\"; 5538control { 5539 socket \"\$PIES_CTLSOCK\"; 5540} 5541_EOT 5542 5543cat > envtest.conf <<_EOT 5544component envtest { 5545 env { 5546 clear; 5547 } 5548 command \"\$abs_builddir/envtest -clone\"; 5549 chdir \$PWD; 5550 stdout file \"\$PWD/log\"; 5551 return-code 0 { 5552 action disable; 5553 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 5554 } 5555} 5556_EOT 5557 5558to 5 \\ 5559 envtest -exec \\ 5560 \$abs_top_builddir/src/pies --foreground --stderr \\ 5561 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 5562cat log 5563" 5564at_fn_check_prepare_notrace 'an embedded newline' "env.at:54" 5565( $at_check_trace; 5566 5567 5568PIES_PIDFILE="$PWD/pies.pid" 5569PIES_CTLSOCK="unix://$PWD/pies.ctl"; 5570export PIES_PIDFILE PIES_CTLSOCK 5571cat > control.conf <<_EOT 5572pidfile "$PIES_PIDFILE"; 5573control { 5574 socket "$PIES_CTLSOCK"; 5575} 5576_EOT 5577 5578cat > envtest.conf <<_EOT 5579component envtest { 5580 env { 5581 clear; 5582 } 5583 command "$abs_builddir/envtest -clone"; 5584 chdir $PWD; 5585 stdout file "$PWD/log"; 5586 return-code 0 { 5587 action disable; 5588 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 5589 } 5590} 5591_EOT 5592 5593to 5 \ 5594 envtest -exec \ 5595 $abs_top_builddir/src/pies --foreground --stderr \ 5596 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 5597cat log 5598 5599) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5600at_status=$? at_failed=false 5601$at_check_filter 5602at_fn_diff_devnull "$at_stderr" || at_failed=: 5603at_fn_diff_devnull "$at_stdout" || at_failed=: 5604at_fn_check_status 0 $at_status "$at_srcdir/env.at:54" 5605$at_failed && at_fn_log_failure 5606$at_traceon; } 5607 5608 set +x 5609 $at_times_p && times >"$at_times_file" 5610) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5611read at_status <"$at_status_file" 5612#AT_STOP_38 5613#AT_START_39 5614at_fn_group_banner 39 'env.at:56' \ 5615 "keep" " " 6 5616at_xfail=no 5617 test -f $XFAILFILE && at_xfail=yes 5618( 5619 $as_echo "39. $at_setup_line: testing $at_desc ..." 5620 $at_traceon 5621 5622 5623{ set +x 5624$as_echo "$at_srcdir/env.at:56: 5625 5626 5627PIES_PIDFILE=\"\$PWD/pies.pid\" 5628PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 5629export PIES_PIDFILE PIES_CTLSOCK 5630cat > control.conf <<_EOT 5631pidfile \"\$PIES_PIDFILE\"; 5632control { 5633 socket \"\$PIES_CTLSOCK\"; 5634} 5635_EOT 5636 5637cat > envtest.conf <<_EOT 5638component envtest { 5639 env { 5640 keep \"LC_*\"; 5641 } 5642 command \"\$abs_builddir/envtest -clone\"; 5643 chdir \$PWD; 5644 stdout file \"\$PWD/log\"; 5645 return-code 0 { 5646 action disable; 5647 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 5648 } 5649} 5650_EOT 5651 5652to 5 \\ 5653 envtest -exec \\ 5654 \$abs_top_builddir/src/pies --foreground --stderr \\ 5655 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 5656cat log 5657" 5658at_fn_check_prepare_notrace 'an embedded newline' "env.at:56" 5659( $at_check_trace; 5660 5661 5662PIES_PIDFILE="$PWD/pies.pid" 5663PIES_CTLSOCK="unix://$PWD/pies.ctl"; 5664export PIES_PIDFILE PIES_CTLSOCK 5665cat > control.conf <<_EOT 5666pidfile "$PIES_PIDFILE"; 5667control { 5668 socket "$PIES_CTLSOCK"; 5669} 5670_EOT 5671 5672cat > envtest.conf <<_EOT 5673component envtest { 5674 env { 5675 keep "LC_*"; 5676 } 5677 command "$abs_builddir/envtest -clone"; 5678 chdir $PWD; 5679 stdout file "$PWD/log"; 5680 return-code 0 { 5681 action disable; 5682 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 5683 } 5684} 5685_EOT 5686 5687to 5 \ 5688 envtest -exec \ 5689 $abs_top_builddir/src/pies --foreground --stderr \ 5690 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 5691cat log 5692 5693) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5694at_status=$? at_failed=false 5695$at_check_filter 5696at_fn_diff_devnull "$at_stderr" || at_failed=: 5697echo >>"$at_stdout"; $as_echo "LC_ALL=\"C\" 5698LC_CTYPE=\"C\" 5699LC_MESSAGES=\"C\" 5700LC_NUMERIC=\"C\" 5701" | \ 5702 $at_diff - "$at_stdout" || at_failed=: 5703at_fn_check_status 0 $at_status "$at_srcdir/env.at:56" 5704$at_failed && at_fn_log_failure 5705$at_traceon; } 5706 5707 set +x 5708 $at_times_p && times >"$at_times_file" 5709) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5710read at_status <"$at_status_file" 5711#AT_STOP_39 5712#AT_START_40 5713at_fn_group_banner 40 'env.at:63' \ 5714 "set" " " 6 5715at_xfail=no 5716 test -f $XFAILFILE && at_xfail=yes 5717( 5718 $as_echo "40. $at_setup_line: testing $at_desc ..." 5719 $at_traceon 5720 5721 5722{ set +x 5723$as_echo "$at_srcdir/env.at:63: 5724 5725 5726PIES_PIDFILE=\"\$PWD/pies.pid\" 5727PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 5728export PIES_PIDFILE PIES_CTLSOCK 5729cat > control.conf <<_EOT 5730pidfile \"\$PIES_PIDFILE\"; 5731control { 5732 socket \"\$PIES_CTLSOCK\"; 5733} 5734_EOT 5735 5736cat > envtest.conf <<_EOT 5737component envtest { 5738 env { 5739 set \"FOO=bar\"; 5740 } 5741 command \"\$abs_builddir/envtest -clone\"; 5742 chdir \$PWD; 5743 stdout file \"\$PWD/log\"; 5744 return-code 0 { 5745 action disable; 5746 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 5747 } 5748} 5749_EOT 5750 5751to 5 \\ 5752 envtest -exec \\ 5753 \$abs_top_builddir/src/pies --foreground --stderr \\ 5754 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 5755cat log 5756" 5757at_fn_check_prepare_notrace 'an embedded newline' "env.at:63" 5758( $at_check_trace; 5759 5760 5761PIES_PIDFILE="$PWD/pies.pid" 5762PIES_CTLSOCK="unix://$PWD/pies.ctl"; 5763export PIES_PIDFILE PIES_CTLSOCK 5764cat > control.conf <<_EOT 5765pidfile "$PIES_PIDFILE"; 5766control { 5767 socket "$PIES_CTLSOCK"; 5768} 5769_EOT 5770 5771cat > envtest.conf <<_EOT 5772component envtest { 5773 env { 5774 set "FOO=bar"; 5775 } 5776 command "$abs_builddir/envtest -clone"; 5777 chdir $PWD; 5778 stdout file "$PWD/log"; 5779 return-code 0 { 5780 action disable; 5781 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 5782 } 5783} 5784_EOT 5785 5786to 5 \ 5787 envtest -exec \ 5788 $abs_top_builddir/src/pies --foreground --stderr \ 5789 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 5790cat log 5791 5792) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5793at_status=$? at_failed=false 5794$at_check_filter 5795at_fn_diff_devnull "$at_stderr" || at_failed=: 5796echo >>"$at_stdout"; $as_echo "FOO=\"bar\" 5797HOME=\"/home/user\" 5798LC_ALL=\"C\" 5799LC_CTYPE=\"C\" 5800LC_MESSAGES=\"C\" 5801LC_NUMERIC=\"C\" 5802LOGIN=\"user\" 5803PATH=\"/usr/local/bin:/usr/bin:/bin\" 5804PIES_INSTANCE=\"pies\" 5805PWD=\"/home\" 5806USER=\"user\" 5807" | \ 5808 $at_diff - "$at_stdout" || at_failed=: 5809at_fn_check_status 0 $at_status "$at_srcdir/env.at:63" 5810$at_failed && at_fn_log_failure 5811$at_traceon; } 5812 5813 set +x 5814 $at_times_p && times >"$at_times_file" 5815) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5816read at_status <"$at_status_file" 5817#AT_STOP_40 5818#AT_START_41 5819at_fn_group_banner 41 'env.at:77' \ 5820 "unset" " " 6 5821at_xfail=no 5822 test -f $XFAILFILE && at_xfail=yes 5823( 5824 $as_echo "41. $at_setup_line: testing $at_desc ..." 5825 $at_traceon 5826 5827 5828{ set +x 5829$as_echo "$at_srcdir/env.at:77: 5830 5831 5832PIES_PIDFILE=\"\$PWD/pies.pid\" 5833PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 5834export PIES_PIDFILE PIES_CTLSOCK 5835cat > control.conf <<_EOT 5836pidfile \"\$PIES_PIDFILE\"; 5837control { 5838 socket \"\$PIES_CTLSOCK\"; 5839} 5840_EOT 5841 5842cat > envtest.conf <<_EOT 5843component envtest { 5844 env { 5845 unset \"LC_*\"; unset PWD; 5846 } 5847 command \"\$abs_builddir/envtest -clone\"; 5848 chdir \$PWD; 5849 stdout file \"\$PWD/log\"; 5850 return-code 0 { 5851 action disable; 5852 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 5853 } 5854} 5855_EOT 5856 5857to 5 \\ 5858 envtest -exec \\ 5859 \$abs_top_builddir/src/pies --foreground --stderr \\ 5860 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 5861cat log 5862" 5863at_fn_check_prepare_notrace 'an embedded newline' "env.at:77" 5864( $at_check_trace; 5865 5866 5867PIES_PIDFILE="$PWD/pies.pid" 5868PIES_CTLSOCK="unix://$PWD/pies.ctl"; 5869export PIES_PIDFILE PIES_CTLSOCK 5870cat > control.conf <<_EOT 5871pidfile "$PIES_PIDFILE"; 5872control { 5873 socket "$PIES_CTLSOCK"; 5874} 5875_EOT 5876 5877cat > envtest.conf <<_EOT 5878component envtest { 5879 env { 5880 unset "LC_*"; unset PWD; 5881 } 5882 command "$abs_builddir/envtest -clone"; 5883 chdir $PWD; 5884 stdout file "$PWD/log"; 5885 return-code 0 { 5886 action disable; 5887 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 5888 } 5889} 5890_EOT 5891 5892to 5 \ 5893 envtest -exec \ 5894 $abs_top_builddir/src/pies --foreground --stderr \ 5895 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 5896cat log 5897 5898) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5899at_status=$? at_failed=false 5900$at_check_filter 5901at_fn_diff_devnull "$at_stderr" || at_failed=: 5902echo >>"$at_stdout"; $as_echo "HOME=\"/home/user\" 5903LOGIN=\"user\" 5904PATH=\"/usr/local/bin:/usr/bin:/bin\" 5905PIES_INSTANCE=\"pies\" 5906USER=\"user\" 5907" | \ 5908 $at_diff - "$at_stdout" || at_failed=: 5909at_fn_check_status 0 $at_status "$at_srcdir/env.at:77" 5910$at_failed && at_fn_log_failure 5911$at_traceon; } 5912 5913 set +x 5914 $at_times_p && times >"$at_times_file" 5915) 5>&1 2>&1 7>&- | eval $at_tee_pipe 5916read at_status <"$at_status_file" 5917#AT_STOP_41 5918#AT_START_42 5919at_fn_group_banner 42 'env.at:122' \ 5920 "clear" " " 7 5921at_xfail=no 5922 test -f $XFAILFILE && at_xfail=yes 5923( 5924 $as_echo "42. $at_setup_line: testing $at_desc ..." 5925 $at_traceon 5926 5927 5928{ set +x 5929$as_echo "$at_srcdir/env.at:122: 5930 5931 5932PIES_PIDFILE=\"\$PWD/pies.pid\" 5933PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 5934export PIES_PIDFILE PIES_CTLSOCK 5935cat > control.conf <<_EOT 5936pidfile \"\$PIES_PIDFILE\"; 5937control { 5938 socket \"\$PIES_CTLSOCK\"; 5939} 5940_EOT 5941 5942cat > envtest.conf <<_EOT 5943component envtest { 5944 env -; 5945 command \"\$abs_builddir/envtest -clone\"; 5946 chdir \$PWD; 5947 stdout file \"\$PWD/log\"; 5948 return-code 0 { 5949 action disable; 5950 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 5951 } 5952} 5953_EOT 5954 5955to 5 \\ 5956 envtest -exec \\ 5957 \$abs_top_builddir/src/pies --foreground --stderr \\ 5958 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 5959cat log 5960" 5961at_fn_check_prepare_notrace 'an embedded newline' "env.at:122" 5962( $at_check_trace; 5963 5964 5965PIES_PIDFILE="$PWD/pies.pid" 5966PIES_CTLSOCK="unix://$PWD/pies.ctl"; 5967export PIES_PIDFILE PIES_CTLSOCK 5968cat > control.conf <<_EOT 5969pidfile "$PIES_PIDFILE"; 5970control { 5971 socket "$PIES_CTLSOCK"; 5972} 5973_EOT 5974 5975cat > envtest.conf <<_EOT 5976component envtest { 5977 env -; 5978 command "$abs_builddir/envtest -clone"; 5979 chdir $PWD; 5980 stdout file "$PWD/log"; 5981 return-code 0 { 5982 action disable; 5983 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 5984 } 5985} 5986_EOT 5987 5988to 5 \ 5989 envtest -exec \ 5990 $abs_top_builddir/src/pies --foreground --stderr \ 5991 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 5992cat log 5993 5994) >>"$at_stdout" 2>>"$at_stderr" 5>&- 5995at_status=$? at_failed=false 5996$at_check_filter 5997at_fn_diff_devnull "$at_stderr" || at_failed=: 5998at_fn_diff_devnull "$at_stdout" || at_failed=: 5999at_fn_check_status 0 $at_status "$at_srcdir/env.at:122" 6000$at_failed && at_fn_log_failure 6001$at_traceon; } 6002 6003 set +x 6004 $at_times_p && times >"$at_times_file" 6005) 5>&1 2>&1 7>&- | eval $at_tee_pipe 6006read at_status <"$at_status_file" 6007#AT_STOP_42 6008#AT_START_43 6009at_fn_group_banner 43 'env.at:123' \ 6010 "keep" " " 7 6011at_xfail=no 6012 test -f $XFAILFILE && at_xfail=yes 6013( 6014 $as_echo "43. $at_setup_line: testing $at_desc ..." 6015 $at_traceon 6016 6017 6018{ set +x 6019$as_echo "$at_srcdir/env.at:123: 6020 6021 6022PIES_PIDFILE=\"\$PWD/pies.pid\" 6023PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 6024export PIES_PIDFILE PIES_CTLSOCK 6025cat > control.conf <<_EOT 6026pidfile \"\$PIES_PIDFILE\"; 6027control { 6028 socket \"\$PIES_CTLSOCK\"; 6029} 6030_EOT 6031 6032cat > envtest.conf <<_EOT 6033component envtest { 6034 env - USER LOGIN; 6035 command \"\$abs_builddir/envtest -clone\"; 6036 chdir \$PWD; 6037 stdout file \"\$PWD/log\"; 6038 return-code 0 { 6039 action disable; 6040 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 6041 } 6042} 6043_EOT 6044 6045to 5 \\ 6046 envtest -exec \\ 6047 \$abs_top_builddir/src/pies --foreground --stderr \\ 6048 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6049cat log 6050" 6051at_fn_check_prepare_notrace 'an embedded newline' "env.at:123" 6052( $at_check_trace; 6053 6054 6055PIES_PIDFILE="$PWD/pies.pid" 6056PIES_CTLSOCK="unix://$PWD/pies.ctl"; 6057export PIES_PIDFILE PIES_CTLSOCK 6058cat > control.conf <<_EOT 6059pidfile "$PIES_PIDFILE"; 6060control { 6061 socket "$PIES_CTLSOCK"; 6062} 6063_EOT 6064 6065cat > envtest.conf <<_EOT 6066component envtest { 6067 env - USER LOGIN; 6068 command "$abs_builddir/envtest -clone"; 6069 chdir $PWD; 6070 stdout file "$PWD/log"; 6071 return-code 0 { 6072 action disable; 6073 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 6074 } 6075} 6076_EOT 6077 6078to 5 \ 6079 envtest -exec \ 6080 $abs_top_builddir/src/pies --foreground --stderr \ 6081 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6082cat log 6083 6084) >>"$at_stdout" 2>>"$at_stderr" 5>&- 6085at_status=$? at_failed=false 6086$at_check_filter 6087at_fn_diff_devnull "$at_stderr" || at_failed=: 6088echo >>"$at_stdout"; $as_echo "LOGIN=\"user\" 6089USER=\"user\" 6090" | \ 6091 $at_diff - "$at_stdout" || at_failed=: 6092at_fn_check_status 0 $at_status "$at_srcdir/env.at:123" 6093$at_failed && at_fn_log_failure 6094$at_traceon; } 6095 6096 set +x 6097 $at_times_p && times >"$at_times_file" 6098) 5>&1 2>&1 7>&- | eval $at_tee_pipe 6099read at_status <"$at_status_file" 6100#AT_STOP_43 6101#AT_START_44 6102at_fn_group_banner 44 'env.at:128' \ 6103 "set" " " 7 6104at_xfail=no 6105 test -f $XFAILFILE && at_xfail=yes 6106( 6107 $as_echo "44. $at_setup_line: testing $at_desc ..." 6108 $at_traceon 6109 6110 6111{ set +x 6112$as_echo "$at_srcdir/env.at:128: 6113 6114 6115PIES_PIDFILE=\"\$PWD/pies.pid\" 6116PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 6117export PIES_PIDFILE PIES_CTLSOCK 6118cat > control.conf <<_EOT 6119pidfile \"\$PIES_PIDFILE\"; 6120control { 6121 socket \"\$PIES_CTLSOCK\"; 6122} 6123_EOT 6124 6125cat > envtest.conf <<_EOT 6126component envtest { 6127 env \"FOO=bar\" \"BAR=bar\"; 6128 command \"\$abs_builddir/envtest -clone\"; 6129 chdir \$PWD; 6130 stdout file \"\$PWD/log\"; 6131 return-code 0 { 6132 action disable; 6133 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 6134 } 6135} 6136_EOT 6137 6138to 5 \\ 6139 envtest -exec \\ 6140 \$abs_top_builddir/src/pies --foreground --stderr \\ 6141 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6142cat log 6143" 6144at_fn_check_prepare_notrace 'an embedded newline' "env.at:128" 6145( $at_check_trace; 6146 6147 6148PIES_PIDFILE="$PWD/pies.pid" 6149PIES_CTLSOCK="unix://$PWD/pies.ctl"; 6150export PIES_PIDFILE PIES_CTLSOCK 6151cat > control.conf <<_EOT 6152pidfile "$PIES_PIDFILE"; 6153control { 6154 socket "$PIES_CTLSOCK"; 6155} 6156_EOT 6157 6158cat > envtest.conf <<_EOT 6159component envtest { 6160 env "FOO=bar" "BAR=bar"; 6161 command "$abs_builddir/envtest -clone"; 6162 chdir $PWD; 6163 stdout file "$PWD/log"; 6164 return-code 0 { 6165 action disable; 6166 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 6167 } 6168} 6169_EOT 6170 6171to 5 \ 6172 envtest -exec \ 6173 $abs_top_builddir/src/pies --foreground --stderr \ 6174 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6175cat log 6176 6177) >>"$at_stdout" 2>>"$at_stderr" 5>&- 6178at_status=$? at_failed=false 6179$at_check_filter 6180at_fn_diff_devnull "$at_stderr" || at_failed=: 6181echo >>"$at_stdout"; $as_echo "BAR=\"bar\" 6182FOO=\"bar\" 6183HOME=\"/home/user\" 6184LC_ALL=\"C\" 6185LC_CTYPE=\"C\" 6186LC_MESSAGES=\"C\" 6187LC_NUMERIC=\"C\" 6188LOGIN=\"user\" 6189PATH=\"/usr/local/bin:/usr/bin:/bin\" 6190PIES_INSTANCE=\"pies\" 6191PWD=\"/home\" 6192USER=\"user\" 6193" | \ 6194 $at_diff - "$at_stdout" || at_failed=: 6195at_fn_check_status 0 $at_status "$at_srcdir/env.at:128" 6196$at_failed && at_fn_log_failure 6197$at_traceon; } 6198 6199 set +x 6200 $at_times_p && times >"$at_times_file" 6201) 5>&1 2>&1 7>&- | eval $at_tee_pipe 6202read at_status <"$at_status_file" 6203#AT_STOP_44 6204#AT_START_45 6205at_fn_group_banner 45 'env.at:143' \ 6206 "unset" " " 7 6207at_xfail=no 6208 test -f $XFAILFILE && at_xfail=yes 6209( 6210 $as_echo "45. $at_setup_line: testing $at_desc ..." 6211 $at_traceon 6212 6213 6214{ set +x 6215$as_echo "$at_srcdir/env.at:143: 6216 6217 6218PIES_PIDFILE=\"\$PWD/pies.pid\" 6219PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 6220export PIES_PIDFILE PIES_CTLSOCK 6221cat > control.conf <<_EOT 6222pidfile \"\$PIES_PIDFILE\"; 6223control { 6224 socket \"\$PIES_CTLSOCK\"; 6225} 6226_EOT 6227 6228cat > envtest.conf <<_EOT 6229component envtest { 6230 env \"-LC_NUMERIC\" \"-LC_CTYPE\" \"-LC_MESSAGES\"; 6231 command \"\$abs_builddir/envtest -clone\"; 6232 chdir \$PWD; 6233 stdout file \"\$PWD/log\"; 6234 return-code 0 { 6235 action disable; 6236 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 6237 } 6238} 6239_EOT 6240 6241to 5 \\ 6242 envtest -exec \\ 6243 \$abs_top_builddir/src/pies --foreground --stderr \\ 6244 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6245cat log 6246" 6247at_fn_check_prepare_notrace 'an embedded newline' "env.at:143" 6248( $at_check_trace; 6249 6250 6251PIES_PIDFILE="$PWD/pies.pid" 6252PIES_CTLSOCK="unix://$PWD/pies.ctl"; 6253export PIES_PIDFILE PIES_CTLSOCK 6254cat > control.conf <<_EOT 6255pidfile "$PIES_PIDFILE"; 6256control { 6257 socket "$PIES_CTLSOCK"; 6258} 6259_EOT 6260 6261cat > envtest.conf <<_EOT 6262component envtest { 6263 env "-LC_NUMERIC" "-LC_CTYPE" "-LC_MESSAGES"; 6264 command "$abs_builddir/envtest -clone"; 6265 chdir $PWD; 6266 stdout file "$PWD/log"; 6267 return-code 0 { 6268 action disable; 6269 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 6270 } 6271} 6272_EOT 6273 6274to 5 \ 6275 envtest -exec \ 6276 $abs_top_builddir/src/pies --foreground --stderr \ 6277 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6278cat log 6279 6280) >>"$at_stdout" 2>>"$at_stderr" 5>&- 6281at_status=$? at_failed=false 6282$at_check_filter 6283at_fn_diff_devnull "$at_stderr" || at_failed=: 6284echo >>"$at_stdout"; $as_echo "HOME=\"/home/user\" 6285LC_ALL=\"C\" 6286LOGIN=\"user\" 6287PATH=\"/usr/local/bin:/usr/bin:/bin\" 6288PIES_INSTANCE=\"pies\" 6289PWD=\"/home\" 6290USER=\"user\" 6291" | \ 6292 $at_diff - "$at_stdout" || at_failed=: 6293at_fn_check_status 0 $at_status "$at_srcdir/env.at:143" 6294$at_failed && at_fn_log_failure 6295$at_traceon; } 6296 6297 set +x 6298 $at_times_p && times >"$at_times_file" 6299) 5>&1 2>&1 7>&- | eval $at_tee_pipe 6300read at_status <"$at_status_file" 6301#AT_STOP_45 6302#AT_START_46 6303at_fn_group_banner 46 'envglobal.at:54' \ 6304 "clear" " " 8 6305at_xfail=no 6306 test -f $XFAILFILE && at_xfail=yes 6307( 6308 $as_echo "46. $at_setup_line: testing $at_desc ..." 6309 $at_traceon 6310 6311 6312{ set +x 6313$as_echo "$at_srcdir/envglobal.at:54: 6314 6315 6316PIES_PIDFILE=\"\$PWD/pies.pid\" 6317PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 6318export PIES_PIDFILE PIES_CTLSOCK 6319cat > control.conf <<_EOT 6320pidfile \"\$PIES_PIDFILE\"; 6321control { 6322 socket \"\$PIES_CTLSOCK\"; 6323} 6324_EOT 6325 6326cat > envtest.conf <<_EOT 6327env { 6328 clear; 6329} 6330component envtest { 6331 command \"\$abs_builddir/envtest -clone\"; 6332 chdir \$PWD; 6333 stdout file \"\$PWD/log\"; 6334 return-code 0 { 6335 action disable; 6336 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 6337 } 6338} 6339_EOT 6340 6341to 5 \\ 6342 envtest -exec \\ 6343 \$abs_top_builddir/src/pies --foreground --stderr \\ 6344 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6345cat log 6346" 6347at_fn_check_prepare_notrace 'an embedded newline' "envglobal.at:54" 6348( $at_check_trace; 6349 6350 6351PIES_PIDFILE="$PWD/pies.pid" 6352PIES_CTLSOCK="unix://$PWD/pies.ctl"; 6353export PIES_PIDFILE PIES_CTLSOCK 6354cat > control.conf <<_EOT 6355pidfile "$PIES_PIDFILE"; 6356control { 6357 socket "$PIES_CTLSOCK"; 6358} 6359_EOT 6360 6361cat > envtest.conf <<_EOT 6362env { 6363 clear; 6364} 6365component envtest { 6366 command "$abs_builddir/envtest -clone"; 6367 chdir $PWD; 6368 stdout file "$PWD/log"; 6369 return-code 0 { 6370 action disable; 6371 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 6372 } 6373} 6374_EOT 6375 6376to 5 \ 6377 envtest -exec \ 6378 $abs_top_builddir/src/pies --foreground --stderr \ 6379 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6380cat log 6381 6382) >>"$at_stdout" 2>>"$at_stderr" 5>&- 6383at_status=$? at_failed=false 6384$at_check_filter 6385at_fn_diff_devnull "$at_stderr" || at_failed=: 6386at_fn_diff_devnull "$at_stdout" || at_failed=: 6387at_fn_check_status 0 $at_status "$at_srcdir/envglobal.at:54" 6388$at_failed && at_fn_log_failure 6389$at_traceon; } 6390 6391 set +x 6392 $at_times_p && times >"$at_times_file" 6393) 5>&1 2>&1 7>&- | eval $at_tee_pipe 6394read at_status <"$at_status_file" 6395#AT_STOP_46 6396#AT_START_47 6397at_fn_group_banner 47 'envglobal.at:56' \ 6398 "keep" " " 8 6399at_xfail=no 6400 test -f $XFAILFILE && at_xfail=yes 6401( 6402 $as_echo "47. $at_setup_line: testing $at_desc ..." 6403 $at_traceon 6404 6405 6406{ set +x 6407$as_echo "$at_srcdir/envglobal.at:56: 6408 6409 6410PIES_PIDFILE=\"\$PWD/pies.pid\" 6411PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 6412export PIES_PIDFILE PIES_CTLSOCK 6413cat > control.conf <<_EOT 6414pidfile \"\$PIES_PIDFILE\"; 6415control { 6416 socket \"\$PIES_CTLSOCK\"; 6417} 6418_EOT 6419 6420cat > envtest.conf <<_EOT 6421env { 6422 keep \"LC_*\"; 6423} 6424component envtest { 6425 command \"\$abs_builddir/envtest -clone\"; 6426 chdir \$PWD; 6427 stdout file \"\$PWD/log\"; 6428 return-code 0 { 6429 action disable; 6430 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 6431 } 6432} 6433_EOT 6434 6435to 5 \\ 6436 envtest -exec \\ 6437 \$abs_top_builddir/src/pies --foreground --stderr \\ 6438 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6439cat log 6440" 6441at_fn_check_prepare_notrace 'an embedded newline' "envglobal.at:56" 6442( $at_check_trace; 6443 6444 6445PIES_PIDFILE="$PWD/pies.pid" 6446PIES_CTLSOCK="unix://$PWD/pies.ctl"; 6447export PIES_PIDFILE PIES_CTLSOCK 6448cat > control.conf <<_EOT 6449pidfile "$PIES_PIDFILE"; 6450control { 6451 socket "$PIES_CTLSOCK"; 6452} 6453_EOT 6454 6455cat > envtest.conf <<_EOT 6456env { 6457 keep "LC_*"; 6458} 6459component envtest { 6460 command "$abs_builddir/envtest -clone"; 6461 chdir $PWD; 6462 stdout file "$PWD/log"; 6463 return-code 0 { 6464 action disable; 6465 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 6466 } 6467} 6468_EOT 6469 6470to 5 \ 6471 envtest -exec \ 6472 $abs_top_builddir/src/pies --foreground --stderr \ 6473 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6474cat log 6475 6476) >>"$at_stdout" 2>>"$at_stderr" 5>&- 6477at_status=$? at_failed=false 6478$at_check_filter 6479at_fn_diff_devnull "$at_stderr" || at_failed=: 6480echo >>"$at_stdout"; $as_echo "LC_ALL=\"C\" 6481LC_CTYPE=\"C\" 6482LC_MESSAGES=\"C\" 6483LC_NUMERIC=\"C\" 6484" | \ 6485 $at_diff - "$at_stdout" || at_failed=: 6486at_fn_check_status 0 $at_status "$at_srcdir/envglobal.at:56" 6487$at_failed && at_fn_log_failure 6488$at_traceon; } 6489 6490 set +x 6491 $at_times_p && times >"$at_times_file" 6492) 5>&1 2>&1 7>&- | eval $at_tee_pipe 6493read at_status <"$at_status_file" 6494#AT_STOP_47 6495#AT_START_48 6496at_fn_group_banner 48 'envglobal.at:63' \ 6497 "set" " " 8 6498at_xfail=no 6499 test -f $XFAILFILE && at_xfail=yes 6500( 6501 $as_echo "48. $at_setup_line: testing $at_desc ..." 6502 $at_traceon 6503 6504 6505{ set +x 6506$as_echo "$at_srcdir/envglobal.at:63: 6507 6508 6509PIES_PIDFILE=\"\$PWD/pies.pid\" 6510PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 6511export PIES_PIDFILE PIES_CTLSOCK 6512cat > control.conf <<_EOT 6513pidfile \"\$PIES_PIDFILE\"; 6514control { 6515 socket \"\$PIES_CTLSOCK\"; 6516} 6517_EOT 6518 6519cat > envtest.conf <<_EOT 6520env { 6521 set \"FOO=bar\"; 6522} 6523component envtest { 6524 command \"\$abs_builddir/envtest -clone\"; 6525 chdir \$PWD; 6526 stdout file \"\$PWD/log\"; 6527 return-code 0 { 6528 action disable; 6529 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 6530 } 6531} 6532_EOT 6533 6534to 5 \\ 6535 envtest -exec \\ 6536 \$abs_top_builddir/src/pies --foreground --stderr \\ 6537 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6538cat log 6539" 6540at_fn_check_prepare_notrace 'an embedded newline' "envglobal.at:63" 6541( $at_check_trace; 6542 6543 6544PIES_PIDFILE="$PWD/pies.pid" 6545PIES_CTLSOCK="unix://$PWD/pies.ctl"; 6546export PIES_PIDFILE PIES_CTLSOCK 6547cat > control.conf <<_EOT 6548pidfile "$PIES_PIDFILE"; 6549control { 6550 socket "$PIES_CTLSOCK"; 6551} 6552_EOT 6553 6554cat > envtest.conf <<_EOT 6555env { 6556 set "FOO=bar"; 6557} 6558component envtest { 6559 command "$abs_builddir/envtest -clone"; 6560 chdir $PWD; 6561 stdout file "$PWD/log"; 6562 return-code 0 { 6563 action disable; 6564 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 6565 } 6566} 6567_EOT 6568 6569to 5 \ 6570 envtest -exec \ 6571 $abs_top_builddir/src/pies --foreground --stderr \ 6572 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6573cat log 6574 6575) >>"$at_stdout" 2>>"$at_stderr" 5>&- 6576at_status=$? at_failed=false 6577$at_check_filter 6578at_fn_diff_devnull "$at_stderr" || at_failed=: 6579echo >>"$at_stdout"; $as_echo "FOO=\"bar\" 6580HOME=\"/home/user\" 6581LC_ALL=\"C\" 6582LC_CTYPE=\"C\" 6583LC_MESSAGES=\"C\" 6584LC_NUMERIC=\"C\" 6585LOGIN=\"user\" 6586PATH=\"/usr/local/bin:/usr/bin:/bin\" 6587PIES_INSTANCE=\"pies\" 6588PWD=\"/home\" 6589USER=\"user\" 6590" | \ 6591 $at_diff - "$at_stdout" || at_failed=: 6592at_fn_check_status 0 $at_status "$at_srcdir/envglobal.at:63" 6593$at_failed && at_fn_log_failure 6594$at_traceon; } 6595 6596 set +x 6597 $at_times_p && times >"$at_times_file" 6598) 5>&1 2>&1 7>&- | eval $at_tee_pipe 6599read at_status <"$at_status_file" 6600#AT_STOP_48 6601#AT_START_49 6602at_fn_group_banner 49 'envglobal.at:77' \ 6603 "unset" " " 8 6604at_xfail=no 6605 test -f $XFAILFILE && at_xfail=yes 6606( 6607 $as_echo "49. $at_setup_line: testing $at_desc ..." 6608 $at_traceon 6609 6610 6611{ set +x 6612$as_echo "$at_srcdir/envglobal.at:77: 6613 6614 6615PIES_PIDFILE=\"\$PWD/pies.pid\" 6616PIES_CTLSOCK=\"unix://\$PWD/pies.ctl\"; 6617export PIES_PIDFILE PIES_CTLSOCK 6618cat > control.conf <<_EOT 6619pidfile \"\$PIES_PIDFILE\"; 6620control { 6621 socket \"\$PIES_CTLSOCK\"; 6622} 6623_EOT 6624 6625cat > envtest.conf <<_EOT 6626env { 6627 unset \"LC_*\"; unset PWD; 6628} 6629component envtest { 6630 command \"\$abs_builddir/envtest -clone\"; 6631 chdir \$PWD; 6632 stdout file \"\$PWD/log\"; 6633 return-code 0 { 6634 action disable; 6635 exec \"\$abs_top_builddir/src/piesctl --url unix:///\$PWD/pies.ctl --no-netrc shutdown\"; 6636 } 6637} 6638_EOT 6639 6640to 5 \\ 6641 envtest -exec \\ 6642 \$abs_top_builddir/src/pies --foreground --stderr \\ 6643 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6644cat log 6645" 6646at_fn_check_prepare_notrace 'an embedded newline' "envglobal.at:77" 6647( $at_check_trace; 6648 6649 6650PIES_PIDFILE="$PWD/pies.pid" 6651PIES_CTLSOCK="unix://$PWD/pies.ctl"; 6652export PIES_PIDFILE PIES_CTLSOCK 6653cat > control.conf <<_EOT 6654pidfile "$PIES_PIDFILE"; 6655control { 6656 socket "$PIES_CTLSOCK"; 6657} 6658_EOT 6659 6660cat > envtest.conf <<_EOT 6661env { 6662 unset "LC_*"; unset PWD; 6663} 6664component envtest { 6665 command "$abs_builddir/envtest -clone"; 6666 chdir $PWD; 6667 stdout file "$PWD/log"; 6668 return-code 0 { 6669 action disable; 6670 exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; 6671 } 6672} 6673_EOT 6674 6675to 5 \ 6676 envtest -exec \ 6677 $abs_top_builddir/src/pies --foreground --stderr \ 6678 --config-file control.conf --config-file envtest.conf --debug 1 2>errlog 6679cat log 6680 6681) >>"$at_stdout" 2>>"$at_stderr" 5>&- 6682at_status=$? at_failed=false 6683$at_check_filter 6684at_fn_diff_devnull "$at_stderr" || at_failed=: 6685echo >>"$at_stdout"; $as_echo "HOME=\"/home/user\" 6686LOGIN=\"user\" 6687PATH=\"/usr/local/bin:/usr/bin:/bin\" 6688PIES_INSTANCE=\"pies\" 6689USER=\"user\" 6690" | \ 6691 $at_diff - "$at_stdout" || at_failed=: 6692at_fn_check_status 0 $at_status "$at_srcdir/envglobal.at:77" 6693$at_failed && at_fn_log_failure 6694$at_traceon; } 6695 6696 set +x 6697 $at_times_p && times >"$at_times_file" 6698) 5>&1 2>&1 7>&- | eval $at_tee_pipe 6699read at_status <"$at_status_file" 6700#AT_STOP_49 6701