2 # Generated from testsuite.at by GNU Autoconf 2.63.
4 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5 # 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
23 *posix*) set -o posix ;;
32 # Avoid depending upon Character Ranges.
33 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
35 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36 as_cr_digits='0123456789'
37 as_cr_alnum=$as_cr_Letters$as_cr_digits
42 # Printing a long string crashes Solaris 7 /usr/bin/printf.
43 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52 as_echo_n='/usr/ucb/echo -n'
54 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 expr "X$arg" : "X\\(.*\\)$as_nl";
60 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65 as_echo_n='sh -c $as_echo_n_body as_echo'
68 as_echo='sh -c $as_echo_body as_echo'
71 # The user is always right.
72 if test "${PATH_SEPARATOR+set}" != set; then
74 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
75 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 # Support unset when possible.
81 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
89 # We need space, tab and new line, in precisely that order. Quoting is
90 # there to prevent editors from complaining about space-tab.
91 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
92 # splitting by setting IFS to empty value.)
95 # Find who we are. Look in the path if we contain no directory separator.
97 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102 test -z "$as_dir" && as_dir=.
103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
109 # We did not find ourselves, most probably we were run as `sh COMMAND'
110 # in which case we are not to be found in the path.
111 if test "x$as_myself" = x; then
114 if test ! -f "$as_myself"; then
115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 { (exit 1); exit 1; }
119 # Work around bugs in pre-3.0 UWIN ksh.
120 for as_var in ENV MAIL MAILPATH
121 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
133 # Required to use basename.
134 if expr a : '\(a\)' >/dev/null 2>&1 &&
135 test "X`expr 00001 : '.*\(...\)'`" = X001; then
141 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
148 # Name of the executable.
149 as_me=`$as_basename -- "$0" ||
150 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
151 X"$0" : 'X\(//\)$' \| \
152 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
154 sed '/^.*\/\([^/][^/]*\)\/*$/{
172 if test "x$CONFIG_SHELL" = x; then
173 if (eval ":") 2>/dev/null; then
179 if test $as_have_required = yes && (eval ":
189 as_func_ret_success () {
192 as_func_ret_failure () {
197 if as_func_success; then
201 echo as_func_success failed.
204 if as_func_failure; then
206 echo as_func_failure succeeded.
209 if as_func_ret_success; then
213 echo as_func_ret_success failed.
216 if as_func_ret_failure; then
218 echo as_func_ret_failure succeeded.
221 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
225 echo positional parameters were not saved.
228 test \$exitcode = 0) || { (exit 1); exit 1; }
233 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
234 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
235 ") 2> /dev/null; then
239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
240 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
243 test -z "$as_dir" && as_dir=.
246 for as_base in sh bash ksh sh5; do
247 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
254 for as_shell in $as_candidate_shells $SHELL; do
255 # Try only shells that exist, to save several forks.
256 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
257 { ("$as_shell") 2> /dev/null <<\_ASEOF
258 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
261 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
262 # is contrary to our usage. Disable this feature.
263 alias -g '${1+"$@"}'='"$@"'
266 case `(set -o) 2>/dev/null` in
267 *posix*) set -o posix ;;
276 CONFIG_SHELL=$as_shell
278 if { "$as_shell" 2> /dev/null <<\_ASEOF
279 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
282 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
283 # is contrary to our usage. Disable this feature.
284 alias -g '${1+"$@"}'='"$@"'
287 case `(set -o) 2>/dev/null` in
288 *posix*) set -o posix ;;
304 as_func_ret_success () {
307 as_func_ret_failure () {
312 if as_func_success; then
316 echo as_func_success failed.
319 if as_func_failure; then
321 echo as_func_failure succeeded.
324 if as_func_ret_success; then
328 echo as_func_ret_success failed.
331 if as_func_ret_failure; then
333 echo as_func_ret_failure succeeded.
336 if ( set x; as_func_ret_success y && test x = "$1" ); then
340 echo positional parameters were not saved.
343 test $exitcode = 0) || { (exit 1); exit 1; }
348 test "x$as_lineno_1" != "x$as_lineno_2" &&
349 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
360 if test "x$CONFIG_SHELL" != x; then
361 for as_var in BASH_ENV ENV
362 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
365 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
369 if test $as_have_required = no; then
370 echo This script requires a shell more modern than all the
371 echo shells that I found on your system. Please install a
372 echo modern shell, or manually run the script under such a
373 echo shell if you do have one.
374 { (exit 1); exit 1; }
384 (eval "as_func_return () {
393 as_func_ret_success () {
396 as_func_ret_failure () {
401 if as_func_success; then
405 echo as_func_success failed.
408 if as_func_failure; then
410 echo as_func_failure succeeded.
413 if as_func_ret_success; then
417 echo as_func_ret_success failed.
420 if as_func_ret_failure; then
422 echo as_func_ret_failure succeeded.
425 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
429 echo positional parameters were not saved.
432 test \$exitcode = 0") || {
433 echo No shell found that supports shell functions.
434 echo Please tell bug-autoconf@gnu.org about your system,
435 echo including any error possibly output before this message.
436 echo This can help us improve future autoconf versions.
437 echo Configuration will now proceed without shell functions.
444 test "x$as_lineno_1" != "x$as_lineno_2" &&
445 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
447 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
448 # uniformly replaced by the line number. The first 'sed' inserts a
449 # line-number line after each line using $LINENO; the second 'sed'
450 # does the real work. The second script uses 'N' to pair each
451 # line-number line with the line containing $LINENO, and appends
452 # trailing '-' during substitution so that $LINENO is not a special
454 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
455 # scripts with optimization help from Paolo Bonzini. Blame Lee
456 # E. McMahon (1931-1989) for sed's syntax. :-)
468 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
472 chmod +x "$as_me.lineno" ||
473 { { $as_echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
474 $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
475 { (exit 1); exit 1; }; }
477 # Don't try to exec as it changes $[0], causing all sort of problems
478 # (the dirname of $[0] is not the place where we might find the
479 # original and so on. Autoconf is especially sensitive to this).
481 # Exit status is that of the last command.
486 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
492 ECHO_C= ECHO_N= ECHO_T=
496 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
502 if expr a : '\(a\)' >/dev/null 2>&1 &&
503 test "X`expr 00001 : '.*\(...\)'`" = X001; then
509 rm -f conf$$ conf$$.exe conf$$.file
510 if test -d conf$$.dir; then
511 rm -f conf$$.dir/conf$$.file
514 mkdir conf$$.dir 2>/dev/null
516 if (echo >conf$$.file) 2>/dev/null; then
517 if ln -s conf$$.file conf$$ 2>/dev/null; then
519 # ... but there are two gotchas:
520 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
521 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
522 # In both cases, we have to default to `cp -p'.
523 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
525 elif ln conf$$.file conf$$ 2>/dev/null; then
533 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
534 rmdir conf$$.dir 2>/dev/null
536 if mkdir -p . 2>/dev/null; then
539 test -d ./-p && rmdir ./-p
543 if test -x / >/dev/null 2>&1; then
546 if ls -dL / >/dev/null 2>&1; then
553 if test -d "$1"; then
559 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
560 ???[sx]*):;;*)false;;esac;fi
564 as_executable_p=$as_test_x
566 # Sed expression to map a string onto a valid CPP name.
567 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
569 # Sed expression to map a string onto a valid variable name.
570 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
576 SHELL=${CONFIG_SHELL-/bin/sh}
582 # Not all shells have the 'times' builtin; the subshell is needed to make
583 # sure we discard the 'times: not found' message from the shell.
585 (times) >/dev/null 2>&1 && at_times_p=:
587 # CLI Arguments to pass to the debugging scripts.
591 # Shall we be verbose? ':' means no, empty means yes.
595 # Shall we keep the debug scripts? Must be `:' when the suite is
596 # run by a debug script, so that the script doesn't remove itself.
598 # Display help message?
600 # Display the version message?
608 # Whether a write failure occurred
611 # The directory we run the suite in. Default to . if no -C option.
613 # An absolute reference to this testsuite script.
615 [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
616 * ) at_myself=$at_dir/$as_myself ;;
618 # Whether -C is in effect.
621 # List of the tested programs.
623 # List of the all the test groups.
624 at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22'
625 # As many question marks as there are digits in the last test group number.
626 # Used to normalize the test group numbers so that `ls' lists them in
629 # Description of all the test groups.
630 at_help_all="1;version.at:17;gdbm version;;
631 2;create00.at:17;create database;gdbm create create00;
632 3;fetch00.at:17;fetch a record;gdbm fetch fetch00;
633 4;fetch01.at:17;fetch: nonexisting record;gdbm fetch fetch01;
634 5;delete00.at:17;delete a record;gdbm delete delete00;
635 6;delete01.at:17;delete: non existing record;gdbm delete delete01;
636 7;delete02.at:17;delete: all records;gdbm delete delete02;
637 8;dbmcreate00.at:17;create database;dbm create create00 dbmcreate00;
638 9;dbmcvt.at:17;converting a 1.8-style database;dbm fetch cvt;
639 10;dbmfetch00.at:17;fetch a record;dbm fetch fetch00 dbmfetch00;
640 11;dbmfetch01.at:17;fetch: nonexisting record;dbm fetch fetch01 dbmfetch01;
641 12;dbmfetch02.at:17;fetch from a read-only database;dbm fetch fetch02 dbmfetch02;
642 13;dbmfetch03.at:17;fetch from a read-only 1.8-style database;dbm fetch fetch03 dbmfetch03;
643 14;dbmdel00.at:17;delete a record;dbm delete delete00 dbmdel00;
644 15;dbmdel01.at:17;delete: non existing record;dbm delete delete01 dbmdel01;
645 16;dbmdel02.at:17;delete: all records;dbm delete delete02 dbmdel02;
646 17;setopt00.at:17;setopt;setopt setopt00;
647 18;setopt01.at:17;setopt: mmap options;setopt setopt01 mmap;
648 19;cloexec00.at:17;cloexec: gdbm_open;gdbm gdbm_open cloexec cloexec00;
649 20;cloexec01.at:17;cloexec: gdbm_reorganize;gdbm gdbm_reorganize cloexec cloexec01;
650 21;cloexec02.at:17;cloexec: dbm_open;ndbm dbm_open cloexec cloexec02;
651 22;cloexec03.at:17;cloexec: dbm_open -creat;ndbm dbm_open cloexec cloexec03;
654 # at_func_validate_ranges [NAME...]
655 # ---------------------------------
656 # Validate and normalize the test group number contained in each
657 # variable NAME. Leading zeroes are treated as decimal.
658 at_func_validate_ranges ()
662 eval at_value=\$$at_grp
663 if test $at_value -lt 1 || test $at_value -gt 22; then
664 $as_echo "invalid test group: $at_value" >&2
668 0*) # We want to treat leading 0 as decimal, like expr and test, but
669 # at_func_arith treats it as octal if it uses $(( )).
670 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
671 # expr fork, but it is not worth the effort to determine if the
672 # shell supports XSI when the user can just avoid leading 0.
673 eval $at_grp='`expr $at_value + 0`' ;;
681 # If the previous option needs an argument, assign it.
682 if test -n "$at_prev"; then
683 at_option=$at_prev=$at_option
688 *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;;
692 # Accept the important Cygnus configure options, so we can diagnose typos.
721 at_verbose=; at_quiet=:
725 at_traceon='set -x'; at_traceoff='set +x'
728 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
729 at_func_validate_ranges at_option
730 at_groups="$at_groups$at_option "
734 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
735 at_range_start=`echo $at_option |tr -d X-`
736 at_func_validate_ranges at_range_start
737 at_range=`$as_echo " $at_groups_all " | \
738 sed -e 's/^.* \('$at_range_start' \)/\1/'`
739 at_groups="$at_groups$at_range "
742 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
743 at_range_end=`echo $at_option |tr -d X-`
744 at_func_validate_ranges at_range_end
745 at_range=`$as_echo " $at_groups_all " | \
746 sed -e 's/\( '$at_range_end'\) .*$/\1/'`
747 at_groups="$at_groups$at_range "
750 [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
751 [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
752 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
753 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
754 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
755 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
756 at_range_start=`expr $at_option : '\(.*\)-'`
757 at_range_end=`expr $at_option : '.*-\(.*\)'`
758 if test $at_range_start -gt $at_range_end; then
760 at_range_end=$at_range_start
761 at_range_start=$at_tmp
763 at_func_validate_ranges at_range_start at_range_end
764 at_range=`$as_echo " $at_groups_all " | \
765 sed -e 's/^.*\( '$at_range_start' \)/\1/' \
766 -e 's/\( '$at_range_end'\) .*$/\1/'`
767 at_groups="$at_groups$at_range "
770 # Directory selection.
784 at_groups_selected=$at_help_all
796 at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
799 # It is on purpose that we match the test group titles too.
800 at_groups_selected=`$as_echo "$at_groups_selected" |
801 grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
803 # Smash the newlines.
804 at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//' |
807 at_groups="$at_groups$at_groups_selected "
811 at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
812 # Reject names that are not valid shell variable names.
814 '' | [0-9]* | *[!_$as_cr_alnum]* )
815 { { $as_echo "$as_me:$LINENO: error: invalid variable name: $at_envvar" >&5
816 $as_echo "$as_me: error: invalid variable name: $at_envvar" >&2;}
817 { (exit 1); exit 1; }; } ;;
819 at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
820 # Export now, but save eval for later and for debug scripts.
822 at_debug_args="$at_debug_args $at_envvar='$at_value'"
825 *) $as_echo "$as_me: invalid option: $at_option" >&2
826 $as_echo "Try \`$0 --help' for more information." >&2
832 # Verify our last option didn't require an argument
833 if test -n "$at_prev"; then
834 { { $as_echo "$as_me:$LINENO: error: \`$at_prev' requires an argument." >&5
835 $as_echo "$as_me: error: \`$at_prev' requires an argument." >&2;}
836 { (exit 1); exit 1; }; }
840 # Selected test groups.
841 if test -z "$at_groups"; then
842 at_groups=$at_groups_all
844 # Sort the tests, removing duplicates.
845 at_groups=`$as_echo "$at_groups" | tr ' ' "$as_nl" | sort -nu`
850 cat <<_ATEOF || at_write_fail=1
851 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
853 Run all the tests, or the selected TESTS, given by numeric ranges, and
854 save a detailed log file. Upon failure, create debugging scripts.
856 You should not change environment variables unless explicitly passed
857 as command line arguments. Set \`AUTOTEST_PATH' to select the executables
858 to exercise. Each relative directory is expanded as build and source
859 directories relatively to the top level of this distribution. E.g.,
861 $ $0 AUTOTEST_PATH=bin
863 possibly amounts into
865 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
867 cat <<_ATEOF || at_write_fail=1
870 -h, --help print the help message, then exit
871 -V, --version print version number, then exit
872 -c, --clean remove all the files this test suite might create and exit
873 -l, --list describes all the tests, or the selected TESTS
875 cat <<_ATEOF || at_write_fail=1
879 change to directory DIR before starting
880 -k, --keywords=KEYWORDS
881 select the tests matching all the comma-separated KEYWORDS
882 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
883 -e, --errexit abort as soon as a test fails; implies --debug
884 -v, --verbose force more detailed output
885 default for debugging scripts
886 -d, --debug inhibit clean up and top-level logging
887 default for debugging scripts
888 -x, --trace enable tests shell tracing
890 cat <<_ATEOF || at_write_fail=1
892 Report bugs to <bug-gdbm@gnu.org>.
899 cat <<_ATEOF || at_write_fail=1
900 gdbm 1.10 test suite test groups:
902 NUM: FILE-NAME:LINE TEST-GROUP-NAME
906 # Passing at_groups is tricky. We cannot use it to form a literal string
907 # or regexp because of the limitation of AIX awk. And Solaris' awk
908 # doesn't grok more than 99 fields in a record, so we have to use `split'.
909 # at_groups needs to be space-separated for this script to work.
912 at_groups=`$as_echo "$at_groups" | tr "$as_nl" ' '` ;;
914 $as_echo "$at_groups$as_nl$at_help_all" |
915 awk 'BEGIN { FS = ";" }
917 for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1
922 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
923 if ($ 4) printf " %s\n", $ 4
925 }' || at_write_fail=1
928 if $at_version_p; then
929 $as_echo "$as_me (gdbm 1.10)" &&
930 cat <<\_ACEOF || at_write_fail=1
932 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
933 Free Software Foundation, Inc.
934 This test suite is free software; the Free Software Foundation gives
935 unlimited permission to copy, distribute and modify it.
940 # Should we print banners? at_groups is space-separated for entire test,
941 # newline-separated if only a subset of the testsuite is run.
943 *' '*' '* | *"$as_nl"*"$as_nl"* )
944 at_print_banners=: ;;
945 * ) at_print_banners=false ;;
947 # Text for banner N, set to empty once printed.
948 # Banner 1. testsuite.at:35
949 # Category starts at test group 2.
950 at_banner_text_1="GDBM interface"
951 # Banner 2. testsuite.at:46
952 # Category starts at test group 8.
953 at_banner_text_2="Compatibility library (dbm/ndbm)"
954 # Banner 3. testsuite.at:61
955 # Category starts at test group 17.
956 at_banner_text_3="DB options"
957 # Banner 4. testsuite.at:66
958 # Category starts at test group 19.
959 at_banner_text_4="Cloexec"
961 # Take any -C into account.
962 if $at_change_dir ; then
963 if test x- = "x$at_dir" ; then
966 test x != "x$at_dir" && cd "$at_dir" \
967 || { { $as_echo "$as_me:$LINENO: error: unable to change directory" >&5
968 $as_echo "$as_me: error: unable to change directory" >&2;}
969 { (exit 1); exit 1; }; }
973 # Load the config files for any default variable assignments.
974 for at_file in atconfig atlocal
976 test -r $at_file || continue
977 . ./$at_file || { { $as_echo "$as_me:$LINENO: error: invalid content: $at_file" >&5
978 $as_echo "$as_me: error: invalid content: $at_file" >&2;}
979 { (exit 1); exit 1; }; }
982 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
983 : ${at_top_build_prefix=$at_top_builddir}
985 # Perform any assignments requested during argument parsing.
986 eval "$at_debug_args"
988 # atconfig delivers names relative to the directory the test suite is
989 # in, but the groups themselves are run in testsuite-dir/group-dir.
990 if test -n "$at_top_srcdir"; then
992 for at_dir_var in srcdir top_srcdir top_build_prefix
994 at_val=`eval 'as_val=${'at_$at_dir_var'}
997 [\\/$]* | ?:[\\/]* ) at_prefix= ;;
998 *) at_prefix=../../ ;;
1000 eval "$at_dir_var=\$at_prefix\$at_val"
1004 ## ------------------- ##
1005 ## Directory structure ##
1006 ## ------------------- ##
1008 # This is the set of directories and files used by this script
1009 # (non-literals are capitalized):
1011 # TESTSUITE - the testsuite
1012 # TESTSUITE.log - summarizes the complete testsuite run
1013 # TESTSUITE.dir/ - created during a run, remains after -d or failed test
1014 # + at-groups/ - during a run: status of all groups in run
1015 # | + NNN/ - during a run: meta-data about test group NNN
1016 # | | + check-line - location (source file and line) of current AT_CHECK
1017 # | | + status - exit status of current AT_CHECK
1018 # | | + stdout - stdout of current AT_CHECK
1019 # | | + stder1 - stderr, including trace
1020 # | | + stderr - stderr, with trace filtered out
1021 # | | + test-source - portion of testsuite that defines group
1022 # | | + times - timestamps for computing duration
1023 # | | + pass - created if group passed
1024 # | | + xpass - created if group xpassed
1025 # | | + fail - created if group failed
1026 # | | + xfail - created if group xfailed
1027 # | | + skip - created if group skipped
1028 # + at-stop - during a run: end the run if this file exists
1029 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1030 # + 0..NNN/ - created for each group NNN, remains after -d or failed test
1031 # | + TESTSUITE.log - summarizes the group results
1032 # | + ... - files created during the group
1034 # The directory the whole suite works in.
1035 # Should be absolute to let the user `cd' at will.
1036 at_suite_dir=$at_dir/$as_me.dir
1037 # The file containing the suite.
1038 at_suite_log=$at_dir/$as_me.log
1039 # The directory containing helper files per test group.
1040 at_helper_dir=$at_suite_dir/at-groups
1041 # Stop file: if it exists, do not start new jobs.
1042 at_stop_file=$at_suite_dir/at-stop
1045 test -d "$at_suite_dir" &&
1046 find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1047 rm -f -r "$at_suite_dir" "$at_suite_log"
1051 # Don't take risks: use only absolute directories in PATH.
1053 # For stand-alone test suites (ie. atconfig was not found),
1054 # AUTOTEST_PATH is relative to `.'.
1056 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1057 # of the package. Then expand it into build/src parts, since users
1058 # may create executables in both places.
1059 AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1062 for as_dir in $AUTOTEST_PATH $PATH
1065 test -z "$as_dir" && as_dir=.
1066 test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR
1069 at_path=$at_path$as_dir
1072 if test -z "$at_top_build_prefix"; then
1073 # Stand-alone test suite.
1074 at_path=$at_path$as_dir
1076 # Embedded test suite.
1077 at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR
1078 at_path=$at_path$at_top_srcdir/$as_dir
1086 # Now build and simplify PATH.
1088 # There might be directories that don't exist, but don't redirect
1089 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1092 for as_dir in $at_path
1095 test -z "$as_dir" && as_dir=.
1096 test -d "$as_dir" || continue
1098 [\\/]* | ?:[\\/]* ) ;;
1099 * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1101 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1102 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1103 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1104 *) at_new_path=$at_new_path$PATH_SEPARATOR$as_dir ;;
1112 # Setting up the FDs.
1113 # 5 is the log file. Not to be overwritten if `-d'.
1114 if $at_debug_p; then
1115 at_suite_log=/dev/null
1119 exec 5>>"$at_suite_log"
1123 ## --------------------- ##
1124 ## gdbm 1.10 test suite. ##
1125 ## --------------------- ##
1129 ## --------------------- ##
1130 ## gdbm 1.10 test suite. ##
1131 ## --------------------- ##
1135 $as_echo "$as_me: command line was:"
1136 $as_echo " \$ $0 $at_cli_args"
1139 # Try to find a few ChangeLogs in case it might help determining the
1140 # exact version. Use the relative dir: if the top dir is a symlink,
1141 # find will not follow it (and options to follow the links are not
1142 # portable), which would result in no output here. Prune directories
1143 # matching the package tarname, since they tend to be leftovers from
1144 # `make dist' or `make distcheck' and contain redundant or stale logs.
1145 if test -n "$at_top_srcdir"; then
1152 for at_file in `find "$at_top_srcdir" -name "gdbm-*" -prune -o -name ChangeLog -print`
1154 $as_echo "$as_me: $at_file:"
1155 sed 's/^/| /;10q' $at_file
1167 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1168 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1169 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1170 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1171 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1173 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1174 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1176 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1177 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1178 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1179 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1180 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1181 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1182 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1190 test -z "$as_dir" && as_dir=.
1191 $as_echo "PATH: $as_dir"
1198 # Contents of the config files.
1199 for at_file in atconfig atlocal
1201 test -r $at_file || continue
1202 $as_echo "$as_me: $at_file:"
1203 sed 's/^/| /' $at_file
1209 ## --------------- ##
1210 ## Shell functions ##
1211 ## --------------- ##
1213 # at_func_banner NUMBER
1214 # ---------------------
1215 # Output banner NUMBER, provided the testsuite is running multiple groups
1216 # and this particular banner has not yet been printed.
1219 $at_print_banners || return 0
1220 eval at_banner_text=\$at_banner_text_$1
1221 test "x$at_banner_text" = x && return 0
1222 eval at_banner_text_$1=
1223 $as_echo "$as_nl$at_banner_text$as_nl"
1226 # at_func_check_newline COMMAND
1227 # -----------------------------
1228 # Test if COMMAND includes a newline and, if so, print a message and return
1230 at_func_check_newline ()
1234 '*) echo 'Not enabling shell tracing (command contains an embedded newline)'
1240 # at_func_filter_trace EXIT-CODE
1241 # ------------------------------
1242 # Split the contents of file "$at_stder1" into the "set -x" trace (on stderr)
1243 # and the other lines (on file "$at_stderr"). Return the exit code EXIT-CODE.
1244 at_func_filter_trace ()
1246 grep '^ *+' "$at_stder1" >&2
1247 grep -v '^ *+' "$at_stder1" >"$at_stderr"
1251 # at_func_log_failure FILE-LIST
1252 # -----------------------------
1253 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1254 # with a failure exit code.
1255 at_func_log_failure ()
1258 do $as_echo "$file:"; sed 's/^/> /' "$file"; done
1259 echo 1 > "$at_status_file"
1263 # at_func_check_skip EXIT-CODE
1264 # ----------------------------
1265 # Check whether EXIT-CODE is the special exit code 77, and if so exit the shell
1266 # with that same exit code.
1267 at_func_check_skip ()
1270 77) echo 77 > "$at_status_file"; exit 77;;
1274 # at_func_check_status EXPECTED EXIT-CODE LINE
1275 # --------------------------------------------
1276 # Check whether EXIT-CODE is the expected exit code, and if so do nothing.
1277 # Otherwise, if it is 77 exit the shell with that same exit code; if it is
1278 # anything else print an error message and fail the test.
1279 at_func_check_status ()
1283 77) echo 77 > "$at_status_file"; exit 77;;
1284 *) $as_echo "$3: exit code was $2, expected $1"
1289 # at_func_diff_devnull FILE
1290 # -------------------------
1291 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless
1293 at_func_diff_devnull ()
1295 test -s "$1" || return 0
1296 $at_diff "$at_devnull" "$1"
1299 # at_func_test NUMBER
1300 # -------------------
1301 # Parse out test NUMBER from the tail of this file.
1304 eval at_sed=\$at_sed$1
1305 sed "$at_sed" "$at_myself" > "$at_test_source"
1308 # at_func_create_debugging_script
1309 # -------------------------------
1310 # Create the debugging script $at_group_dir/run which will reproduce the
1311 # current test group.
1312 at_func_create_debugging_script ()
1315 echo "#! /bin/sh" &&
1316 echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1317 $as_echo "cd '$at_dir'" &&
1318 $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1320 } >"$at_group_dir/run" &&
1321 chmod +x "$at_group_dir/run"
1326 # Arithmetic evaluation, avoids expr if the shell is sane. The
1327 # interpretation of leading zeroes is unspecified.
1329 # subshell and eval are needed to keep Solaris sh from bailing out:
1330 if ( eval 'test $(( 1 + 1 )) = 2' ) 2>/dev/null; then
1331 # With "$@", bash does not split positional parameters:
1332 eval 'at_func_arith ()
1334 at_func_arith_result=$(( $* ))
1339 at_func_arith_result=`expr "$@"`
1343 ## ---------------------- ##
1344 ## End of shell functions ##
1345 ## ---------------------- ##
1348 ## ---------------- ##
1349 ## Tested programs. ##
1350 ## ---------------- ##
1355 # Report what programs are being tested.
1356 for at_program in : $at_tested
1358 test "$at_program" = : && continue
1359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1363 test -z "$as_dir" && as_dir=.
1364 test -f "$as_dir/$at_program" && break
1368 if test -f "$as_dir/$at_program"; then
1370 $as_echo "$at_srcdir/testsuite.at:32: $as_dir/$at_program --version"
1371 "$as_dir/$at_program" --version </dev/null
1375 { { $as_echo "$as_me:$LINENO: error: cannot find $at_program" >&5
1376 $as_echo "$as_me: error: cannot find $at_program" >&2;}
1377 { (exit 1); exit 1; }; }
1383 ## ------------------ ##
1384 ## Running the tests. ##
1385 ## ------------------ ##
1389 at_start_date=`date`
1390 at_start_time=`date +%s 2>/dev/null`
1391 $as_echo "$as_me: starting at: $at_start_date" >&5
1393 # Create the master directory if it doesn't already exist.
1394 test -d "$at_suite_dir" ||
1395 mkdir "$at_suite_dir" ||
1396 { { $as_echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5
1397 $as_echo "$as_me: error: cannot create '$at_suite_dir'" >&2;}
1398 { (exit 1); exit 1; }; }
1400 # Can we diff with `/dev/null'? DU 5.0 refuses.
1401 if diff /dev/null /dev/null >/dev/null 2>&1; then
1402 at_devnull=/dev/null
1404 at_devnull=$at_suite_dir/devnull
1408 # Use `diff -u' when possible.
1409 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1416 # Get the last needed group.
1417 for at_group in : $at_groups; do :; done
1419 # Extract the start and end lines of each test group at the tail
1427 test = substr ($ 0, 10)
1428 print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1429 if (test == "'"$at_group"'") exit
1430 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1431 . "$at_suite_dir/at-source-lines" ||
1432 { { $as_echo "$as_me:$LINENO: error: cannot create test line number cache" >&5
1433 $as_echo "$as_me: error: cannot create test line number cache" >&2;}
1434 { (exit 1); exit 1; }; }
1435 rm -f "$at_suite_dir/at-source-lines"
1437 # Set up helper dirs.
1438 rm -rf "$at_helper_dir" &&
1439 mkdir "$at_helper_dir" &&
1440 cd "$at_helper_dir" &&
1441 { test -z "$at_groups" || mkdir $at_groups; } ||
1442 { { $as_echo "$as_me:$LINENO: error: testsuite directory setup failed" >&5
1443 $as_echo "$as_me: error: testsuite directory setup failed" >&2;}
1444 { (exit 1); exit 1; }; }
1446 # Functions for running a test group. We leave the actual
1447 # test group execution outside of a shell function in order
1448 # to avoid hitting zsh 4.x exit status bugs.
1450 # at_func_group_prepare
1451 # ---------------------
1452 # Prepare running a test group
1453 at_func_group_prepare ()
1455 # The directory for additional per-group helper files.
1456 at_job_dir=$at_helper_dir/$at_group
1457 # The file containing the location of the last AT_CHECK.
1458 at_check_line_file=$at_job_dir/check-line
1459 # The file containing the exit status of the last command.
1460 at_status_file=$at_job_dir/status
1461 # The files containing the output of the tested commands.
1462 at_stdout=$at_job_dir/stdout
1463 at_stder1=$at_job_dir/stder1
1464 at_stderr=$at_job_dir/stderr
1465 # The file containing the code for a test group.
1466 at_test_source=$at_job_dir/test-source
1467 # The file containing dates.
1468 at_times_file=$at_job_dir/times
1470 # Be sure to come back to the top test directory.
1473 # Clearly separate the test groups when verbose.
1474 $at_first || $at_verbose echo
1476 at_group_normalized=$at_group
1479 case $at_group_normalized in #(
1480 '"$at_format"'*) break;;
1482 at_group_normalized=0$at_group_normalized
1486 # Create a fresh directory for the next test group, and enter.
1487 at_group_dir=$at_suite_dir/$at_group_normalized
1488 at_group_log=$at_group_dir/$as_me.log
1489 if test -d "$at_group_dir"; then
1490 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1491 rm -fr "$at_group_dir" ||
1492 { $as_echo "$as_me:$LINENO: WARNING: test directory for $at_group_normalized could not be cleaned." >&5
1493 $as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned." >&2;}
1495 # Be tolerant if the above `rm' was not able to remove the directory.
1496 { as_dir="$at_group_dir"
1498 -*) as_dir=./$as_dir;;
1500 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
1504 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
1505 *) as_qdir=$as_dir;;
1507 as_dirs="'$as_qdir' $as_dirs"
1508 as_dir=`$as_dirname -- "$as_dir" ||
1509 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1510 X"$as_dir" : 'X\(//\)[^/]' \| \
1511 X"$as_dir" : 'X\(//\)$' \| \
1512 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
1513 $as_echo X"$as_dir" |
1514 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1531 test -d "$as_dir" && break
1533 test -z "$as_dirs" || eval "mkdir $as_dirs"
1534 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
1535 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
1536 { (exit 1); exit 1; }; }; }
1538 echo 0 > "$at_status_file"
1540 # In verbose mode, append to the log file *and* show on
1541 # the standard output; in quiet mode only write to the log.
1542 if test -z "$at_verbose"; then
1543 at_tee_pipe='tee -a "$at_group_log"'
1545 at_tee_pipe='cat >> "$at_group_log"'
1549 # at_func_group_postprocess
1550 # -------------------------
1551 at_func_group_postprocess ()
1553 # Be sure to come back to the suite directory, in particular
1554 # since below we might `rm' the group directory we are in currently.
1557 if test ! -f "$at_check_line_file"; then
1558 sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1559 A failure happened in a test group before any test could be
1560 run. This means that test suite is improperly designed. Please
1561 report this failure to <bug-gdbm@gnu.org>.
1563 $as_echo "$at_setup_line" >"$at_check_line_file"
1565 $at_verbose $as_echo_n "$at_group. $at_setup_line: "
1566 $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
1567 case $at_xfail:$at_status in
1569 at_msg="UNEXPECTED PASS"
1571 at_errexit=$at_errexit_p
1579 at_msg='skipped ('`cat "$at_check_line_file"`')'
1584 at_msg='expected failure ('`cat "$at_check_line_file"`')'
1589 at_msg='FAILED ('`cat "$at_check_line_file"`')'
1591 at_errexit=$at_errexit_p
1594 echo "$at_res" > "$at_job_dir/$at_res"
1595 # Make sure there is a separator even with long titles.
1597 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1600 # $at_times_file is only available if the group succeeded.
1601 # We're not including the group log, so the success message
1602 # is written in the global log separately. But we also
1603 # write to the group log in case they're using -d.
1604 if test -f "$at_times_file"; then
1605 at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')'
1606 rm -f "$at_times_file"
1608 $as_echo "$at_log_msg" >> "$at_group_log"
1609 $as_echo "$at_log_msg" >&5
1611 # Cleanup the group directory, unless the user wants the files.
1612 if $at_debug_p; then
1613 at_func_create_debugging_script
1615 if test -d "$at_group_dir"; then
1616 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1617 rm -fr "$at_group_dir"
1619 rm -f "$at_test_source"
1623 # Upon failure, include the log into the testsuite's global
1624 # log. The failure message is written in the group log. It
1625 # is later included in the global log.
1626 $as_echo "$at_log_msg" >> "$at_group_log"
1628 # Upon failure, keep the group directory for autopsy, and create
1629 # the debugging script. With -e, do not start any further tests.
1630 at_func_create_debugging_script
1631 if $at_errexit; then
1632 echo stop > "$at_stop_file"
1643 rm -f "$at_stop_file"
1646 for at_group in $at_groups; do
1647 at_func_group_prepare
1648 if cd "$at_group_dir" &&
1649 at_func_test $at_group &&
1650 . "$at_test_source"; then :; else
1651 { $as_echo "$as_me:$LINENO: WARNING: unable to parse test group: $at_group" >&5
1652 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1655 at_func_group_postprocess
1656 test -f "$at_stop_file" && break
1660 # Wrap up the test suite with summary statistics.
1663 # Use ?..???? when the list must remain sorted, the faster * otherwise.
1664 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
1665 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
1666 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
1667 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
1668 echo $f; done | sed '/?/d; s,/xpass,,'`
1669 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
1670 echo $f; done | sed '/?/d; s,/fail,,'`
1672 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
1673 shift; at_group_count=$#
1674 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
1675 set X $at_xfail_list; shift; at_xfail_count=$#
1676 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
1677 set X $at_skip_list; shift; at_skip_count=$#
1679 at_func_arith $at_group_count - $at_skip_count
1680 at_run_count=$at_func_arith_result
1681 at_func_arith $at_xpass_count + $at_fail_count
1682 at_unexpected_count=$at_func_arith_result
1683 at_func_arith $at_xfail_count + $at_fail_count
1684 at_total_fail_count=$at_func_arith_result
1686 # Back to the top directory.
1688 rm -rf "$at_helper_dir"
1690 # Compute the duration of the suite.
1692 at_stop_time=`date +%s 2>/dev/null`
1693 $as_echo "$as_me: ending at: $at_stop_date" >&5
1694 case $at_start_time,$at_stop_time in
1696 at_func_arith $at_stop_time - $at_start_time
1697 at_duration_s=$at_func_arith_result
1698 at_func_arith $at_duration_s / 60
1699 at_duration_m=$at_func_arith_result
1700 at_func_arith $at_duration_m / 60
1701 at_duration_h=$at_func_arith_result
1702 at_func_arith $at_duration_s % 60
1703 at_duration_s=$at_func_arith_result
1704 at_func_arith $at_duration_m % 60
1705 at_duration_m=$at_func_arith_result
1706 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
1707 $as_echo "$as_me: test suite duration: $at_duration" >&5
1728 if test $at_run_count = 1; then
1732 at_result="$at_run_count tests"
1735 if $at_errexit_p && test $at_unexpected_count != 0; then
1736 if test $at_xpass_count = 1; then
1737 at_result="$at_result $at_were run, one passed"
1739 at_result="$at_result $at_were run, one failed"
1741 at_result="$at_result unexpectedly and inhibited subsequent tests."
1743 # Don't you just love exponential explosion of the number of cases?
1744 case $at_xpass_count:$at_fail_count:$at_xfail_count in
1746 0:0:0) at_result="$at_result $at_were successful." ;;
1747 0:0:*) at_result="$at_result behaved as expected." ;;
1749 # Some unexpected failures
1750 0:*:0) at_result="$at_result $at_were run,
1751 $at_fail_count failed unexpectedly." ;;
1753 # Some failures, both expected and unexpected
1754 0:*:1) at_result="$at_result $at_were run,
1755 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1756 0:*:*) at_result="$at_result $at_were run,
1757 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1759 # No unexpected failures, but some xpasses
1760 *:0:*) at_result="$at_result $at_were run,
1761 $at_xpass_count passed unexpectedly." ;;
1763 # No expected failures, but failures and xpasses
1764 *:1:0) at_result="$at_result $at_were run,
1765 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
1766 *:*:0) at_result="$at_result $at_were run,
1767 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
1770 *:*:1) at_result="$at_result $at_were run,
1771 $at_xpass_count passed unexpectedly,
1772 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1773 *:*:*) at_result="$at_result $at_were run,
1774 $at_xpass_count passed unexpectedly,
1775 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1778 if test $at_skip_count = 0 && test $at_run_count -gt 1; then
1779 at_result="All $at_result"
1783 # Now put skips in the mix.
1784 case $at_skip_count in
1786 1) at_result="$at_result
1787 1 test was skipped." ;;
1788 *) at_result="$at_result
1789 $at_skip_count tests were skipped." ;;
1792 if test $at_unexpected_count = 0; then
1794 echo "$at_result" >&5
1796 echo "ERROR: $at_result" >&2
1797 echo "ERROR: $at_result" >&5
1801 ## ------------------------ ##
1802 ## Summary of the failures. ##
1803 ## ------------------------ ##
1806 # Summary of failed and skipped tests.
1807 if test $at_fail_count != 0; then
1808 echo "Failed tests:"
1809 $SHELL "$at_myself" $at_fail_list --list
1812 if test $at_skip_count != 0; then
1813 echo "Skipped tests:"
1814 $SHELL "$at_myself" $at_skip_list --list
1817 if test $at_xpass_count != 0; then
1818 echo "Unexpected passes:"
1819 $SHELL "$at_myself" $at_xpass_list --list
1822 if test $at_fail_count != 0; then
1824 ## ---------------------- ##
1825 ## Detailed failed tests. ##
1826 ## ---------------------- ##
1829 for at_group in $at_fail_list
1831 at_group_normalized=$at_group
1834 case $at_group_normalized in #(
1835 '"$at_format"'*) break;;
1837 at_group_normalized=0$at_group_normalized
1840 cat "$at_suite_dir/$at_group_normalized/$as_me.log"
1845 if test -n "$at_top_srcdir"; then
1846 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1847 ## ${at_top_build_prefix}config.log ##
1849 sed 's/^/| /' ${at_top_build_prefix}config.log
1854 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1855 ## $as_me.log was created. ##
1859 $as_echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:
1861 To: <bug-gdbm@gnu.org>
1862 Subject: [gdbm 1.10] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
1864 if test $at_debug_p = false; then
1866 echo 'You may investigate any problem if you feel able to do so, in which'
1867 echo 'case the test suite provides a good starting point. Its output may'
1868 $as_echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."
1880 # 1. version.at:17: gdbm version
1881 at_setup_line='version.at:17'
1882 at_desc="gdbm version"
1883 $at_quiet $as_echo_n " 1: $at_desc "
1885 echo "# -*- compilation -*-" >> "$at_group_log"
1887 $as_echo "1. version.at:17: testing ..."
1892 $as_echo "$at_srcdir/version.at:19: gtver -lib -full -header -full"
1893 echo version.at:19 >"$at_check_line_file"
1895 if test -n "$at_traceon"; then
1896 ( $at_traceon; gtver -lib -full -header -full ) >"$at_stdout" 2>"$at_stder1"
1897 at_func_filter_trace $?
1899 ( :; gtver -lib -full -header -full ) >"$at_stdout" 2>"$at_stderr"
1903 at_func_diff_devnull "$at_stderr" || at_failed=:
1904 echo >>"$at_stdout"; $as_echo "1.10.0
1907 $at_diff - "$at_stdout" || at_failed=:
1908 at_func_check_status 0 $at_status "$at_srcdir/version.at:19"
1910 $at_failed && at_func_log_failure
1915 $at_times_p && times >"$at_times_file"
1916 ) 5>&1 2>&1 | eval $at_tee_pipe
1917 at_status=`cat "$at_status_file"`
1920 # 2. create00.at:17: create database
1921 at_setup_line='create00.at:17'
1923 at_desc="create database"
1924 $at_quiet $as_echo_n " 2: $at_desc "
1926 echo "# -*- compilation -*-" >> "$at_group_log"
1928 $as_echo "2. create00.at:17: testing ..."
1934 $as_echo "$at_srcdir/create00.at:20:
1936 test -z "`sort < /dev/null 2>&1`" || exit 77
1938 num2word 1:1000 > input
1939 gtload test.db < input
1940 gtdump test.db | sort -k1,2 -n > output
1941 diff -u input output
1943 echo create00.at:20 >"$at_check_line_file"
1945 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
1949 test -z "`sort < /dev/null 2>&1`" || exit 77
1951 num2word 1:1000 > input
1952 gtload test.db < input
1953 gtdump test.db | sort -k1,2 -n > output
1954 diff -u input output
1955 ) >"$at_stdout" 2>"$at_stder1"
1956 at_func_filter_trace $?
1960 test -z "`sort < /dev/null 2>&1`" || exit 77
1962 num2word 1:1000 > input
1963 gtload test.db < input
1964 gtdump test.db | sort -k1,2 -n > output
1965 diff -u input output
1966 ) >"$at_stdout" 2>"$at_stderr"
1970 at_func_diff_devnull "$at_stderr" || at_failed=:
1971 at_func_diff_devnull "$at_stdout" || at_failed=:
1972 at_func_check_status 0 $at_status "$at_srcdir/create00.at:20"
1974 $at_failed && at_func_log_failure
1979 $at_times_p && times >"$at_times_file"
1980 ) 5>&1 2>&1 | eval $at_tee_pipe
1981 at_status=`cat "$at_status_file"`
1984 # 3. fetch00.at:17: fetch a record
1985 at_setup_line='fetch00.at:17'
1987 at_desc="fetch a record"
1988 $at_quiet $as_echo_n " 3: $at_desc "
1990 echo "# -*- compilation -*-" >> "$at_group_log"
1992 $as_echo "3. fetch00.at:17: testing ..."
1998 $as_echo "$at_srcdir/fetch00.at:20:
1999 num2word 1:10000 | gtload test.db
2000 gtfetch test.db 1 2745 9999
2002 echo fetch00.at:20 >"$at_check_line_file"
2004 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2007 num2word 1:10000 | gtload test.db
2008 gtfetch test.db 1 2745 9999
2009 ) >"$at_stdout" 2>"$at_stder1"
2010 at_func_filter_trace $?
2013 num2word 1:10000 | gtload test.db
2014 gtfetch test.db 1 2745 9999
2015 ) >"$at_stdout" 2>"$at_stderr"
2019 at_func_diff_devnull "$at_stderr" || at_failed=:
2020 echo >>"$at_stdout"; $as_echo "one
2021 two thousand seven hundred and fourty-five
2022 nine thousand nine hundred and ninety-nine
2024 $at_diff - "$at_stdout" || at_failed=:
2025 at_func_check_status 0 $at_status "$at_srcdir/fetch00.at:20"
2027 $at_failed && at_func_log_failure
2032 $at_times_p && times >"$at_times_file"
2033 ) 5>&1 2>&1 | eval $at_tee_pipe
2034 at_status=`cat "$at_status_file"`
2037 # 4. fetch01.at:17: fetch: nonexisting record
2038 at_setup_line='fetch01.at:17'
2040 at_desc="fetch: nonexisting record"
2041 $at_quiet $as_echo_n " 4: $at_desc "
2043 echo "# -*- compilation -*-" >> "$at_group_log"
2045 $as_echo "4. fetch01.at:17: testing ..."
2051 $as_echo "$at_srcdir/fetch01.at:20:
2052 num2word 1:10000 | gtload test.db
2055 echo fetch01.at:20 >"$at_check_line_file"
2057 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2060 num2word 1:10000 | gtload test.db
2062 ) >"$at_stdout" 2>"$at_stder1"
2063 at_func_filter_trace $?
2066 num2word 1:10000 | gtload test.db
2068 ) >"$at_stdout" 2>"$at_stderr"
2072 echo >>"$at_stderr"; $as_echo "gtfetch: 0: not found
2074 $at_diff - "$at_stderr" || at_failed=:
2075 at_func_diff_devnull "$at_stdout" || at_failed=:
2076 at_func_check_status 2 $at_status "$at_srcdir/fetch01.at:20"
2078 $at_failed && at_func_log_failure
2083 $at_times_p && times >"$at_times_file"
2084 ) 5>&1 2>&1 | eval $at_tee_pipe
2085 at_status=`cat "$at_status_file"`
2088 # 5. delete00.at:17: delete a record
2089 at_setup_line='delete00.at:17'
2091 at_desc="delete a record"
2092 $at_quiet $as_echo_n " 5: $at_desc "
2094 echo "# -*- compilation -*-" >> "$at_group_log"
2096 $as_echo "5. delete00.at:17: testing ..."
2102 $as_echo "$at_srcdir/delete00.at:20:
2104 test -z "`sort < /dev/null 2>&1`" || exit 77
2106 num2word 1:10 | gtload test.db
2108 gtdump test.db | sort -k1,2 -n
2110 echo delete00.at:20 >"$at_check_line_file"
2112 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2116 test -z "`sort < /dev/null 2>&1`" || exit 77
2118 num2word 1:10 | gtload test.db
2120 gtdump test.db | sort -k1,2 -n
2121 ) >"$at_stdout" 2>"$at_stder1"
2122 at_func_filter_trace $?
2126 test -z "`sort < /dev/null 2>&1`" || exit 77
2128 num2word 1:10 | gtload test.db
2130 gtdump test.db | sort -k1,2 -n
2131 ) >"$at_stdout" 2>"$at_stderr"
2135 at_func_diff_devnull "$at_stderr" || at_failed=:
2136 echo >>"$at_stdout"; $as_echo "1 one
2146 $at_diff - "$at_stdout" || at_failed=:
2147 at_func_check_status 0 $at_status "$at_srcdir/delete00.at:20"
2149 $at_failed && at_func_log_failure
2154 $at_times_p && times >"$at_times_file"
2155 ) 5>&1 2>&1 | eval $at_tee_pipe
2156 at_status=`cat "$at_status_file"`
2159 # 6. delete01.at:17: delete: non existing record
2160 at_setup_line='delete01.at:17'
2162 at_desc="delete: non existing record"
2163 $at_quiet $as_echo_n " 6: $at_desc "
2165 echo "# -*- compilation -*-" >> "$at_group_log"
2167 $as_echo "6. delete01.at:17: testing ..."
2173 $as_echo "$at_srcdir/delete01.at:20:
2175 test -z "`sort < /dev/null 2>&1`" || exit 77
2177 num2word 1:10 | gtload test.db
2180 echo delete01.at:20 >"$at_check_line_file"
2182 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2186 test -z "`sort < /dev/null 2>&1`" || exit 77
2188 num2word 1:10 | gtload test.db
2190 ) >"$at_stdout" 2>"$at_stder1"
2191 at_func_filter_trace $?
2195 test -z "`sort < /dev/null 2>&1`" || exit 77
2197 num2word 1:10 | gtload test.db
2199 ) >"$at_stdout" 2>"$at_stderr"
2203 echo >>"$at_stderr"; $as_echo "gtdel: cannot delete 11: Item not found
2205 $at_diff - "$at_stderr" || at_failed=:
2206 at_func_diff_devnull "$at_stdout" || at_failed=:
2207 at_func_check_status 2 $at_status "$at_srcdir/delete01.at:20"
2209 $at_failed && at_func_log_failure
2214 $at_times_p && times >"$at_times_file"
2215 ) 5>&1 2>&1 | eval $at_tee_pipe
2216 at_status=`cat "$at_status_file"`
2219 # 7. delete02.at:17: delete: all records
2220 at_setup_line='delete02.at:17'
2222 at_desc="delete: all records"
2223 $at_quiet $as_echo_n " 7: $at_desc "
2225 echo "# -*- compilation -*-" >> "$at_group_log"
2227 $as_echo "7. delete02.at:17: testing ..."
2233 $as_echo "$at_srcdir/delete02.at:20:
2234 num2word 1:10 | gtload test.db
2235 gtdel test.db 1 2 3 4 5 6 7 8 9 10
2238 echo delete02.at:20 >"$at_check_line_file"
2240 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2243 num2word 1:10 | gtload test.db
2244 gtdel test.db 1 2 3 4 5 6 7 8 9 10
2246 ) >"$at_stdout" 2>"$at_stder1"
2247 at_func_filter_trace $?
2250 num2word 1:10 | gtload test.db
2251 gtdel test.db 1 2 3 4 5 6 7 8 9 10
2253 ) >"$at_stdout" 2>"$at_stderr"
2257 at_func_diff_devnull "$at_stderr" || at_failed=:
2258 at_func_diff_devnull "$at_stdout" || at_failed=:
2259 at_func_check_status 0 $at_status "$at_srcdir/delete02.at:20"
2261 $at_failed && at_func_log_failure
2266 $at_times_p && times >"$at_times_file"
2267 ) 5>&1 2>&1 | eval $at_tee_pipe
2268 at_status=`cat "$at_status_file"`
2271 # 8. dbmcreate00.at:17: create database
2272 at_setup_line='dbmcreate00.at:17'
2274 at_desc="create database"
2275 $at_quiet $as_echo_n " 8: $at_desc "
2277 echo "# -*- compilation -*-" >> "$at_group_log"
2279 $as_echo "8. dbmcreate00.at:17: testing ..."
2285 $as_echo "$at_srcdir/dbmcreate00.at:20:
2287 test $COMPAT -eq 1 || exit 77
2290 test -z "`sort < /dev/null 2>&1`" || exit 77
2292 num2word 1:1000 > input
2294 dtdump test | sort -k1,2 -n > output
2295 diff -u input output
2297 echo dbmcreate00.at:20 >"$at_check_line_file"
2299 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2303 test $COMPAT -eq 1 || exit 77
2306 test -z "`sort < /dev/null 2>&1`" || exit 77
2308 num2word 1:1000 > input
2310 dtdump test | sort -k1,2 -n > output
2311 diff -u input output
2312 ) >"$at_stdout" 2>"$at_stder1"
2313 at_func_filter_trace $?
2317 test $COMPAT -eq 1 || exit 77
2320 test -z "`sort < /dev/null 2>&1`" || exit 77
2322 num2word 1:1000 > input
2324 dtdump test | sort -k1,2 -n > output
2325 diff -u input output
2326 ) >"$at_stdout" 2>"$at_stderr"
2330 at_func_diff_devnull "$at_stderr" || at_failed=:
2331 at_func_diff_devnull "$at_stdout" || at_failed=:
2332 at_func_check_status 0 $at_status "$at_srcdir/dbmcreate00.at:20"
2334 $at_failed && at_func_log_failure
2339 $at_times_p && times >"$at_times_file"
2340 ) 5>&1 2>&1 | eval $at_tee_pipe
2341 at_status=`cat "$at_status_file"`
2344 # 9. dbmcvt.at:17: converting a 1.8-style database
2345 at_setup_line='dbmcvt.at:17'
2347 at_desc="converting a 1.8-style database"
2348 $at_quiet $as_echo_n " 9: $at_desc "
2350 echo "# -*- compilation -*-" >> "$at_group_log"
2352 $as_echo "9. dbmcvt.at:17: testing ..."
2358 $as_echo "$at_srcdir/dbmcvt.at:20:
2360 test $COMPAT -eq 1 || exit 77
2362 num2word 1:10 | dtload test
2364 ln test.pag test.dir
2366 cmp test.pag test.dir >/dev/null 2>&1 && exit 1
2369 echo dbmcvt.at:20 >"$at_check_line_file"
2371 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2375 test $COMPAT -eq 1 || exit 77
2377 num2word 1:10 | dtload test
2379 ln test.pag test.dir
2381 cmp test.pag test.dir >/dev/null 2>&1 && exit 1
2383 ) >"$at_stdout" 2>"$at_stder1"
2384 at_func_filter_trace $?
2388 test $COMPAT -eq 1 || exit 77
2390 num2word 1:10 | dtload test
2392 ln test.pag test.dir
2394 cmp test.pag test.dir >/dev/null 2>&1 && exit 1
2396 ) >"$at_stdout" 2>"$at_stderr"
2400 at_func_diff_devnull "$at_stderr" || at_failed=:
2401 echo >>"$at_stdout"; $as_echo "six
2403 $at_diff - "$at_stdout" || at_failed=:
2404 at_func_check_status 0 $at_status "$at_srcdir/dbmcvt.at:20"
2406 $at_failed && at_func_log_failure
2411 $at_times_p && times >"$at_times_file"
2412 ) 5>&1 2>&1 | eval $at_tee_pipe
2413 at_status=`cat "$at_status_file"`
2416 # 10. dbmfetch00.at:17: fetch a record
2417 at_setup_line='dbmfetch00.at:17'
2419 at_desc="fetch a record"
2420 $at_quiet $as_echo_n " 10: $at_desc "
2422 echo "# -*- compilation -*-" >> "$at_group_log"
2424 $as_echo "10. dbmfetch00.at:17: testing ..."
2430 $as_echo "$at_srcdir/dbmfetch00.at:20:
2432 test $COMPAT -eq 1 || exit 77
2434 num2word 1:10000 | dtload test
2435 dtfetch test 1 2745 9999
2437 echo dbmfetch00.at:20 >"$at_check_line_file"
2439 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2443 test $COMPAT -eq 1 || exit 77
2445 num2word 1:10000 | dtload test
2446 dtfetch test 1 2745 9999
2447 ) >"$at_stdout" 2>"$at_stder1"
2448 at_func_filter_trace $?
2452 test $COMPAT -eq 1 || exit 77
2454 num2word 1:10000 | dtload test
2455 dtfetch test 1 2745 9999
2456 ) >"$at_stdout" 2>"$at_stderr"
2460 at_func_diff_devnull "$at_stderr" || at_failed=:
2461 echo >>"$at_stdout"; $as_echo "one
2462 two thousand seven hundred and fourty-five
2463 nine thousand nine hundred and ninety-nine
2465 $at_diff - "$at_stdout" || at_failed=:
2466 at_func_check_status 0 $at_status "$at_srcdir/dbmfetch00.at:20"
2468 $at_failed && at_func_log_failure
2473 $at_times_p && times >"$at_times_file"
2474 ) 5>&1 2>&1 | eval $at_tee_pipe
2475 at_status=`cat "$at_status_file"`
2478 # 11. dbmfetch01.at:17: fetch: nonexisting record
2479 at_setup_line='dbmfetch01.at:17'
2481 at_desc="fetch: nonexisting record"
2482 $at_quiet $as_echo_n " 11: $at_desc "
2484 echo "# -*- compilation -*-" >> "$at_group_log"
2486 $as_echo "11. dbmfetch01.at:17: testing ..."
2492 $as_echo "$at_srcdir/dbmfetch01.at:20:
2494 test $COMPAT -eq 1 || exit 77
2496 num2word 1:10000 | dtload test
2499 echo dbmfetch01.at:20 >"$at_check_line_file"
2501 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2505 test $COMPAT -eq 1 || exit 77
2507 num2word 1:10000 | dtload test
2509 ) >"$at_stdout" 2>"$at_stder1"
2510 at_func_filter_trace $?
2514 test $COMPAT -eq 1 || exit 77
2516 num2word 1:10000 | dtload test
2518 ) >"$at_stdout" 2>"$at_stderr"
2522 echo >>"$at_stderr"; $as_echo "dtfetch: 0: not found
2524 $at_diff - "$at_stderr" || at_failed=:
2525 at_func_diff_devnull "$at_stdout" || at_failed=:
2526 at_func_check_status 2 $at_status "$at_srcdir/dbmfetch01.at:20"
2528 $at_failed && at_func_log_failure
2533 $at_times_p && times >"$at_times_file"
2534 ) 5>&1 2>&1 | eval $at_tee_pipe
2535 at_status=`cat "$at_status_file"`
2538 # 12. dbmfetch02.at:17: fetch from a read-only database
2539 at_setup_line='dbmfetch02.at:17'
2541 at_desc="fetch from a read-only database"
2542 $at_quiet $as_echo_n " 12: $at_desc "
2544 echo "# -*- compilation -*-" >> "$at_group_log"
2546 $as_echo "12. dbmfetch02.at:17: testing ..."
2552 $as_echo "$at_srcdir/dbmfetch02.at:20:
2554 test $COMPAT -eq 1 || exit 77
2556 num2word 1:10 | dtload test
2557 chmod -w test.dir test.pag
2560 echo dbmfetch02.at:20 >"$at_check_line_file"
2562 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2566 test $COMPAT -eq 1 || exit 77
2568 num2word 1:10 | dtload test
2569 chmod -w test.dir test.pag
2571 ) >"$at_stdout" 2>"$at_stder1"
2572 at_func_filter_trace $?
2576 test $COMPAT -eq 1 || exit 77
2578 num2word 1:10 | dtload test
2579 chmod -w test.dir test.pag
2581 ) >"$at_stdout" 2>"$at_stderr"
2585 at_func_diff_devnull "$at_stderr" || at_failed=:
2586 echo >>"$at_stdout"; $as_echo "six
2589 $at_diff - "$at_stdout" || at_failed=:
2590 at_func_check_status 0 $at_status "$at_srcdir/dbmfetch02.at:20"
2592 $at_failed && at_func_log_failure
2597 $at_times_p && times >"$at_times_file"
2598 ) 5>&1 2>&1 | eval $at_tee_pipe
2599 at_status=`cat "$at_status_file"`
2602 # 13. dbmfetch03.at:17: fetch from a read-only 1.8-style database
2603 at_setup_line='dbmfetch03.at:17'
2605 at_desc="fetch from a read-only 1.8-style database"
2606 $at_quiet $as_echo_n " 13: $at_desc "
2608 echo "# -*- compilation -*-" >> "$at_group_log"
2610 $as_echo "13. dbmfetch03.at:17: testing ..."
2616 $as_echo "$at_srcdir/dbmfetch03.at:20:
2618 test $COMPAT -eq 1 || exit 77
2622 num2word 1:10 | dtload test
2624 ln test.pag test.dir
2625 chmod -w test.dir test.pag .
2628 echo dbmfetch03.at:20 >"$at_check_line_file"
2630 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2634 test $COMPAT -eq 1 || exit 77
2638 num2word 1:10 | dtload test
2640 ln test.pag test.dir
2641 chmod -w test.dir test.pag .
2643 ) >"$at_stdout" 2>"$at_stder1"
2644 at_func_filter_trace $?
2648 test $COMPAT -eq 1 || exit 77
2652 num2word 1:10 | dtload test
2654 ln test.pag test.dir
2655 chmod -w test.dir test.pag .
2657 ) >"$at_stdout" 2>"$at_stderr"
2661 at_func_diff_devnull "$at_stderr" || at_failed=:
2662 echo >>"$at_stdout"; $as_echo "six
2665 $at_diff - "$at_stdout" || at_failed=:
2666 at_func_check_status 0 $at_status "$at_srcdir/dbmfetch03.at:20"
2668 $at_failed && at_func_log_failure
2673 $at_times_p && times >"$at_times_file"
2674 ) 5>&1 2>&1 | eval $at_tee_pipe
2675 at_status=`cat "$at_status_file"`
2678 # 14. dbmdel00.at:17: delete a record
2679 at_setup_line='dbmdel00.at:17'
2681 at_desc="delete a record"
2682 $at_quiet $as_echo_n " 14: $at_desc "
2684 echo "# -*- compilation -*-" >> "$at_group_log"
2686 $as_echo "14. dbmdel00.at:17: testing ..."
2692 $as_echo "$at_srcdir/dbmdel00.at:20:
2694 test $COMPAT -eq 1 || exit 77
2697 test -z "`sort < /dev/null 2>&1`" || exit 77
2699 num2word 1:10 | dtload test
2701 dtdump test | sort -k1,2 -n
2703 echo dbmdel00.at:20 >"$at_check_line_file"
2705 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2709 test $COMPAT -eq 1 || exit 77
2712 test -z "`sort < /dev/null 2>&1`" || exit 77
2714 num2word 1:10 | dtload test
2716 dtdump test | sort -k1,2 -n
2717 ) >"$at_stdout" 2>"$at_stder1"
2718 at_func_filter_trace $?
2722 test $COMPAT -eq 1 || exit 77
2725 test -z "`sort < /dev/null 2>&1`" || exit 77
2727 num2word 1:10 | dtload test
2729 dtdump test | sort -k1,2 -n
2730 ) >"$at_stdout" 2>"$at_stderr"
2734 at_func_diff_devnull "$at_stderr" || at_failed=:
2735 echo >>"$at_stdout"; $as_echo "1 one
2745 $at_diff - "$at_stdout" || at_failed=:
2746 at_func_check_status 0 $at_status "$at_srcdir/dbmdel00.at:20"
2748 $at_failed && at_func_log_failure
2753 $at_times_p && times >"$at_times_file"
2754 ) 5>&1 2>&1 | eval $at_tee_pipe
2755 at_status=`cat "$at_status_file"`
2758 # 15. dbmdel01.at:17: delete: non existing record
2759 at_setup_line='dbmdel01.at:17'
2761 at_desc="delete: non existing record"
2762 $at_quiet $as_echo_n " 15: $at_desc "
2764 echo "# -*- compilation -*-" >> "$at_group_log"
2766 $as_echo "15. dbmdel01.at:17: testing ..."
2772 $as_echo "$at_srcdir/dbmdel01.at:20:
2774 test $COMPAT -eq 1 || exit 77
2777 test -z "`sort < /dev/null 2>&1`" || exit 77
2779 num2word 1:10 | dtload test
2782 echo dbmdel01.at:20 >"$at_check_line_file"
2784 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2788 test $COMPAT -eq 1 || exit 77
2791 test -z "`sort < /dev/null 2>&1`" || exit 77
2793 num2word 1:10 | dtload test
2795 ) >"$at_stdout" 2>"$at_stder1"
2796 at_func_filter_trace $?
2800 test $COMPAT -eq 1 || exit 77
2803 test -z "`sort < /dev/null 2>&1`" || exit 77
2805 num2word 1:10 | dtload test
2807 ) >"$at_stdout" 2>"$at_stderr"
2811 echo >>"$at_stderr"; $as_echo "dtdel: cannot delete 11: Item not found
2813 $at_diff - "$at_stderr" || at_failed=:
2814 at_func_diff_devnull "$at_stdout" || at_failed=:
2815 at_func_check_status 2 $at_status "$at_srcdir/dbmdel01.at:20"
2817 $at_failed && at_func_log_failure
2822 $at_times_p && times >"$at_times_file"
2823 ) 5>&1 2>&1 | eval $at_tee_pipe
2824 at_status=`cat "$at_status_file"`
2827 # 16. dbmdel02.at:17: delete: all records
2828 at_setup_line='dbmdel02.at:17'
2830 at_desc="delete: all records"
2831 $at_quiet $as_echo_n " 16: $at_desc "
2833 echo "# -*- compilation -*-" >> "$at_group_log"
2835 $as_echo "16. dbmdel02.at:17: testing ..."
2841 $as_echo "$at_srcdir/dbmdel02.at:20:
2843 test $COMPAT -eq 1 || exit 77
2845 num2word 1:10 | dtload test
2846 dtdel test 1 2 3 4 5 6 7 8 9 10
2849 echo dbmdel02.at:20 >"$at_check_line_file"
2851 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2855 test $COMPAT -eq 1 || exit 77
2857 num2word 1:10 | dtload test
2858 dtdel test 1 2 3 4 5 6 7 8 9 10
2860 ) >"$at_stdout" 2>"$at_stder1"
2861 at_func_filter_trace $?
2865 test $COMPAT -eq 1 || exit 77
2867 num2word 1:10 | dtload test
2868 dtdel test 1 2 3 4 5 6 7 8 9 10
2870 ) >"$at_stdout" 2>"$at_stderr"
2874 at_func_diff_devnull "$at_stderr" || at_failed=:
2875 at_func_diff_devnull "$at_stdout" || at_failed=:
2876 at_func_check_status 0 $at_status "$at_srcdir/dbmdel02.at:20"
2878 $at_failed && at_func_log_failure
2883 $at_times_p && times >"$at_times_file"
2884 ) 5>&1 2>&1 | eval $at_tee_pipe
2885 at_status=`cat "$at_status_file"`
2888 # 17. setopt00.at:17: setopt
2889 at_setup_line='setopt00.at:17'
2892 $at_quiet $as_echo_n " 17: $at_desc "
2894 echo "# -*- compilation -*-" >> "$at_group_log"
2896 $as_echo "17. setopt00.at:17: testing ..."
2902 $as_echo "$at_srcdir/setopt00.at:20:
2903 num2word 1:1000 | gtload test.db || exit 2
2904 gtopt test.db '!MMAP'
2906 echo setopt00.at:20 >"$at_check_line_file"
2908 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2911 num2word 1:1000 | gtload test.db || exit 2
2912 gtopt test.db '!MMAP'
2913 ) >"$at_stdout" 2>"$at_stder1"
2914 at_func_filter_trace $?
2917 num2word 1:1000 | gtload test.db || exit 2
2918 gtopt test.db '!MMAP'
2919 ) >"$at_stdout" 2>"$at_stderr"
2923 at_func_diff_devnull "$at_stderr" || at_failed=:
2924 echo >>"$at_stdout"; $as_echo "GDBM_GETFLAGS: PASS
2926 initial GDBM_SETCACHESIZE: PASS
2927 GDBM_GETCACHESIZE: PASS
2928 second GDBM_SETCACHESIZE: XFAIL
2930 initial GDBM_GETSYNCMODE: PASS
2931 GDBM_SETSYNCMODE: PASS
2932 GDBM_GETSYNCMODE: PASS
2933 GDBM_SETSYNCMODE true: PASS
2934 GDBM_GETSYNCMODE: PASS
2935 GDBM_SETSYNCMODE false: PASS
2936 GDBM_GETSYNCMODE: PASS
2938 initial GDBM_GETCENTFREE: PASS
2939 GDBM_SETCENTFREE: PASS
2940 GDBM_GETCENTFREE: FAIL
2941 GDBM_SETCENTFREE true: PASS
2942 GDBM_GETCENTFREE: FAIL
2943 GDBM_SETCENTFREE false: PASS
2944 GDBM_GETCENTFREE: FAIL
2946 initial GDBM_GETCOALESCEBLKS: PASS
2947 GDBM_SETCOALESCEBLKS: PASS
2948 GDBM_GETCOALESCEBLKS: PASS
2949 GDBM_SETCOALESCEBLKS true: PASS
2950 GDBM_GETCOALESCEBLKS: PASS
2951 GDBM_SETCOALESCEBLKS false: PASS
2952 GDBM_GETCOALESCEBLKS: PASS
2953 GDBM_GETDBNAME: PASS
2955 $at_diff - "$at_stdout" || at_failed=:
2956 at_func_check_status 0 $at_status "$at_srcdir/setopt00.at:20"
2958 $at_failed && at_func_log_failure
2963 $at_times_p && times >"$at_times_file"
2964 ) 5>&1 2>&1 | eval $at_tee_pipe
2965 at_status=`cat "$at_status_file"`
2968 # 18. setopt01.at:17: setopt: mmap options
2969 at_setup_line='setopt01.at:17'
2971 at_desc="setopt: mmap options"
2972 $at_quiet $as_echo_n " 18: $at_desc "
2974 echo "# -*- compilation -*-" >> "$at_group_log"
2976 $as_echo "18. setopt01.at:17: testing ..."
2982 $as_echo "$at_srcdir/setopt01.at:20:
2983 num2word 1:1000 | gtload test.db || exit 2
2984 gtopt test.db 'MMAP' > out
2985 grep 'MMAP: SKIP' out >/dev/null && exit 77
2988 echo setopt01.at:20 >"$at_check_line_file"
2990 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
2993 num2word 1:1000 | gtload test.db || exit 2
2994 gtopt test.db 'MMAP' > out
2995 grep 'MMAP: SKIP' out >/dev/null && exit 77
2997 ) >"$at_stdout" 2>"$at_stder1"
2998 at_func_filter_trace $?
3001 num2word 1:1000 | gtload test.db || exit 2
3002 gtopt test.db 'MMAP' > out
3003 grep 'MMAP: SKIP' out >/dev/null && exit 77
3005 ) >"$at_stdout" 2>"$at_stderr"
3009 at_func_diff_devnull "$at_stderr" || at_failed=:
3010 echo >>"$at_stdout"; $as_echo "* MMAP:
3011 initial GDBM_GETMMAP: PASS
3012 GDBM_SETMMAP false: PASS
3014 initial GDBM_GETMAXMAPSIZE: PASS
3015 GDBM_SETMAXMAPSIZE: PASS
3016 GDBM_GETMAXMAPSIZE: PASS
3018 $at_diff - "$at_stdout" || at_failed=:
3019 at_func_check_status 0 $at_status "$at_srcdir/setopt01.at:20"
3021 $at_failed && at_func_log_failure
3026 $at_times_p && times >"$at_times_file"
3027 ) 5>&1 2>&1 | eval $at_tee_pipe
3028 at_status=`cat "$at_status_file"`
3031 # 19. cloexec00.at:17: cloexec: gdbm_open
3032 at_setup_line='cloexec00.at:17'
3034 at_desc="cloexec: gdbm_open"
3035 $at_quiet $as_echo_n " 19: $at_desc "
3037 echo "# -*- compilation -*-" >> "$at_group_log"
3039 $as_echo "19. cloexec00.at:17: testing ..."
3045 $as_echo "$at_srcdir/cloexec00.at:20:
3046 g_open_ce \"\$abs_builddir/fdop\"
3048 echo cloexec00.at:20 >"$at_check_line_file"
3050 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
3053 g_open_ce "$abs_builddir/fdop"
3054 ) >"$at_stdout" 2>"$at_stder1"
3055 at_func_filter_trace $?
3058 g_open_ce "$abs_builddir/fdop"
3059 ) >"$at_stdout" 2>"$at_stderr"
3063 at_func_diff_devnull "$at_stderr" || at_failed=:
3064 at_func_diff_devnull "$at_stdout" || at_failed=:
3065 at_func_check_status 0 $at_status "$at_srcdir/cloexec00.at:20"
3067 $at_failed && at_func_log_failure
3072 $at_times_p && times >"$at_times_file"
3073 ) 5>&1 2>&1 | eval $at_tee_pipe
3074 at_status=`cat "$at_status_file"`
3077 # 20. cloexec01.at:17: cloexec: gdbm_reorganize
3078 at_setup_line='cloexec01.at:17'
3080 at_desc="cloexec: gdbm_reorganize"
3081 $at_quiet $as_echo_n " 20: $at_desc "
3083 echo "# -*- compilation -*-" >> "$at_group_log"
3085 $as_echo "20. cloexec01.at:17: testing ..."
3091 $as_echo "$at_srcdir/cloexec01.at:20:
3092 g_reorg_ce \"\$abs_builddir/fdop\"
3094 echo cloexec01.at:20 >"$at_check_line_file"
3096 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
3099 g_reorg_ce "$abs_builddir/fdop"
3100 ) >"$at_stdout" 2>"$at_stder1"
3101 at_func_filter_trace $?
3104 g_reorg_ce "$abs_builddir/fdop"
3105 ) >"$at_stdout" 2>"$at_stderr"
3109 at_func_diff_devnull "$at_stderr" || at_failed=:
3110 at_func_diff_devnull "$at_stdout" || at_failed=:
3111 at_func_check_status 0 $at_status "$at_srcdir/cloexec01.at:20"
3113 $at_failed && at_func_log_failure
3118 $at_times_p && times >"$at_times_file"
3119 ) 5>&1 2>&1 | eval $at_tee_pipe
3120 at_status=`cat "$at_status_file"`
3123 # 21. cloexec02.at:17: cloexec: dbm_open
3124 at_setup_line='cloexec02.at:17'
3126 at_desc="cloexec: dbm_open"
3127 $at_quiet $as_echo_n " 21: $at_desc "
3129 echo "# -*- compilation -*-" >> "$at_group_log"
3131 $as_echo "21. cloexec02.at:17: testing ..."
3137 $as_echo "$at_srcdir/cloexec02.at:20:
3139 test $COMPAT -eq 1 || exit 77
3141 num2word 1:10 | dtload file
3142 d_creat_ce \"\$abs_builddir/fdop\"
3144 echo cloexec02.at:20 >"$at_check_line_file"
3146 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
3150 test $COMPAT -eq 1 || exit 77
3152 num2word 1:10 | dtload file
3153 d_creat_ce "$abs_builddir/fdop"
3154 ) >"$at_stdout" 2>"$at_stder1"
3155 at_func_filter_trace $?
3159 test $COMPAT -eq 1 || exit 77
3161 num2word 1:10 | dtload file
3162 d_creat_ce "$abs_builddir/fdop"
3163 ) >"$at_stdout" 2>"$at_stderr"
3167 at_func_diff_devnull "$at_stderr" || at_failed=:
3168 at_func_diff_devnull "$at_stdout" || at_failed=:
3169 at_func_check_status 0 $at_status "$at_srcdir/cloexec02.at:20"
3171 $at_failed && at_func_log_failure
3176 $at_times_p && times >"$at_times_file"
3177 ) 5>&1 2>&1 | eval $at_tee_pipe
3178 at_status=`cat "$at_status_file"`
3181 # 22. cloexec03.at:17: cloexec: dbm_open -creat
3182 at_setup_line='cloexec03.at:17'
3184 at_desc="cloexec: dbm_open -creat"
3185 $at_quiet $as_echo_n " 22: $at_desc "
3187 echo "# -*- compilation -*-" >> "$at_group_log"
3189 $as_echo "22. cloexec03.at:17: testing ..."
3195 $as_echo "$at_srcdir/cloexec03.at:20:
3197 test $COMPAT -eq 1 || exit 77
3199 d_creat_ce \"\$abs_builddir/fdop\" -creat
3201 echo cloexec03.at:20 >"$at_check_line_file"
3203 if { echo 'Not enabling shell tracing (command contains an embedded newline)'
3207 test $COMPAT -eq 1 || exit 77
3209 d_creat_ce "$abs_builddir/fdop" -creat
3210 ) >"$at_stdout" 2>"$at_stder1"
3211 at_func_filter_trace $?
3215 test $COMPAT -eq 1 || exit 77
3217 d_creat_ce "$abs_builddir/fdop" -creat
3218 ) >"$at_stdout" 2>"$at_stderr"
3222 at_func_diff_devnull "$at_stderr" || at_failed=:
3223 at_func_diff_devnull "$at_stdout" || at_failed=:
3224 at_func_check_status 0 $at_status "$at_srcdir/cloexec03.at:20"
3226 $at_failed && at_func_log_failure
3231 $at_times_p && times >"$at_times_file"
3232 ) 5>&1 2>&1 | eval $at_tee_pipe
3233 at_status=`cat "$at_status_file"`