2 # Generated from testsuite.at by GNU Autoconf 2.69.
4 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
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 ## -------------------- ##
12 # Be more Bourne compatible
13 DUALCASE=1; export DUALCASE # for MKS sh
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
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+"$@"}'='"$@"'
22 case `(set -o) 2>/dev/null` in #(
34 # Printing a long string crashes Solaris 7 /usr/bin/printf.
35 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
37 as_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.
40 if test -z "$BASH_VERSION$ZSH_VERSION" \
41 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
43 as_echo_n='print -rn --'
44 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
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'
52 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57 expr "X$arg" : "X\\(.*\\)$as_nl";
58 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
60 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
63 as_echo_n='sh -c $as_echo_n_body as_echo'
66 as_echo='sh -c $as_echo_body as_echo'
69 # The user is always right.
70 if test "${PATH_SEPARATOR+set}" != set; then
72 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
73 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
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.)
86 # Find who we are. Look in the path if we contain no directory separator.
89 *[\\/]* ) as_myself=$0 ;;
90 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 test -z "$as_dir" && as_dir=.
95 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
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.
103 if test "x$as_myself" = x; then
106 if test ! -f "$as_myself"; then
107 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
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.
115 for as_var in BASH_ENV ENV MAIL MAILPATH
116 do eval test x\${$as_var+set} = xset \
117 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
130 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
132 if test "x$CONFIG_SHELL" = x; then
133 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
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+\"\$@\"}'='\"\$@\"'
141 case \`(set -o) 2>/dev/null\` in #(
149 as_required="as_fn_return () { (exit \$1); }
150 as_fn_success () { as_fn_return 0; }
151 as_fn_failure () { as_fn_return 1; }
152 as_fn_ret_success () { return 0; }
153 as_fn_ret_failure () { return 1; }
156 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
157 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
158 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
159 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
160 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163 exitcode=1; echo positional parameters were not saved.
165 test x\$exitcode = x0 || 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
171 test \$(( 1 + 1 )) = 2 || exit 1"
172 if (eval "$as_required") 2>/dev/null; then :
177 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
185 test -z "$as_dir" && as_dir=.
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 :
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
210 if test "x$CONFIG_SHELL" != x; then :
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.
218 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 *v*x* | *x*v* ) as_opts=-vx ;;
225 exec $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
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."
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."
248 SHELL=${CONFIG_SHELL-/bin/sh}
250 # Unset more variables known to interfere with behavior of common tools.
251 CLICOLOR_FORCE= GREP_OPTIONS=
252 unset CLICOLOR_FORCE GREP_OPTIONS
254 ## --------------------- ##
255 ## M4sh Shell Functions. ##
256 ## --------------------- ##
259 # Portably unset VAR.
262 { eval $1=; unset $1;}
266 # as_fn_set_status STATUS
267 # -----------------------
268 # Set $? to STATUS, without forking.
276 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
286 # Create "$as_dir" as a directory, including parents if necessary.
291 -*) as_dir=./$as_dir;;
293 test -d "$as_dir" || eval $as_mkdir_p || {
297 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
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\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
324 test -d "$as_dir" && break
326 test -z "$as_dirs" || eval "mkdir $as_dirs"
327 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
332 # as_fn_executable_p FILE
333 # -----------------------
334 # Test if FILE is an executable regular file.
335 as_fn_executable_p ()
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
345 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
346 eval 'as_fn_append ()
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.
362 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
370 as_val=`expr "$@" || test $? -eq 1`
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.
382 as_status=$1; test $as_status -eq 0 && as_status=1
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
387 $as_echo "$as_me: error: $2" >&2
388 as_fn_exit $as_status
391 if expr a : '\(a\)' >/dev/null 2>&1 &&
392 test "X`expr 00001 : '.*\(...\)'`" = X001; then
398 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
404 as_me=`$as_basename -- "$0" ||
405 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
406 X"$0" : 'X\(//\)$' \| \
407 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
409 sed '/^.*\/\([^/][^/]*\)\/*$/{
423 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
429 # Avoid depending upon Character Ranges.
430 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
431 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
432 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
433 as_cr_digits='0123456789'
434 as_cr_alnum=$as_cr_Letters$as_cr_digits
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. :-)
453 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
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; }
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).
468 # Exit status is that of the last command.
472 ECHO_C= ECHO_N= ECHO_T=
473 case `echo -n x` in #(((((
475 case `echo 'xy\c'` in
476 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
478 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
485 rm -f conf$$ conf$$.exe conf$$.file
486 if test -d conf$$.dir; then
487 rm -f conf$$.dir/conf$$.file
490 mkdir conf$$.dir 2>/dev/null
492 if (echo >conf$$.file) 2>/dev/null; then
493 if ln -s conf$$.file conf$$ 2>/dev/null; then
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 ||
501 elif ln conf$$.file conf$$ 2>/dev/null; then
509 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
510 rmdir conf$$.dir 2>/dev/null
512 if mkdir -p . 2>/dev/null; then
513 as_mkdir_p='mkdir -p "$as_dir"'
515 test -d ./-p && rmdir ./-p
520 as_executable_p=as_fn_executable_p
522 # Sed expression to map a string onto a valid CPP name.
523 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
525 # Sed expression to map a string onto a valid variable name.
526 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
532 SHELL=${CONFIG_SHELL-/bin/sh}
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.
541 (times) >/dev/null 2>&1 && at_times_p=:
543 # CLI Arguments to pass to the debugging scripts.
547 # Shall we be verbose? ':' means no, empty means yes.
550 # Running several jobs in parallel, 0 means as many as test groups.
554 at_check_filter_trace=:
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.
559 # Display help message?
561 # Display the version message?
569 # Whether to rerun failed tests.
571 # Whether a write failure occurred
574 # The directory we run the suite in. Default to . if no -C option.
576 # An absolute reference to this testsuite script.
578 [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
579 * ) at_myself=$at_dir/$as_myself ;;
581 # Whether -C is in effect.
584 # Whether to enable colored test results.
586 # List of the tested programs.
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
592 # Description of all the test groups.
593 at_help_all="1;version.at:17;gdbm version;;
594 2;create00.at:17;create database;gdbm create create00;
595 3;fetch00.at:17;fetch a record;gdbm fetch fetch00;
596 4;fetch01.at:17;fetch: nonexisting record;gdbm fetch fetch01;
597 5;delete00.at:17;delete a record;gdbm delete delete00;
598 6;delete01.at:17;delete: non existing record;gdbm delete delete01;
599 7;delete02.at:17;delete: all records;gdbm delete delete02;
600 8;dbmcreate00.at:17;create database;dbm create create00 dbmcreate00;
601 9;dbmcvt.at:17;converting a 1.8-style database;dbm fetch cvt;
602 10;dbmfetch00.at:17;fetch a record;dbm fetch fetch00 dbmfetch00;
603 11;dbmfetch01.at:17;fetch: nonexisting record;dbm fetch fetch01 dbmfetch01;
604 12;dbmfetch02.at:17;fetch from a read-only database;dbm fetch fetch02 dbmfetch02;
605 13;dbmfetch03.at:17;fetch from a read-only 1.8-style database;dbm fetch fetch03 dbmfetch03;
606 14;dbmdel00.at:17;delete a record;dbm delete delete00 dbmdel00;
607 15;dbmdel01.at:17;delete: non existing record;dbm delete delete01 dbmdel01;
608 16;dbmdel02.at:17;delete: all records;dbm delete delete02 dbmdel02;
609 17;setopt00.at:17;setopt;setopt setopt00;
610 18;setopt01.at:17;setopt: mmap options;setopt setopt01 mmap;
611 19;cloexec00.at:17;cloexec: gdbm_open;gdbm gdbm_open cloexec cloexec00;
612 20;cloexec01.at:17;cloexec: gdbm_reorganize;gdbm gdbm_reorganize cloexec cloexec01;
613 21;cloexec02.at:17;cloexec: dbm_open;ndbm dbm_open cloexec cloexec02;
614 22;cloexec03.at:17;cloexec: dbm_open -creat;ndbm dbm_open cloexec cloexec03;
616 # List of the all the test groups.
617 at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
619 # at_fn_validate_ranges NAME...
620 # -----------------------------
621 # Validate and normalize the test group number contained in each variable
622 # NAME. Leading zeroes are treated as decimal.
623 at_fn_validate_ranges ()
627 eval at_value=\$$at_grp
628 if test $at_value -lt 1 || test $at_value -gt 22; then
629 $as_echo "invalid test group: $at_value" >&2
633 0*) # We want to treat leading 0 as decimal, like expr and test, but
634 # AS_VAR_ARITH treats it as octal if it uses $(( )).
635 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
636 # expr fork, but it is not worth the effort to determine if the
637 # shell supports XSI when the user can just avoid leading 0.
638 eval $at_grp='`expr $at_value + 0`' ;;
646 # If the previous option needs an argument, assign it.
647 if test -n "$at_prev"; then
648 at_option=$at_prev=$at_option
653 *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
657 # Accept the important Cygnus configure options, so we can diagnose typos.
681 no | never | none) at_color=never ;;
682 auto | tty | if-tty) at_color=auto ;;
683 always | yes | force) at_color=always ;;
684 *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
685 as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
699 at_verbose=; at_quiet=:
705 at_check_filter_trace=at_fn_filter_trace
708 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
709 at_fn_validate_ranges at_option
710 as_fn_append at_groups "$at_option$as_nl"
714 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
715 at_range_start=`echo $at_option |tr -d X-`
716 at_fn_validate_ranges at_range_start
717 at_range=`$as_echo "$at_groups_all" | \
718 sed -ne '/^'$at_range_start'$/,$p'`
719 as_fn_append at_groups "$at_range$as_nl"
722 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
723 at_range_end=`echo $at_option |tr -d X-`
724 at_fn_validate_ranges at_range_end
725 at_range=`$as_echo "$at_groups_all" | \
726 sed -ne '1,/^'$at_range_end'$/p'`
727 as_fn_append at_groups "$at_range$as_nl"
730 [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
731 [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
732 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
733 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
734 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
735 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
736 at_range_start=`expr $at_option : '\(.*\)-'`
737 at_range_end=`expr $at_option : '.*-\(.*\)'`
738 if test $at_range_start -gt $at_range_end; then
740 at_range_end=$at_range_start
741 at_range_start=$at_tmp
743 at_fn_validate_ranges at_range_start at_range_end
744 at_range=`$as_echo "$at_groups_all" | \
745 sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
746 as_fn_append at_groups "$at_range$as_nl"
749 # Directory selection.
756 if test x- = "x$at_dir" ; then
761 # Parallel execution.
765 --jobs=* | -j[0-9]* )
766 if test -n "$at_optarg"; then
769 at_jobs=`expr X$at_option : 'X-j\(.*\)'`
771 case $at_jobs in *[!0-9]*)
772 at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
773 as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
782 at_groups_selected=$at_help_all
794 at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
797 # It is on purpose that we match the test group titles too.
798 at_groups_selected=`$as_echo "$at_groups_selected" |
799 grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
801 # Smash the keywords.
802 at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
803 as_fn_append at_groups "$at_groups_selected$as_nl"
810 at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
811 # Reject names that are not valid shell variable names.
813 '' | [0-9]* | *[!_$as_cr_alnum]* )
814 as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
816 at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
817 # Export now, but save eval for later and for debug scripts.
819 as_fn_append at_debug_args " $at_envvar='$at_value'"
822 *) $as_echo "$as_me: invalid option: $at_option" >&2
823 $as_echo "Try \`$0 --help' for more information." >&2
829 # Verify our last option didn't require an argument
830 if test -n "$at_prev"; then :
831 as_fn_error $? "\`$at_prev' requires an argument"
834 # The file containing the suite.
835 at_suite_log=$at_dir/$as_me.log
837 # Selected test groups.
838 if test -z "$at_groups$at_recheck"; then
839 at_groups=$at_groups_all
841 if test -n "$at_recheck" && test -r "$at_suite_log"; then
842 at_oldfails=`sed -n '
843 /^Failed tests:$/,/^Skipped tests:$/{
844 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
846 /^Unexpected passes:$/,/^## Detailed failed tests/{
847 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
849 /^## Detailed failed tests/q
851 as_fn_append at_groups "$at_oldfails$as_nl"
853 # Sort the tests, removing duplicates.
854 at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
857 if test x"$at_color" = xalways \
858 || { test x"$at_color" = xauto && test -t 1; }; then
859 at_red=`printf '\033[0;31m'`
860 at_grn=`printf '\033[0;32m'`
861 at_lgn=`printf '\033[1;32m'`
862 at_blu=`printf '\033[1;34m'`
863 at_std=`printf '\033[m'`
865 at_red= at_grn= at_lgn= at_blu= at_std=
870 cat <<_ATEOF || at_write_fail=1
871 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
873 Run all the tests, or the selected TESTS, given by numeric ranges, and
874 save a detailed log file. Upon failure, create debugging scripts.
876 Do not change environment variables directly. Instead, set them via
877 command line arguments. Set \`AUTOTEST_PATH' to select the executables
878 to exercise. Each relative directory is expanded as build and source
879 directories relative to the top level of this distribution.
880 E.g., from within the build directory /tmp/foo-1.0, invoking this:
882 $ $0 AUTOTEST_PATH=bin
884 is equivalent to the following, assuming the source directory is /src/foo-1.0:
886 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
888 cat <<_ATEOF || at_write_fail=1
891 -h, --help print the help message, then exit
892 -V, --version print version number, then exit
893 -c, --clean remove all the files this test suite might create and exit
894 -l, --list describes all the tests, or the selected TESTS
896 cat <<_ATEOF || at_write_fail=1
900 change to directory DIR before starting
901 --color[=never|auto|always]
902 enable colored test results on terminal, or always
904 Allow N jobs at once; infinite jobs with no arg (default 1)
905 -k, --keywords=KEYWORDS
906 select the tests matching all the comma-separated KEYWORDS
907 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
908 --recheck select all tests that failed or passed unexpectedly last time
909 -e, --errexit abort as soon as a test fails; implies --debug
910 -v, --verbose force more detailed output
911 default for debugging scripts
912 -d, --debug inhibit clean up and top-level logging
913 default for debugging scripts
914 -x, --trace enable tests shell tracing
916 cat <<_ATEOF || at_write_fail=1
918 Report bugs to <bug-gdbm@gnu.org>.
925 cat <<_ATEOF || at_write_fail=1
926 gdbm 1.11 test suite test groups:
928 NUM: FILE-NAME:LINE TEST-GROUP-NAME
932 # Pass an empty line as separator between selected groups and help.
933 $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
934 awk 'NF == 1 && FS != ";" {
941 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
947 n = split ($ 4, a, " ")
948 for (i = 1; i <= n; i++) {
949 l = length (a[i]) + 1
950 if (i > 1 && len + l > lmax) {
952 line = indent " " a[i]
963 }' || at_write_fail=1
966 if $at_version_p; then
967 $as_echo "$as_me (gdbm 1.11)" &&
968 cat <<\_ATEOF || at_write_fail=1
970 Copyright (C) 2012 Free Software Foundation, Inc.
971 This test suite is free software; the Free Software Foundation gives
972 unlimited permission to copy, distribute and modify it.
977 # Should we print banners? Yes if more than one test is run.
978 case $at_groups in #(
980 at_print_banners=: ;; #(
981 * ) at_print_banners=false ;;
983 # Text for banner N, set to a single space once printed.
984 # Banner 1. testsuite.at:35
985 # Category starts at test group 2.
986 at_banner_text_1="GDBM interface"
987 # Banner 2. testsuite.at:46
988 # Category starts at test group 8.
989 at_banner_text_2="Compatibility library (dbm/ndbm)"
990 # Banner 3. testsuite.at:61
991 # Category starts at test group 17.
992 at_banner_text_3="DB options"
993 # Banner 4. testsuite.at:66
994 # Category starts at test group 19.
995 at_banner_text_4="Cloexec"
997 # Take any -C into account.
998 if $at_change_dir ; then
999 test x != "x$at_dir" && cd "$at_dir" \
1000 || as_fn_error $? "unable to change directory"
1004 # Load the config files for any default variable assignments.
1005 for at_file in atconfig atlocal
1007 test -r $at_file || continue
1008 . ./$at_file || as_fn_error $? "invalid content: $at_file"
1011 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1012 : "${at_top_build_prefix=$at_top_builddir}"
1014 # Perform any assignments requested during argument parsing.
1015 eval "$at_debug_args"
1017 # atconfig delivers names relative to the directory the test suite is
1018 # in, but the groups themselves are run in testsuite-dir/group-dir.
1019 if test -n "$at_top_srcdir"; then
1021 for at_dir_var in srcdir top_srcdir top_build_prefix
1023 eval at_val=\$at_$at_dir_var
1025 [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1026 *) at_prefix=../../ ;;
1028 eval "$at_dir_var=\$at_prefix\$at_val"
1032 ## -------------------- ##
1033 ## Directory structure. ##
1034 ## -------------------- ##
1036 # This is the set of directories and files used by this script
1037 # (non-literals are capitalized):
1039 # TESTSUITE - the testsuite
1040 # TESTSUITE.log - summarizes the complete testsuite run
1041 # TESTSUITE.dir/ - created during a run, remains after -d or failed test
1042 # + at-groups/ - during a run: status of all groups in run
1043 # | + NNN/ - during a run: meta-data about test group NNN
1044 # | | + check-line - location (source file and line) of current AT_CHECK
1045 # | | + status - exit status of current AT_CHECK
1046 # | | + stdout - stdout of current AT_CHECK
1047 # | | + stder1 - stderr, including trace
1048 # | | + stderr - stderr, with trace filtered out
1049 # | | + test-source - portion of testsuite that defines group
1050 # | | + times - timestamps for computing duration
1051 # | | + pass - created if group passed
1052 # | | + xpass - created if group xpassed
1053 # | | + fail - created if group failed
1054 # | | + xfail - created if group xfailed
1055 # | | + skip - created if group skipped
1056 # + at-stop - during a run: end the run if this file exists
1057 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1058 # + 0..NNN/ - created for each group NNN, remains after -d or failed test
1059 # | + TESTSUITE.log - summarizes the group results
1060 # | + ... - files created during the group
1062 # The directory the whole suite works in.
1063 # Should be absolute to let the user `cd' at will.
1064 at_suite_dir=$at_dir/$as_me.dir
1065 # The file containing the suite ($at_dir might have changed since earlier).
1066 at_suite_log=$at_dir/$as_me.log
1067 # The directory containing helper files per test group.
1068 at_helper_dir=$at_suite_dir/at-groups
1069 # Stop file: if it exists, do not start new jobs.
1070 at_stop_file=$at_suite_dir/at-stop
1071 # The fifo used for the job dispatcher.
1072 at_job_fifo=$at_suite_dir/at-job-fifo
1075 test -d "$at_suite_dir" &&
1076 find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1077 rm -f -r "$at_suite_dir" "$at_suite_log"
1081 # Don't take risks: use only absolute directories in PATH.
1083 # For stand-alone test suites (ie. atconfig was not found),
1084 # AUTOTEST_PATH is relative to `.'.
1086 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1087 # of the package. Then expand it into build/src parts, since users
1088 # may create executables in both places.
1089 AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1092 for as_dir in $AUTOTEST_PATH $PATH
1095 test -z "$as_dir" && as_dir=.
1096 test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1099 as_fn_append at_path "$as_dir"
1102 if test -z "$at_top_build_prefix"; then
1103 # Stand-alone test suite.
1104 as_fn_append at_path "$as_dir"
1106 # Embedded test suite.
1107 as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1108 as_fn_append at_path "$at_top_srcdir/$as_dir"
1116 # Now build and simplify PATH.
1118 # There might be directories that don't exist, but don't redirect
1119 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1122 for as_dir in $at_path
1125 test -z "$as_dir" && as_dir=.
1126 test -d "$as_dir" || continue
1128 [\\/]* | ?:[\\/]* ) ;;
1129 * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1131 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1132 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1133 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1134 *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1142 # Setting up the FDs.
1146 # 5 is the log file. Not to be overwritten if `-d'.
1147 if $at_debug_p; then
1148 at_suite_log=/dev/null
1152 exec 5>>"$at_suite_log"
1155 $as_echo "## --------------------- ##
1156 ## gdbm 1.11 test suite. ##
1157 ## --------------------- ##"
1159 $as_echo "## --------------------- ##
1160 ## gdbm 1.11 test suite. ##
1161 ## --------------------- ##"
1164 $as_echo "$as_me: command line was:"
1165 $as_echo " \$ $0 $at_cli_args"
1168 # If ChangeLog exists, list a few lines in case it might help determining
1169 # the exact version.
1170 if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1171 $as_echo "## ---------- ##
1175 sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1185 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1186 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1187 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1188 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1189 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1191 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1192 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1194 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1195 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1196 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1197 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1198 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1199 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1200 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1208 test -z "$as_dir" && as_dir=.
1209 $as_echo "PATH: $as_dir"
1216 # Contents of the config files.
1217 for at_file in atconfig atlocal
1219 test -r $at_file || continue
1220 $as_echo "$as_me: $at_file:"
1221 sed 's/^/| /' $at_file
1227 ## ------------------------- ##
1228 ## Autotest shell functions. ##
1229 ## ------------------------- ##
1231 # at_fn_banner NUMBER
1232 # -------------------
1233 # Output banner NUMBER, provided the testsuite is running multiple groups and
1234 # this particular banner has not yet been printed.
1237 $at_print_banners || return 0
1238 eval at_banner_text=\$at_banner_text_$1
1239 test "x$at_banner_text" = "x " && return 0
1240 eval "at_banner_text_$1=\" \""
1241 if test -z "$at_banner_text"; then
1244 $as_echo "$as_nl$at_banner_text$as_nl"
1248 # at_fn_check_prepare_notrace REASON LINE
1249 # ---------------------------------------
1250 # Perform AT_CHECK preparations for the command at LINE for an untraceable
1251 # command; REASON is the reason for disabling tracing.
1252 at_fn_check_prepare_notrace ()
1254 $at_trace_echo "Not enabling shell tracing (command contains $1)"
1255 $as_echo "$2" >"$at_check_line_file"
1256 at_check_trace=: at_check_filter=:
1257 : >"$at_stdout"; : >"$at_stderr"
1260 # at_fn_check_prepare_trace LINE
1261 # ------------------------------
1262 # Perform AT_CHECK preparations for the command at LINE for a traceable
1264 at_fn_check_prepare_trace ()
1266 $as_echo "$1" >"$at_check_line_file"
1267 at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1268 : >"$at_stdout"; : >"$at_stderr"
1271 # at_fn_check_prepare_dynamic COMMAND LINE
1272 # ----------------------------------------
1273 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1274 # preparation function.
1275 at_fn_check_prepare_dynamic ()
1279 at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1281 at_fn_check_prepare_trace "$2" ;;
1285 # at_fn_filter_trace
1286 # ------------------
1287 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
1289 at_fn_filter_trace ()
1291 mv "$at_stderr" "$at_stder1"
1292 grep '^ *+' "$at_stder1" >&2
1293 grep -v '^ *+' "$at_stder1" >"$at_stderr"
1296 # at_fn_log_failure FILE-LIST
1297 # ---------------------------
1298 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1299 # with a failure exit code.
1300 at_fn_log_failure ()
1303 do $as_echo "$file:"; sed 's/^/> /' "$file"; done
1304 echo 1 > "$at_status_file"
1308 # at_fn_check_skip EXIT-CODE LINE
1309 # -------------------------------
1310 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1311 # the test group subshell with that same exit code. Use LINE in any report
1312 # about test failure.
1316 99) echo 99 > "$at_status_file"; at_failed=:
1317 $as_echo "$2: hard failure"; exit 99;;
1318 77) echo 77 > "$at_status_file"; exit 77;;
1322 # at_fn_check_status EXPECTED EXIT-CODE LINE
1323 # ------------------------------------------
1324 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1325 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
1326 # exit code; if it is anything else print an error message referring to LINE,
1327 # and fail the test.
1328 at_fn_check_status ()
1332 77) echo 77 > "$at_status_file"; exit 77;;
1333 99) echo 99 > "$at_status_file"; at_failed=:
1334 $as_echo "$3: hard failure"; exit 99;;
1335 *) $as_echo "$3: exit code was $2, expected $1"
1340 # at_fn_diff_devnull FILE
1341 # -----------------------
1342 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1344 at_fn_diff_devnull ()
1346 test -s "$1" || return 0
1347 $at_diff "$at_devnull" "$1"
1352 # Parse out test NUMBER from the tail of this file.
1355 eval at_sed=\$at_sed$1
1356 sed "$at_sed" "$at_myself" > "$at_test_source"
1359 # at_fn_create_debugging_script
1360 # -----------------------------
1361 # Create the debugging script $at_group_dir/run which will reproduce the
1362 # current test group.
1363 at_fn_create_debugging_script ()
1366 echo "#! /bin/sh" &&
1367 echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1368 $as_echo "cd '$at_dir'" &&
1369 $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1371 } >"$at_group_dir/run" &&
1372 chmod +x "$at_group_dir/run"
1375 ## -------------------------------- ##
1376 ## End of autotest shell functions. ##
1377 ## -------------------------------- ##
1379 $as_echo "## ---------------- ##
1380 ## Tested programs. ##
1381 ## ---------------- ##"
1385 # Report what programs are being tested.
1386 for at_program in : $at_tested
1388 test "$at_program" = : && continue
1390 [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
1392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1396 test -z "$as_dir" && as_dir=.
1397 test -f "$as_dir/$at_program" && break
1401 at_program_=$as_dir/$at_program ;;
1403 if test -f "$at_program_"; then
1405 $as_echo "$at_srcdir/testsuite.at:32: $at_program_ --version"
1406 "$at_program_" --version </dev/null
1410 as_fn_error $? "cannot find $at_program" "$LINENO" 5
1415 $as_echo "## ------------------ ##
1416 ## Running the tests. ##
1417 ## ------------------ ##"
1420 at_start_date=`date`
1421 at_start_time=`date +%s 2>/dev/null`
1422 $as_echo "$as_me: starting at: $at_start_date" >&5
1424 # Create the master directory if it doesn't already exist.
1425 as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1426 as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1428 # Can we diff with `/dev/null'? DU 5.0 refuses.
1429 if diff /dev/null /dev/null >/dev/null 2>&1; then
1430 at_devnull=/dev/null
1432 at_devnull=$at_suite_dir/devnull
1436 # Use `diff -u' when possible.
1437 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1444 # Get the last needed group.
1445 for at_group in : $at_groups; do :; done
1447 # Extract the start and end lines of each test group at the tail
1455 test = substr ($ 0, 10)
1456 print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1457 if (test == "'"$at_group"'") exit
1458 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1459 . "$at_suite_dir/at-source-lines" ||
1460 as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1461 rm -f "$at_suite_dir/at-source-lines"
1463 # Set number of jobs for `-j'; avoid more jobs than test groups.
1464 set X $at_groups; shift; at_max_jobs=$#
1465 if test $at_max_jobs -eq 0; then
1468 if test $at_jobs -ne 1 &&
1469 { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1470 at_jobs=$at_max_jobs
1473 # If parallel mode, don't output banners, don't split summary lines.
1474 if test $at_jobs -ne 1; then
1475 at_print_banners=false
1479 # Set up helper dirs.
1480 rm -rf "$at_helper_dir" &&
1481 mkdir "$at_helper_dir" &&
1482 cd "$at_helper_dir" &&
1483 { test -z "$at_groups" || mkdir $at_groups; } ||
1484 as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1486 # Functions for running a test group. We leave the actual
1487 # test group execution outside of a shell function in order
1488 # to avoid hitting zsh 4.x exit status bugs.
1490 # at_fn_group_prepare
1491 # -------------------
1492 # Prepare for running a test group.
1493 at_fn_group_prepare ()
1495 # The directory for additional per-group helper files.
1496 at_job_dir=$at_helper_dir/$at_group
1497 # The file containing the location of the last AT_CHECK.
1498 at_check_line_file=$at_job_dir/check-line
1499 # The file containing the exit status of the last command.
1500 at_status_file=$at_job_dir/status
1501 # The files containing the output of the tested commands.
1502 at_stdout=$at_job_dir/stdout
1503 at_stder1=$at_job_dir/stder1
1504 at_stderr=$at_job_dir/stderr
1505 # The file containing the code for a test group.
1506 at_test_source=$at_job_dir/test-source
1507 # The file containing dates.
1508 at_times_file=$at_job_dir/times
1510 # Be sure to come back to the top test directory.
1513 # Clearly separate the test groups when verbose.
1514 $at_first || $at_verbose echo
1516 at_group_normalized=$at_group
1519 case $at_group_normalized in #(
1520 '"$at_format"'*) break;;
1522 at_group_normalized=0$at_group_normalized
1526 # Create a fresh directory for the next test group, and enter.
1527 # If one already exists, the user may have invoked ./run from
1528 # within that directory; we remove the contents, but not the
1529 # directory itself, so that we aren't pulling the rug out from
1530 # under the shell's notion of the current directory.
1531 at_group_dir=$at_suite_dir/$at_group_normalized
1532 at_group_log=$at_group_dir/$as_me.log
1533 if test -d "$at_group_dir"; then
1534 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1535 rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1538 $as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1539 # Be tolerant if the above `rm' was not able to remove the directory.
1540 as_dir="$at_group_dir"; as_fn_mkdir_p
1542 echo 0 > "$at_status_file"
1544 # In verbose mode, append to the log file *and* show on
1545 # the standard output; in quiet mode only write to the log.
1546 if test -z "$at_verbose"; then
1547 at_tee_pipe='tee -a "$at_group_log"'
1549 at_tee_pipe='cat >> "$at_group_log"'
1553 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1554 # -------------------------------------------------
1555 # Declare the test group ORDINAL, located at LINE with group description DESC,
1556 # and residing under BANNER. Use PAD to align the status column.
1557 at_fn_group_banner ()
1560 test -n "$5" && at_fn_banner $5
1563 [0-9]) at_desc_line=" $1: ";;
1564 [0-9][0-9]) at_desc_line=" $1: " ;;
1565 *) at_desc_line="$1: " ;;
1567 as_fn_append at_desc_line "$3$4"
1568 $at_quiet $as_echo_n "$at_desc_line"
1569 echo "# -*- compilation -*-" >> "$at_group_log"
1572 # at_fn_group_postprocess
1573 # -----------------------
1574 # Perform cleanup after running a test group.
1575 at_fn_group_postprocess ()
1577 # Be sure to come back to the suite directory, in particular
1578 # since below we might `rm' the group directory we are in currently.
1581 if test ! -f "$at_check_line_file"; then
1582 sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1583 A failure happened in a test group before any test could be
1584 run. This means that test suite is improperly designed. Please
1585 report this failure to <bug-gdbm@gnu.org>.
1587 $as_echo "$at_setup_line" >"$at_check_line_file"
1590 $at_verbose $as_echo_n "$at_group. $at_setup_line: "
1591 $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
1592 case $at_xfail:$at_status in
1594 at_msg="UNEXPECTED PASS"
1596 at_errexit=$at_errexit_p
1606 at_msg='skipped ('`cat "$at_check_line_file"`')'
1612 at_msg='FAILED ('`cat "$at_check_line_file"`')'
1614 at_errexit=$at_errexit_p
1618 at_msg='expected failure ('`cat "$at_check_line_file"`')'
1624 echo "$at_res" > "$at_job_dir/$at_res"
1625 # In parallel mode, output the summary line only afterwards.
1626 if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1627 $as_echo "$at_desc_line $at_color$at_msg$at_std"
1629 # Make sure there is a separator even with long titles.
1630 $as_echo " $at_color$at_msg$at_std"
1632 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1635 # $at_times_file is only available if the group succeeded.
1636 # We're not including the group log, so the success message
1637 # is written in the global log separately. But we also
1638 # write to the group log in case they're using -d.
1639 if test -f "$at_times_file"; then
1640 at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')'
1641 rm -f "$at_times_file"
1643 $as_echo "$at_log_msg" >> "$at_group_log"
1644 $as_echo "$at_log_msg" >&5
1646 # Cleanup the group directory, unless the user wants the files
1647 # or the success was unexpected.
1648 if $at_debug_p || test $at_res = xpass; then
1649 at_fn_create_debugging_script
1650 if test $at_res = xpass && $at_errexit; then
1651 echo stop > "$at_stop_file"
1654 if test -d "$at_group_dir"; then
1655 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1656 rm -fr "$at_group_dir"
1658 rm -f "$at_test_source"
1662 # Upon failure, include the log into the testsuite's global
1663 # log. The failure message is written in the group log. It
1664 # is later included in the global log.
1665 $as_echo "$at_log_msg" >> "$at_group_log"
1667 # Upon failure, keep the group directory for autopsy, and create
1668 # the debugging script. With -e, do not start any further tests.
1669 at_fn_create_debugging_script
1670 if $at_errexit; then
1671 echo stop > "$at_stop_file"
1683 if (set -m && set +m && set +b) >/dev/null 2>&1; then
1685 at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1687 at_job_control_on=: at_job_control_off=: at_job_group=
1690 for at_signal in 1 2 15; do
1691 trap 'set +x; set +e
1693 at_signal='"$at_signal"'
1694 echo stop > "$at_stop_file"
1697 for at_pgid in `jobs -p 2>/dev/null`; do
1698 at_pgids="$at_pgids $at_job_group$at_pgid"
1700 test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1702 if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1705 at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1707 test 0 -gt 2 && at_signame=$at_signal
1708 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1709 $as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1710 as_fn_arith 128 + $at_signal && exit_status=$as_val
1711 as_fn_exit $exit_status' $at_signal
1714 rm -f "$at_stop_file"
1717 if test $at_jobs -ne 1 &&
1718 rm -f "$at_job_fifo" &&
1719 test -n "$at_job_group" &&
1720 ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
1722 # FIFO job dispatcher.
1725 for at_pid in `jobs -p`; do
1726 at_pids="$at_pids $at_job_group$at_pid"
1728 if test -n "$at_pids"; then
1730 test "${TMOUT+set}" = set && at_sig=STOP
1731 kill -$at_sig $at_pids 2>/dev/null
1734 test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1737 # Turn jobs into a list of numbers, starting from 1.
1738 at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
1742 for at_group in $at_groups; do
1743 $at_job_control_on 2>/dev/null
1745 # Start one test group.
1748 exec 7>"$at_job_fifo"
1752 trap 'set +x; set +e
1754 echo stop > "$at_stop_file"
1756 as_fn_exit 141' PIPE
1758 if cd "$at_group_dir" &&
1759 at_fn_test $at_group &&
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1763 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1766 at_fn_group_postprocess
1772 exec 6<"$at_job_fifo" 7>"$at_job_fifo"
1774 shift # Consume one token.
1775 if test $# -gt 0; then :; else
1776 read at_token <&6 || break
1779 test -f "$at_stop_file" && break
1782 # Read back the remaining ($at_jobs - 1) tokens.
1785 if test $# -gt 0; then
1795 # Run serially, avoid forks and other potential surprises.
1796 for at_group in $at_groups; do
1798 if cd "$at_group_dir" &&
1799 at_fn_test $at_group &&
1800 . "$at_test_source"; then :; else
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1802 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1805 at_fn_group_postprocess
1806 test -f "$at_stop_file" && break
1811 # Wrap up the test suite with summary statistics.
1814 # Use ?..???? when the list must remain sorted, the faster * otherwise.
1815 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
1816 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
1817 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
1818 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
1819 echo $f; done | sed '/?/d; s,/xpass,,'`
1820 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
1821 echo $f; done | sed '/?/d; s,/fail,,'`
1823 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
1824 shift; at_group_count=$#
1825 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
1826 set X $at_xfail_list; shift; at_xfail_count=$#
1827 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
1828 set X $at_skip_list; shift; at_skip_count=$#
1830 as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
1831 as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
1832 as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
1834 # Back to the top directory.
1836 rm -rf "$at_helper_dir"
1838 # Compute the duration of the suite.
1840 at_stop_time=`date +%s 2>/dev/null`
1841 $as_echo "$as_me: ending at: $at_stop_date" >&5
1842 case $at_start_time,$at_stop_time in
1844 as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
1845 as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
1846 as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
1847 as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
1848 as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
1849 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
1850 $as_echo "$as_me: test suite duration: $at_duration" >&5
1855 $as_echo "## ------------- ##
1857 ## ------------- ##"
1861 $as_echo "## ------------- ##
1863 ## ------------- ##"
1867 if test $at_run_count = 1; then
1871 at_result="$at_run_count tests"
1874 if $at_errexit_p && test $at_unexpected_count != 0; then
1875 if test $at_xpass_count = 1; then
1876 at_result="$at_result $at_were run, one passed"
1878 at_result="$at_result $at_were run, one failed"
1880 at_result="$at_result unexpectedly and inhibited subsequent tests."
1883 # Don't you just love exponential explosion of the number of cases?
1885 case $at_xpass_count:$at_fail_count:$at_xfail_count in
1887 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
1888 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
1890 # Some unexpected failures
1891 0:*:0) at_result="$at_result $at_were run,
1892 $at_fail_count failed unexpectedly." ;;
1894 # Some failures, both expected and unexpected
1895 0:*:1) at_result="$at_result $at_were run,
1896 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1897 0:*:*) at_result="$at_result $at_were run,
1898 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1900 # No unexpected failures, but some xpasses
1901 *:0:*) at_result="$at_result $at_were run,
1902 $at_xpass_count passed unexpectedly." ;;
1904 # No expected failures, but failures and xpasses
1905 *:1:0) at_result="$at_result $at_were run,
1906 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
1907 *:*:0) at_result="$at_result $at_were run,
1908 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
1911 *:*:1) at_result="$at_result $at_were run,
1912 $at_xpass_count passed unexpectedly,
1913 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1914 *:*:*) at_result="$at_result $at_were run,
1915 $at_xpass_count passed unexpectedly,
1916 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1919 if test $at_skip_count = 0 && test $at_run_count -gt 1; then
1920 at_result="All $at_result"
1924 # Now put skips in the mix.
1925 case $at_skip_count in
1927 1) at_result="$at_result
1928 1 test was skipped." ;;
1929 *) at_result="$at_result
1930 $at_skip_count tests were skipped." ;;
1933 if test $at_unexpected_count = 0; then
1934 echo "$at_color$at_result$at_std"
1935 echo "$at_result" >&5
1937 echo "${at_color}ERROR: $at_result$at_std" >&2
1938 echo "ERROR: $at_result" >&5
1941 $as_echo "## ------------------------ ##
1942 ## Summary of the failures. ##
1943 ## ------------------------ ##"
1945 # Summary of failed and skipped tests.
1946 if test $at_fail_count != 0; then
1947 echo "Failed tests:"
1948 $SHELL "$at_myself" $at_fail_list --list
1951 if test $at_skip_count != 0; then
1952 echo "Skipped tests:"
1953 $SHELL "$at_myself" $at_skip_list --list
1956 if test $at_xpass_count != 0; then
1957 echo "Unexpected passes:"
1958 $SHELL "$at_myself" $at_xpass_list --list
1961 if test $at_fail_count != 0; then
1962 $as_echo "## ---------------------- ##
1963 ## Detailed failed tests. ##
1964 ## ---------------------- ##"
1966 for at_group in $at_fail_list
1968 at_group_normalized=$at_group
1971 case $at_group_normalized in #(
1972 '"$at_format"'*) break;;
1974 at_group_normalized=0$at_group_normalized
1977 cat "$at_suite_dir/$at_group_normalized/$as_me.log"
1982 if test -n "$at_top_srcdir"; then
1983 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1984 ## ${at_top_build_prefix}config.log ##
1986 sed 's/^/| /' ${at_top_build_prefix}config.log
1991 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1992 ## $as_me.log was created. ##
1996 if $at_debug_p; then
1997 at_msg='per-test log files'
1999 at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
2001 $as_echo "Please send $at_msg and all information you think might help:
2003 To: <bug-gdbm@gnu.org>
2004 Subject: [gdbm 1.11] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
2006 You may investigate any problem if you feel able to do so, in which
2007 case the test suite provides a good starting point. Its output may
2008 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
2019 at_fn_group_banner 1 'version.at:17' \
2023 $as_echo "1. $at_setup_line: testing $at_desc ..."
2028 $as_echo "$at_srcdir/version.at:19: gtver -lib -full -header -full"
2029 at_fn_check_prepare_trace "version.at:19"
2030 ( $at_check_trace; gtver -lib -full -header -full
2031 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2032 at_status=$? at_failed=false
2034 at_fn_diff_devnull "$at_stderr" || at_failed=:
2035 echo >>"$at_stdout"; $as_echo "1.11.0
2038 $at_diff - "$at_stdout" || at_failed=:
2039 at_fn_check_status 0 $at_status "$at_srcdir/version.at:19"
2040 $at_failed && at_fn_log_failure
2045 $at_times_p && times >"$at_times_file"
2046 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2047 read at_status <"$at_status_file"
2050 at_fn_group_banner 2 'create00.at:17' \
2051 "create database" " " 1
2054 $as_echo "2. $at_setup_line: testing $at_desc ..."
2060 $as_echo "$at_srcdir/create00.at:20:
2062 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2064 num2word 1:1000 > input
2065 gtload test.db < input
2066 gtdump test.db | sort -k1,2 -n > output
2067 cmp -s input output || diff -u input output
2069 at_fn_check_prepare_notrace 'a `...` command substitution' "create00.at:20"
2072 test -z "`sort < /dev/null 2>&1`" || exit 77
2074 num2word 1:1000 > input
2075 gtload test.db < input
2076 gtdump test.db | sort -k1,2 -n > output
2077 cmp -s input output || diff -u input output
2079 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2080 at_status=$? at_failed=false
2082 at_fn_diff_devnull "$at_stderr" || at_failed=:
2083 at_fn_diff_devnull "$at_stdout" || at_failed=:
2084 at_fn_check_status 0 $at_status "$at_srcdir/create00.at:20"
2085 $at_failed && at_fn_log_failure
2090 $at_times_p && times >"$at_times_file"
2091 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2092 read at_status <"$at_status_file"
2095 at_fn_group_banner 3 'fetch00.at:17' \
2096 "fetch a record" " " 1
2099 $as_echo "3. $at_setup_line: testing $at_desc ..."
2105 $as_echo "$at_srcdir/fetch00.at:20:
2106 num2word 1:10000 | gtload test.db
2107 gtfetch test.db 1 2745 9999
2109 at_fn_check_prepare_notrace 'an embedded newline' "fetch00.at:20"
2111 num2word 1:10000 | gtload test.db
2112 gtfetch test.db 1 2745 9999
2114 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2115 at_status=$? at_failed=false
2117 at_fn_diff_devnull "$at_stderr" || at_failed=:
2118 echo >>"$at_stdout"; $as_echo "one
2119 two thousand seven hundred and fourty-five
2120 nine thousand nine hundred and ninety-nine
2122 $at_diff - "$at_stdout" || at_failed=:
2123 at_fn_check_status 0 $at_status "$at_srcdir/fetch00.at:20"
2124 $at_failed && at_fn_log_failure
2129 $at_times_p && times >"$at_times_file"
2130 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2131 read at_status <"$at_status_file"
2134 at_fn_group_banner 4 'fetch01.at:17' \
2135 "fetch: nonexisting record" " " 1
2138 $as_echo "4. $at_setup_line: testing $at_desc ..."
2144 $as_echo "$at_srcdir/fetch01.at:20:
2145 num2word 1:10000 | gtload test.db
2148 at_fn_check_prepare_notrace 'an embedded newline' "fetch01.at:20"
2150 num2word 1:10000 | gtload test.db
2153 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2154 at_status=$? at_failed=false
2156 echo >>"$at_stderr"; $as_echo "gtfetch: 0: not found
2158 $at_diff - "$at_stderr" || at_failed=:
2159 at_fn_diff_devnull "$at_stdout" || at_failed=:
2160 at_fn_check_status 2 $at_status "$at_srcdir/fetch01.at:20"
2161 $at_failed && at_fn_log_failure
2166 $at_times_p && times >"$at_times_file"
2167 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2168 read at_status <"$at_status_file"
2171 at_fn_group_banner 5 'delete00.at:17' \
2172 "delete a record" " " 1
2175 $as_echo "5. $at_setup_line: testing $at_desc ..."
2181 $as_echo "$at_srcdir/delete00.at:20:
2183 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2185 num2word 1:10 | gtload test.db
2187 gtdump test.db | sort -k1,2 -n
2189 at_fn_check_prepare_notrace 'a `...` command substitution' "delete00.at:20"
2192 test -z "`sort < /dev/null 2>&1`" || exit 77
2194 num2word 1:10 | gtload test.db
2196 gtdump test.db | sort -k1,2 -n
2198 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2199 at_status=$? at_failed=false
2201 at_fn_diff_devnull "$at_stderr" || at_failed=:
2202 echo >>"$at_stdout"; $as_echo "1 one
2212 $at_diff - "$at_stdout" || at_failed=:
2213 at_fn_check_status 0 $at_status "$at_srcdir/delete00.at:20"
2214 $at_failed && at_fn_log_failure
2219 $at_times_p && times >"$at_times_file"
2220 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2221 read at_status <"$at_status_file"
2224 at_fn_group_banner 6 'delete01.at:17' \
2225 "delete: non existing record" " " 1
2228 $as_echo "6. $at_setup_line: testing $at_desc ..."
2234 $as_echo "$at_srcdir/delete01.at:20:
2236 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2238 num2word 1:10 | gtload test.db
2241 at_fn_check_prepare_notrace 'a `...` command substitution' "delete01.at:20"
2244 test -z "`sort < /dev/null 2>&1`" || exit 77
2246 num2word 1:10 | gtload test.db
2249 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2250 at_status=$? at_failed=false
2252 echo >>"$at_stderr"; $as_echo "gtdel: cannot delete 11: Item not found
2254 $at_diff - "$at_stderr" || at_failed=:
2255 at_fn_diff_devnull "$at_stdout" || at_failed=:
2256 at_fn_check_status 2 $at_status "$at_srcdir/delete01.at:20"
2257 $at_failed && at_fn_log_failure
2262 $at_times_p && times >"$at_times_file"
2263 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2264 read at_status <"$at_status_file"
2267 at_fn_group_banner 7 'delete02.at:17' \
2268 "delete: all records" " " 1
2271 $as_echo "7. $at_setup_line: testing $at_desc ..."
2277 $as_echo "$at_srcdir/delete02.at:20:
2278 num2word 1:10 | gtload test.db
2279 gtdel test.db 1 2 3 4 5 6 7 8 9 10
2282 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:20"
2284 num2word 1:10 | gtload test.db
2285 gtdel test.db 1 2 3 4 5 6 7 8 9 10
2288 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2289 at_status=$? at_failed=false
2291 at_fn_diff_devnull "$at_stderr" || at_failed=:
2292 at_fn_diff_devnull "$at_stdout" || at_failed=:
2293 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:20"
2294 $at_failed && at_fn_log_failure
2299 $at_times_p && times >"$at_times_file"
2300 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2301 read at_status <"$at_status_file"
2304 at_fn_group_banner 8 'dbmcreate00.at:17' \
2305 "create database" " " 2
2308 $as_echo "8. $at_setup_line: testing $at_desc ..."
2314 $as_echo "$at_srcdir/dbmcreate00.at:20:
2316 test \$COMPAT -eq 1 || exit 77
2319 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2321 num2word 1:1000 > input
2323 dtdump test | sort -k1,2 -n > output
2324 cmp -s input output || diff -u input output
2326 at_fn_check_prepare_notrace 'a `...` command substitution' "dbmcreate00.at:20"
2329 test $COMPAT -eq 1 || exit 77
2332 test -z "`sort < /dev/null 2>&1`" || exit 77
2334 num2word 1:1000 > input
2336 dtdump test | sort -k1,2 -n > output
2337 cmp -s input output || diff -u input output
2339 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2340 at_status=$? at_failed=false
2342 at_fn_diff_devnull "$at_stderr" || at_failed=:
2343 at_fn_diff_devnull "$at_stdout" || at_failed=:
2344 at_fn_check_status 0 $at_status "$at_srcdir/dbmcreate00.at:20"
2345 $at_failed && at_fn_log_failure
2350 $at_times_p && times >"$at_times_file"
2351 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2352 read at_status <"$at_status_file"
2355 at_fn_group_banner 9 'dbmcvt.at:17' \
2356 "converting a 1.8-style database" " " 2
2359 $as_echo "9. $at_setup_line: testing $at_desc ..."
2365 $as_echo "$at_srcdir/dbmcvt.at:20:
2367 test \$COMPAT -eq 1 || exit 77
2369 num2word 1:10 | dtload test
2371 ln test.pag test.dir
2373 cmp test.pag test.dir >/dev/null 2>&1 && exit 1
2376 at_fn_check_prepare_notrace 'an embedded newline' "dbmcvt.at:20"
2379 test $COMPAT -eq 1 || exit 77
2381 num2word 1:10 | dtload test
2383 ln test.pag test.dir
2385 cmp test.pag test.dir >/dev/null 2>&1 && exit 1
2388 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2389 at_status=$? at_failed=false
2391 at_fn_diff_devnull "$at_stderr" || at_failed=:
2392 echo >>"$at_stdout"; $as_echo "six
2394 $at_diff - "$at_stdout" || at_failed=:
2395 at_fn_check_status 0 $at_status "$at_srcdir/dbmcvt.at:20"
2396 $at_failed && at_fn_log_failure
2401 $at_times_p && times >"$at_times_file"
2402 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2403 read at_status <"$at_status_file"
2406 at_fn_group_banner 10 'dbmfetch00.at:17' \
2407 "fetch a record" " " 2
2410 $as_echo "10. $at_setup_line: testing $at_desc ..."
2416 $as_echo "$at_srcdir/dbmfetch00.at:20:
2418 test \$COMPAT -eq 1 || exit 77
2420 num2word 1:10000 | dtload test
2421 dtfetch test 1 2745 9999
2423 at_fn_check_prepare_notrace 'an embedded newline' "dbmfetch00.at:20"
2426 test $COMPAT -eq 1 || exit 77
2428 num2word 1:10000 | dtload test
2429 dtfetch test 1 2745 9999
2431 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2432 at_status=$? at_failed=false
2434 at_fn_diff_devnull "$at_stderr" || at_failed=:
2435 echo >>"$at_stdout"; $as_echo "one
2436 two thousand seven hundred and fourty-five
2437 nine thousand nine hundred and ninety-nine
2439 $at_diff - "$at_stdout" || at_failed=:
2440 at_fn_check_status 0 $at_status "$at_srcdir/dbmfetch00.at:20"
2441 $at_failed && at_fn_log_failure
2446 $at_times_p && times >"$at_times_file"
2447 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2448 read at_status <"$at_status_file"
2451 at_fn_group_banner 11 'dbmfetch01.at:17' \
2452 "fetch: nonexisting record" " " 2
2455 $as_echo "11. $at_setup_line: testing $at_desc ..."
2461 $as_echo "$at_srcdir/dbmfetch01.at:20:
2463 test \$COMPAT -eq 1 || exit 77
2465 num2word 1:10000 | dtload test
2468 at_fn_check_prepare_notrace 'an embedded newline' "dbmfetch01.at:20"
2471 test $COMPAT -eq 1 || exit 77
2473 num2word 1:10000 | dtload test
2476 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2477 at_status=$? at_failed=false
2479 echo >>"$at_stderr"; $as_echo "dtfetch: 0: not found
2481 $at_diff - "$at_stderr" || at_failed=:
2482 at_fn_diff_devnull "$at_stdout" || at_failed=:
2483 at_fn_check_status 2 $at_status "$at_srcdir/dbmfetch01.at:20"
2484 $at_failed && at_fn_log_failure
2489 $at_times_p && times >"$at_times_file"
2490 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2491 read at_status <"$at_status_file"
2494 at_fn_group_banner 12 'dbmfetch02.at:17' \
2495 "fetch from a read-only database" " " 2
2498 $as_echo "12. $at_setup_line: testing $at_desc ..."
2504 $as_echo "$at_srcdir/dbmfetch02.at:20:
2506 test \$COMPAT -eq 1 || exit 77
2508 num2word 1:10 | dtload test
2509 chmod -w test.dir test.pag
2512 at_fn_check_prepare_notrace 'an embedded newline' "dbmfetch02.at:20"
2515 test $COMPAT -eq 1 || exit 77
2517 num2word 1:10 | dtload test
2518 chmod -w test.dir test.pag
2521 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2522 at_status=$? at_failed=false
2524 at_fn_diff_devnull "$at_stderr" || at_failed=:
2525 echo >>"$at_stdout"; $as_echo "six
2528 $at_diff - "$at_stdout" || at_failed=:
2529 at_fn_check_status 0 $at_status "$at_srcdir/dbmfetch02.at:20"
2530 $at_failed && at_fn_log_failure
2535 $at_times_p && times >"$at_times_file"
2536 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2537 read at_status <"$at_status_file"
2540 at_fn_group_banner 13 'dbmfetch03.at:17' \
2541 "fetch from a read-only 1.8-style database" " " 2
2544 $as_echo "13. $at_setup_line: testing $at_desc ..."
2550 $as_echo "$at_srcdir/dbmfetch03.at:20:
2552 test \$COMPAT -eq 1 || exit 77
2556 num2word 1:10 | dtload test
2558 ln test.pag test.dir
2559 chmod -w test.dir test.pag .
2562 at_fn_check_prepare_notrace 'an embedded newline' "dbmfetch03.at:20"
2565 test $COMPAT -eq 1 || exit 77
2569 num2word 1:10 | dtload test
2571 ln test.pag test.dir
2572 chmod -w test.dir test.pag .
2575 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2576 at_status=$? at_failed=false
2578 at_fn_diff_devnull "$at_stderr" || at_failed=:
2579 echo >>"$at_stdout"; $as_echo "six
2582 $at_diff - "$at_stdout" || at_failed=:
2583 at_fn_check_status 0 $at_status "$at_srcdir/dbmfetch03.at:20"
2584 $at_failed && at_fn_log_failure
2589 $at_times_p && times >"$at_times_file"
2590 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2591 read at_status <"$at_status_file"
2594 at_fn_group_banner 14 'dbmdel00.at:17' \
2595 "delete a record" " " 2
2598 $as_echo "14. $at_setup_line: testing $at_desc ..."
2604 $as_echo "$at_srcdir/dbmdel00.at:20:
2606 test \$COMPAT -eq 1 || exit 77
2609 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2611 num2word 1:10 | dtload test
2613 dtdump test | sort -k1,2 -n
2615 at_fn_check_prepare_notrace 'a `...` command substitution' "dbmdel00.at:20"
2618 test $COMPAT -eq 1 || exit 77
2621 test -z "`sort < /dev/null 2>&1`" || exit 77
2623 num2word 1:10 | dtload test
2625 dtdump test | sort -k1,2 -n
2627 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2628 at_status=$? at_failed=false
2630 at_fn_diff_devnull "$at_stderr" || at_failed=:
2631 echo >>"$at_stdout"; $as_echo "1 one
2641 $at_diff - "$at_stdout" || at_failed=:
2642 at_fn_check_status 0 $at_status "$at_srcdir/dbmdel00.at:20"
2643 $at_failed && at_fn_log_failure
2648 $at_times_p && times >"$at_times_file"
2649 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2650 read at_status <"$at_status_file"
2653 at_fn_group_banner 15 'dbmdel01.at:17' \
2654 "delete: non existing record" " " 2
2657 $as_echo "15. $at_setup_line: testing $at_desc ..."
2663 $as_echo "$at_srcdir/dbmdel01.at:20:
2665 test \$COMPAT -eq 1 || exit 77
2668 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2670 num2word 1:10 | dtload test
2673 at_fn_check_prepare_notrace 'a `...` command substitution' "dbmdel01.at:20"
2676 test $COMPAT -eq 1 || exit 77
2679 test -z "`sort < /dev/null 2>&1`" || exit 77
2681 num2word 1:10 | dtload test
2684 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2685 at_status=$? at_failed=false
2687 echo >>"$at_stderr"; $as_echo "dtdel: cannot delete 11: Item not found
2689 $at_diff - "$at_stderr" || at_failed=:
2690 at_fn_diff_devnull "$at_stdout" || at_failed=:
2691 at_fn_check_status 2 $at_status "$at_srcdir/dbmdel01.at:20"
2692 $at_failed && at_fn_log_failure
2697 $at_times_p && times >"$at_times_file"
2698 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2699 read at_status <"$at_status_file"
2702 at_fn_group_banner 16 'dbmdel02.at:17' \
2703 "delete: all records" " " 2
2706 $as_echo "16. $at_setup_line: testing $at_desc ..."
2712 $as_echo "$at_srcdir/dbmdel02.at:20:
2714 test \$COMPAT -eq 1 || exit 77
2716 num2word 1:10 | dtload test
2717 dtdel test 1 2 3 4 5 6 7 8 9 10
2720 at_fn_check_prepare_notrace 'an embedded newline' "dbmdel02.at:20"
2723 test $COMPAT -eq 1 || exit 77
2725 num2word 1:10 | dtload test
2726 dtdel test 1 2 3 4 5 6 7 8 9 10
2729 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2730 at_status=$? at_failed=false
2732 at_fn_diff_devnull "$at_stderr" || at_failed=:
2733 at_fn_diff_devnull "$at_stdout" || at_failed=:
2734 at_fn_check_status 0 $at_status "$at_srcdir/dbmdel02.at:20"
2735 $at_failed && at_fn_log_failure
2740 $at_times_p && times >"$at_times_file"
2741 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2742 read at_status <"$at_status_file"
2745 at_fn_group_banner 17 'setopt00.at:17' \
2749 $as_echo "17. $at_setup_line: testing $at_desc ..."
2755 $as_echo "$at_srcdir/setopt00.at:20:
2756 num2word 1:1000 | gtload test.db || exit 2
2757 gtopt test.db '!MMAP'
2759 at_fn_check_prepare_notrace 'an embedded newline' "setopt00.at:20"
2761 num2word 1:1000 | gtload test.db || exit 2
2762 gtopt test.db '!MMAP'
2764 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2765 at_status=$? at_failed=false
2767 at_fn_diff_devnull "$at_stderr" || at_failed=:
2768 echo >>"$at_stdout"; $as_echo "GDBM_GETFLAGS: PASS
2770 initial GDBM_SETCACHESIZE: PASS
2771 GDBM_GETCACHESIZE: PASS
2772 second GDBM_SETCACHESIZE: XFAIL
2774 initial GDBM_GETSYNCMODE: PASS
2775 GDBM_SETSYNCMODE: PASS
2776 GDBM_GETSYNCMODE: PASS
2777 GDBM_SETSYNCMODE true: PASS
2778 GDBM_GETSYNCMODE: PASS
2779 GDBM_SETSYNCMODE false: PASS
2780 GDBM_GETSYNCMODE: PASS
2782 initial GDBM_GETCENTFREE: PASS
2783 GDBM_SETCENTFREE: PASS
2784 GDBM_GETCENTFREE: FAIL
2785 GDBM_SETCENTFREE true: PASS
2786 GDBM_GETCENTFREE: FAIL
2787 GDBM_SETCENTFREE false: PASS
2788 GDBM_GETCENTFREE: FAIL
2790 initial GDBM_GETCOALESCEBLKS: PASS
2791 GDBM_SETCOALESCEBLKS: PASS
2792 GDBM_GETCOALESCEBLKS: PASS
2793 GDBM_SETCOALESCEBLKS true: PASS
2794 GDBM_GETCOALESCEBLKS: PASS
2795 GDBM_SETCOALESCEBLKS false: PASS
2796 GDBM_GETCOALESCEBLKS: PASS
2797 GDBM_GETDBNAME: PASS
2799 $at_diff - "$at_stdout" || at_failed=:
2800 at_fn_check_status 0 $at_status "$at_srcdir/setopt00.at:20"
2801 $at_failed && at_fn_log_failure
2806 $at_times_p && times >"$at_times_file"
2807 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2808 read at_status <"$at_status_file"
2811 at_fn_group_banner 18 'setopt01.at:17' \
2812 "setopt: mmap options" " " 3
2815 $as_echo "18. $at_setup_line: testing $at_desc ..."
2821 $as_echo "$at_srcdir/setopt01.at:20:
2822 num2word 1:1000 | gtload test.db || exit 2
2823 gtopt test.db 'MMAP' > out
2824 grep 'MMAP: SKIP' out >/dev/null && exit 77
2827 at_fn_check_prepare_notrace 'an embedded newline' "setopt01.at:20"
2829 num2word 1:1000 | gtload test.db || exit 2
2830 gtopt test.db 'MMAP' > out
2831 grep 'MMAP: SKIP' out >/dev/null && exit 77
2834 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2835 at_status=$? at_failed=false
2837 at_fn_diff_devnull "$at_stderr" || at_failed=:
2838 echo >>"$at_stdout"; $as_echo "* MMAP:
2839 initial GDBM_GETMMAP: PASS
2840 GDBM_SETMMAP false: PASS
2842 initial GDBM_GETMAXMAPSIZE: PASS
2843 GDBM_SETMAXMAPSIZE: PASS
2844 GDBM_GETMAXMAPSIZE: PASS
2846 $at_diff - "$at_stdout" || at_failed=:
2847 at_fn_check_status 0 $at_status "$at_srcdir/setopt01.at:20"
2848 $at_failed && at_fn_log_failure
2853 $at_times_p && times >"$at_times_file"
2854 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2855 read at_status <"$at_status_file"
2858 at_fn_group_banner 19 'cloexec00.at:17' \
2859 "cloexec: gdbm_open" " " 4
2862 $as_echo "19. $at_setup_line: testing $at_desc ..."
2868 $as_echo "$at_srcdir/cloexec00.at:20:
2869 g_open_ce \"\$abs_builddir/fdop\"
2871 at_fn_check_prepare_notrace 'an embedded newline' "cloexec00.at:20"
2873 g_open_ce "$abs_builddir/fdop"
2875 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2876 at_status=$? at_failed=false
2878 at_fn_diff_devnull "$at_stderr" || at_failed=:
2879 at_fn_diff_devnull "$at_stdout" || at_failed=:
2880 at_fn_check_status 0 $at_status "$at_srcdir/cloexec00.at:20"
2881 $at_failed && at_fn_log_failure
2886 $at_times_p && times >"$at_times_file"
2887 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2888 read at_status <"$at_status_file"
2891 at_fn_group_banner 20 'cloexec01.at:17' \
2892 "cloexec: gdbm_reorganize" " " 4
2895 $as_echo "20. $at_setup_line: testing $at_desc ..."
2901 $as_echo "$at_srcdir/cloexec01.at:20:
2902 g_reorg_ce \"\$abs_builddir/fdop\"
2904 at_fn_check_prepare_notrace 'an embedded newline' "cloexec01.at:20"
2906 g_reorg_ce "$abs_builddir/fdop"
2908 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2909 at_status=$? at_failed=false
2911 at_fn_diff_devnull "$at_stderr" || at_failed=:
2912 at_fn_diff_devnull "$at_stdout" || at_failed=:
2913 at_fn_check_status 0 $at_status "$at_srcdir/cloexec01.at:20"
2914 $at_failed && at_fn_log_failure
2919 $at_times_p && times >"$at_times_file"
2920 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2921 read at_status <"$at_status_file"
2924 at_fn_group_banner 21 'cloexec02.at:17' \
2925 "cloexec: dbm_open" " " 4
2928 $as_echo "21. $at_setup_line: testing $at_desc ..."
2934 $as_echo "$at_srcdir/cloexec02.at:20:
2936 test \$COMPAT -eq 1 || exit 77
2938 num2word 1:10 | dtload file
2939 d_creat_ce \"\$abs_builddir/fdop\"
2941 at_fn_check_prepare_notrace 'an embedded newline' "cloexec02.at:20"
2944 test $COMPAT -eq 1 || exit 77
2946 num2word 1:10 | dtload file
2947 d_creat_ce "$abs_builddir/fdop"
2949 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2950 at_status=$? at_failed=false
2952 at_fn_diff_devnull "$at_stderr" || at_failed=:
2953 at_fn_diff_devnull "$at_stdout" || at_failed=:
2954 at_fn_check_status 0 $at_status "$at_srcdir/cloexec02.at:20"
2955 $at_failed && at_fn_log_failure
2960 $at_times_p && times >"$at_times_file"
2961 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2962 read at_status <"$at_status_file"
2965 at_fn_group_banner 22 'cloexec03.at:17' \
2966 "cloexec: dbm_open -creat" " " 4
2969 $as_echo "22. $at_setup_line: testing $at_desc ..."
2975 $as_echo "$at_srcdir/cloexec03.at:20:
2977 test \$COMPAT -eq 1 || exit 77
2979 d_creat_ce \"\$abs_builddir/fdop\" -creat
2981 at_fn_check_prepare_notrace 'an embedded newline' "cloexec03.at:20"
2984 test $COMPAT -eq 1 || exit 77
2986 d_creat_ce "$abs_builddir/fdop" -creat
2988 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2989 at_status=$? at_failed=false
2991 at_fn_diff_devnull "$at_stderr" || at_failed=:
2992 at_fn_diff_devnull "$at_stdout" || at_failed=:
2993 at_fn_check_status 0 $at_status "$at_srcdir/cloexec03.at:20"
2994 $at_failed && at_fn_log_failure
2999 $at_times_p && times >"$at_times_file"
3000 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3001 read at_status <"$at_status_file"