commit bash-20150731 snapshot

This commit is contained in:
Chet Ramey
2015-08-06 16:48:35 -04:00
parent 7afeb718cb
commit d54a780601
117 changed files with 354 additions and 197 deletions
+47
View File
@@ -9165,3 +9165,50 @@ input.c
doc/{bash.1,bashref.texi}
- note that the `return' builtin accepts arguments beginning with `-'
without requiring `--'
7/27
----
examples/loadables/Makefile.in
- add variables and targets to support `make install'; installs supported
builtins in $(libdir)/bash
7/28
----
lib/readline/{readline,rlprivate}.h, lib/readline/display.c
- rearrange some structure members for better alignment and to reduce
padding. Fix from <git-dpa@aegee.org>
tests/run-*
- use BASH_TSTOUT instead of hardcoded /tmp/xx as output file
trap.[ch]
- maybe_set_error_trap: set a trap for the ERR trap if it is not already
trapped; similar to maybe_set_debug_trap back from 4/10
lib/malloc/malloc.c
- internal_free: make sure `ubytes' is initialized if MALLOC_WATCH is defined
and we'll be passing it to _malloc_ckwatch. Report from Flavio Medeiros
<flaviomotamederios@gmail.com>
execute_cmd.c
- execute_function: use maybe_set_error_trap in the same way as
maybe_set_debug_trap. Fixes bug reported by David Waddell
<David.Waddell@owmobility.com>
7/29
----
jobs.c
- wait_for: no longer need to call job_signal_status when checking whether
a comsub shell reaped a child that died due to SIGINT; code now uses
child_caught_sigint
7/30
----
builtins/exec.def
- exec_builtin: after call to restore_original_signals, need to call
default_tty_job_signals to undo changes done by initialize_job_signals.
Fix for problem reported by Andreas Schwab <schwab@suse.de>
doc/{bash.1,bashref.texi}
- clarify definition of metacharacter to explicitly include newline;
prompted by report from George Gallo <georgeggallo@gmail.com>
+3 -1
View File
@@ -656,6 +656,7 @@ examples/complete/complete-examples f
examples/complete/bashcc-1.0.1.tar.gz f
examples/loadables/README f
examples/loadables/template.c f
examples/loadables/loadables.h f
examples/loadables/Makefile.in f
examples/loadables/necho.c f
examples/loadables/hello.c f
@@ -669,7 +670,8 @@ examples/loadables/truefalse.c f
examples/loadables/finfo.c f
examples/loadables/cat.c f
#examples/loadables/cut.c f
examples/loadables/logname.c f
examples/loadables/l
ogname.c f
examples/loadables/basename.c f
examples/loadables/dirname.c f
examples/loadables/tty.c f
+2
View File
@@ -210,6 +210,8 @@ exec_builtin (list)
#if defined (JOB_CONTROL)
if (subshell_environment == 0)
end_job_control ();
if (interactive || job_control)
default_tty_job_signals (); /* undo initialize_job_signals */
#endif /* JOB_CONTROL */
exit_value = shell_execve (command, args, env);
+6 -6
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Fri Jul 24 11:33:12 EDT 2015
.\" Last Change: Fri Jul 31 11:16:37 EDT 2015
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2015 July 24" "GNU Bash 4.4"
.TH BASH 1 "2015 July 31" "GNU Bash 4.4"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -477,8 +477,8 @@ A character that, when unquoted, separates words. One of the following:
.br
.RS
.PP
.if t \fB| & ; ( ) < > space tab\fP
.if n \fB| & ; ( ) < > space tab\fP
.if t \fB| & ; ( ) < > space tab newline\fP
.if n \fB| & ; ( ) < > space tab newline\fP
.RE
.PP
.TP
@@ -7589,8 +7589,8 @@ The
option inhibits the display of function definitions; only the
function name and attributes are printed.
If the \fBextdebug\fP shell option is enabled using \fBshopt\fP,
the source file name and line number where the function is defined
are displayed as well. The
the source file name and line number where each \fIname\fP
is defined are displayed as well. The
.B \-F
option implies
.BR \-f .
+2 -2
View File
@@ -243,7 +243,7 @@ A mechanism by which users can selectively stop (suspend) and restart
@item metacharacter
@cindex metacharacter
A character that, when unquoted, separates words. A metacharacter is
a @code{blank} or one of the following characters:
a @code{space}, @code{tab}, @code{newline}, or one of the following characters:
@samp{|}, @samp{&}, @samp{;}, @samp{(}, @samp{)}, @samp{<}, or
@samp{>}.
@@ -3998,7 +3998,7 @@ The @option{-F} option inhibits the display of function definitions;
only the function name and attributes are printed.
If the @code{extdebug} shell option is enabled using @code{shopt}
(@pxref{The Shopt Builtin}), the source file name and line number where
the function is defined are displayed as well.
each @var{name} is defined are displayed as well.
@option{-F} implies @option{-f}.
The @option{-g} option forces variables to be created or modified at
+2 -2
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2015 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Fri Jul 24 11:32:31 EDT 2015
@set LASTCHANGE Fri Jul 31 11:16:22 EDT 2015
@set EDITION 4.4
@set VERSION 4.4
@set UPDATED 24 July 2015
@set UPDATED 31 July 2015
@set UPDATED-MONTH July 2015
+26 -3
View File
@@ -27,12 +27,22 @@ infodir = @infodir@
includedir = @includedir@
datarootdir = @datarootdir@
loadablesdir = ${libdir}/bash
topdir = @top_srcdir@
BUILD_DIR = @BUILD_DIR@
srcdir = @srcdir@
VPATH = @srcdir@
# Support an alternate destination root directory for package building
DESTDIR =
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
INSTALLMODE= -m 0755
@SET_MAKE@
CC = @CC@
RM = rm -f
@@ -52,6 +62,8 @@ CPPFLAGS = @CPPFLAGS@
BASHINCDIR = ${topdir}/include
SUPPORT_SRC = $(topdir)/support/
LIBBUILD = ${BUILD_DIR}/lib
INTL_LIBSRC = ${topdir}/lib/intl
@@ -75,7 +87,7 @@ SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
SHOBJ_LIBS = @SHOBJ_LIBS@
SHOBJ_STATUS = @SHOBJ_STATUS@
INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins -I${srcdir} \
-I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \
-I$(BUILD_DIR)/builtins $(INTL_INC)
@@ -83,10 +95,10 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $<
ALLPROG = print truefalse sleep pushd finfo logname basename dirname \
ALLPROG = print truefalse sleep finfo logname basename dirname \
tty pathchk tee head mkdir rmdir printenv id whoami \
uname sync push ln unlink realpath strftime mypid
OTHERPROG = necho hello cat
OTHERPROG = necho hello cat pushd
all: $(SHOBJ_STATUS)
@@ -210,6 +222,17 @@ distclean maintainer-clean: clean
$(RM) Makefile pushd.c
-( cd perl && ${MAKE} ${MFLAGS} $@ )
installdirs:
@${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(loadablesdir)
install: all installdirs
@echo installing example loadable builtins in $(DESTDIR)${loadablesdir}
@for prog in ${ALLPROG}; do \
echo $$prog ; \
$(INSTALL_PROGRAM) $(INSTALLMODE) $$prog $(DESTDIR)$(loadablesdir)/$$prog ;\
done
print.o: print.c
truefalse.o: truefalse.c
sleep.o: sleep.c
+1
View File
@@ -31,6 +31,7 @@
#include "shell.h"
#include "common.h"
int
basename_builtin (list)
WORD_LIST *list;
{
+1
View File
@@ -31,6 +31,7 @@
#include "shell.h"
#include "common.h"
int
dirname_builtin (list)
WORD_LIST *list;
{
+6 -3
View File
@@ -39,6 +39,7 @@
#include "shell.h"
#include "builtins.h"
#include "common.h"
#include "getopt.h"
#ifndef errno
extern int errno;
@@ -46,8 +47,10 @@ extern int errno;
extern char **make_builtin_argv ();
static void perms();
static int printst();
static int printsome();
static void printmode();
static int printfinfo();
static int finfo_main();
@@ -192,7 +195,7 @@ int m;
return (m & (S_IRWXU|S_IRWXG|S_IRWXO|S_ISUID|S_ISGID));
}
static int
static void
perms(m)
int m;
{
@@ -236,7 +239,7 @@ int m;
printf ("u=%s,g=%s,o=%s", ubits, gbits, obits);
}
static int
static void
printmode(mode)
int mode;
{
@@ -262,7 +265,7 @@ int mode;
printf("\n");
}
static int
static int
printst(st)
struct stat *st;
{
+2
View File
@@ -88,8 +88,10 @@ file_head (fp, cnt)
break;
}
}
return (EXECUTION_SUCCESS);
}
int
head_builtin (list)
WORD_LIST *list;
{
+1 -3
View File
@@ -29,9 +29,7 @@
#include <stdio.h>
#include "builtins.h"
#include "shell.h"
#include "bashgetopt.h"
#include "loadables.h"
/* A builtin `xxx' is normally implemented with an `xxx_builtin' function.
If you're converting a command that uses the normal Unix argc/argv
+1
View File
@@ -50,6 +50,7 @@ typedef int unix_link_syscall_t __P((const char *, const char *));
static unix_link_syscall_t *linkfn;
static int dolink ();
int
ln_builtin (list)
WORD_LIST *list;
{
+34
View File
@@ -0,0 +1,34 @@
/* loadables.h -- Include files needed by all loadable builtins */
/* Copyright (C) 2015 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Bash is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bash. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __LOADABLES_H_
#define __LOADABLES_H_
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "builtins.h"
#include "shell.h"
#include "bashgetopt.h"
#include "common.h"
#endif
+1
View File
@@ -35,6 +35,7 @@
extern int errno;
#endif
int
logname_builtin (list)
WORD_LIST *list;
{
+4 -3
View File
@@ -98,6 +98,7 @@ extern char *strerror ();
static int validate_path ();
int
pathchk_builtin (list)
WORD_LIST *list;
{
@@ -323,7 +324,7 @@ validate_path (path, portability)
if (!last_elem)
{
exists = dir_ok (path);
if (dir_ok == 0)
if (exists == 0)
{
free (parent);
return 1;
@@ -370,8 +371,8 @@ validate_path (path, portability)
free (parent);
if (strlen (path) > path_max)
{
builtin_error ("path `%s' has length %d; exceeds limit of %d",
path, strlen (path), path_max);
builtin_error ("path `%s' has length %lu; exceeds limit of %d",
path, (unsigned long)strlen (path), path_max);
return 1;
}
+1
View File
@@ -60,6 +60,7 @@ extern int errno;
extern char *sh_realpath();
int
realpath_builtin(list)
WORD_LIST *list;
{
+1
View File
@@ -32,6 +32,7 @@
extern int errno;
#endif
int
rmdir_builtin (list)
WORD_LIST *list;
{
+1
View File
@@ -28,6 +28,7 @@
#include "shell.h"
#include "bashgetopt.h"
int
sync_builtin (list)
WORD_LIST *list;
{
+1
View File
@@ -60,6 +60,7 @@ extern int interrupt_immediately;
extern char *strerror ();
int
tee_builtin (list)
WORD_LIST *list;
{
+2 -3
View File
@@ -11,9 +11,7 @@
#include <stdio.h>
#include <errno.h>
#include "builtins.h"
#include "shell.h"
#include "bashgetopt.h"
#include "loadables.h"
#if !defined (errno)
extern int errno;
@@ -21,6 +19,7 @@ extern int errno;
extern char *strerror ();
int
template_builtin (list)
WORD_LIST *list;
{
+2
View File
@@ -25,12 +25,14 @@
#include "builtins.h"
#include "common.h"
int
true_builtin (list)
WORD_LIST *list;
{
return EXECUTION_SUCCESS;
}
int
false_builtin (list)
WORD_LIST *list;
{
+1
View File
@@ -30,6 +30,7 @@
extern char *ttyname ();
int
tty_builtin (list)
WORD_LIST *list;
{
+1
View File
@@ -63,6 +63,7 @@ static void uprint();
static int uname_flags;
int
uname_builtin (list)
WORD_LIST *list;
{
+1
View File
@@ -38,6 +38,7 @@
extern int errno;
#endif
int
unlink_builtin (list)
WORD_LIST *list;
{
+1
View File
@@ -28,6 +28,7 @@
#include "bashgetopt.h"
#include "common.h"
int
whoami_builtin (list)
WORD_LIST *list;
{
+1 -1
View File
@@ -4601,7 +4601,7 @@ execute_function (var, words, flags, fds_to_close, async, subshell)
{
error_trap = savestring (error_trap);
add_unwind_protect (xfree, error_trap);
add_unwind_protect (set_error_trap, error_trap);
add_unwind_protect (maybe_set_error_trap, error_trap);
}
restore_default_signal (ERROR_TRAP);
}
+4 -2
View File
@@ -169,6 +169,8 @@ extern int wait_intr_flag;
extern int wait_signal_received;
extern WORD_LIST *subst_assign_varlist;
extern SigHandler **original_signals;
static struct jobstats zerojs = { -1L, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NO_JOB, NO_JOB, 0, 0 };
struct jobstats js = { -1L, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NO_JOB, NO_JOB, 0, 0 };
@@ -2745,7 +2747,7 @@ if (job == NO_JOB)
something like a while loop or a for loop, simulate getting
and being killed by the SIGINT to pass the status back to our
parent. */
s = job_signal_status (job);
/* s = job_signal_status (job); /* XXX - no longer needed */
if (child_caught_sigint == 0 && signal_is_trapped (SIGINT) == 0)
{
@@ -3645,7 +3647,7 @@ set_job_status_and_cleanup (job)
In this case, we have to fix things up. What a crock. */
if (temp_handler == trap_handler && signal_is_trapped (SIGINT) == 0)
temp_handler = trap_to_sighandler (SIGINT);
restore_sigint_handler ();
restore_sigint_handler ();
if (temp_handler == SIG_DFL)
termsig_handler (SIGINT); /* XXX */
else if (temp_handler != SIG_IGN)
+2 -2
View File
@@ -866,8 +866,8 @@ internal_free (mem, file, line, flags)
p = (union mhead *) ap - 1;
}
#if defined (MALLOC_TRACE) || defined (MALLOC_REGISTER)
if (malloc_trace || malloc_register)
#if defined (MALLOC_TRACE) || defined (MALLOC_REGISTER) || defined (MALLOC_WATCH)
if (malloc_trace || malloc_register || _malloc_nwatch > 0)
ubytes = p->mh_nbytes;
#endif
+1 -1
View File
@@ -83,8 +83,8 @@ struct line_state
int *lbreaks;
int lbsize;
#if defined (HANDLE_MULTIBYTE)
int *wrapped_line;
int wbsize;
int *wrapped_line;
#endif
};
+3 -2
View File
@@ -884,8 +884,8 @@ struct readline_state {
int point;
int end;
int mark;
char *buffer;
int buflen;
char *buffer;
UNDO_LIST *ul;
char *prompt;
@@ -900,9 +900,10 @@ struct readline_state {
int edmode;
char *kseq;
int kseqlen;
int pendingin;
FILE *inf;
FILE *outf;
int pendingin;
char *macro;
/* signal state */
+4 -3
View File
@@ -125,10 +125,11 @@ typedef struct __rl_keyseq_context
int flags;
int subseq_arg;
int subseq_retval; /* XXX */
Keymap dmap;
Keymap oldmap;
int okey;
Keymap dmap;
Keymap oldmap;
struct __rl_keyseq_context *ocxt;
int childval;
} _rl_keyseq_cxt;
+2 -1
View File
@@ -4,6 +4,7 @@ PATH=$PATH:$BUILD_DIR
export THIS_SH PATH
rm -f /tmp/xx
export BASH_TSTOUT=/tmp/xx
rm -f ${BASH_TSTOUT}
/bin/sh "$@"
+3
View File
@@ -4,4 +4,7 @@ PATH=$PATH:$BUILD_DIR
export THIS_SH PATH
export BASH_TSTOUT=/tmp/xx
rm -f ${BASH_TSTOUT}
${THIS_SH} "$@"
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./alias.tests > /tmp/xx 2>&1
diff /tmp/xx alias.right && rm -f /tmp/xx
${THIS_SH} ./alias.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} alias.right && rm -f ${BASH_TSTOUT}
+4 -4
View File
@@ -3,10 +3,10 @@
: ${TMPDIR:=/tmp}
export TMPDIR
BASH_TMPOUT=/tmp/xx # for now
export BASH_TMPOUT
BASH_TSTOUT=/tmp/xx # for now
export BASH_TSTOUT
trap 'rm -f $BASH_TMPOUT' 0
trap 'rm -f $BASH_TSTOUT' 0
PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests'
export PATH
@@ -21,7 +21,7 @@ export THIS_SH
${THIS_SH} ./version
rm -f ${BASH_TMPOUT}
rm -f ${BASH_TSTOUT}
echo Any output from any test, unless otherwise noted, indicates a possible anomaly
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./appendop.tests > /tmp/xx 2>&1
diff /tmp/xx appendop.right && rm -f /tmp/xx
${THIS_SH} ./appendop.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} appendop.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./arith.tests > /tmp/xx 2>&1
diff /tmp/xx arith.right && rm -f /tmp/xx
${THIS_SH} ./arith.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} arith.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./arith-for.tests > /tmp/xx 2>&1
diff /tmp/xx arith-for.right && rm -f /tmp/xx
${THIS_SH} ./arith-for.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} arith-for.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -2,5 +2,5 @@ echo "warning: all of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell" >&2
echo "warning: the BASH_ARGC and BASH_ARGV tests will fail if debugging support" >&2
echo "warning: has not been compiled into the shell" >&2
${THIS_SH} ./array.tests > /tmp/xx 2>&1
diff /tmp/xx array.right && rm -f /tmp/xx
${THIS_SH} ./array.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} array.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
echo "warning: all of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell" >&2
${THIS_SH} ./array-at-star > /tmp/xx 2>&1
diff /tmp/xx array2.right && rm -f /tmp/xx
${THIS_SH} ./array-at-star > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} array2.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
echo "warning: all of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell" >&2
${THIS_SH} ./assoc.tests > /tmp/xx 2>&1
diff /tmp/xx assoc.right && rm -f /tmp/xx
${THIS_SH} ./assoc.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} assoc.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./braces.tests > /tmp/xx
diff /tmp/xx braces.right && rm -f /tmp/xx
${THIS_SH} ./braces.tests > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} braces.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -2,5 +2,5 @@ echo "warning: some of these tests may fail if process substitution has not" >&2
echo "warning: been compiled into the shell or if the OS does not provide" >&2
echo "warning: /dev/fd." >&2
${THIS_SH} ./builtins.tests > /tmp/xx 2>&1
diff /tmp/xx builtins.right && rm -f /tmp/xx
${THIS_SH} ./builtins.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} builtins.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./case.tests > /tmp/xx 2>&1
diff /tmp/xx case.right && rm -f /tmp/xx
${THIS_SH} ./case.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} case.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./casemod.tests > /tmp/xx 2>&1
diff /tmp/xx casemod.right && rm -f /tmp/xx
${THIS_SH} ./casemod.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} casemod.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./comsub.tests > /tmp/xx 2>&1
diff /tmp/xx comsub.right && rm -f /tmp/xx
${THIS_SH} ./comsub.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} comsub.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./comsub-eof.tests > /tmp/xx 2>&1
diff /tmp/xx comsub-eof.right && rm -f /tmp/xx
${THIS_SH} ./comsub-eof.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} comsub-eof.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./comsub-posix.tests > /tmp/xx 2>&1
diff /tmp/xx comsub-posix.right && rm -f /tmp/xx
${THIS_SH} ./comsub-posix.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} comsub-posix.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -3,5 +3,5 @@ echo "warning: been compiled into the shell" >&2
echo "warning: some of these tests will fail if extended pattern matching has not" >&2
echo "warning: been compiled into the shell" >&2
${THIS_SH} ./cond.tests > /tmp/xx 2>&1
diff /tmp/xx cond.right && rm -f /tmp/xx
${THIS_SH} ./cond.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} cond.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./coproc.tests > /tmp/xx 2>&1
diff /tmp/xx coproc.right && rm -f /tmp/xx
${THIS_SH} ./coproc.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} coproc.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./cprint.tests > /tmp/xx 2>&1
diff /tmp/xx cprint.right && rm -f /tmp/xx
${THIS_SH} ./cprint.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} cprint.right && rm -f ${BASH_TSTOUT}
Executable → Regular
View File
Executable → Regular
View File
+4 -4
View File
@@ -1,5 +1,5 @@
${THIS_SH} ./dstack.tests > /tmp/xx 2>&1
diff /tmp/xx dstack.right && rm -f /tmp/xx
${THIS_SH} ./dstack.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} dstack.right && rm -f ${BASH_TSTOUT}
${THIS_SH} ./dstack2.tests > /tmp/xx 2>&1
diff /tmp/xx dstack2.right && rm -f /tmp/xx
${THIS_SH} ./dstack2.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} dstack2.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./dollar-at-star > /tmp/xx 2>&1
diff /tmp/xx dollar.right && rm -f /tmp/xx
${THIS_SH} ./dollar-at-star > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} dollar.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./errors.tests > /tmp/xx 2>&1
diff /tmp/xx errors.right && rm -f /tmp/xx
${THIS_SH} ./errors.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} errors.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -5,5 +5,5 @@ echo "warning: \`/tmp/bash-notthere' not being found or \`/' being a directory"
echo "warning: produce diff output, please do not consider this a test failure" >&2
echo "warning: if diff output differing only in the location of the bash" >&2
echo "warning: binary appears, please do not consider this a test failure" >&2
${THIS_SH} ./execscript > /tmp/xx 2>&1
diff /tmp/xx exec.right && rm -f /tmp/xx
${THIS_SH} ./execscript > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} exec.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./exp.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx exp.right && rm -f /tmp/xx
${THIS_SH} ./exp.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} exp.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./exportfunc.tests > /tmp/xx 2>&1
diff /tmp/xx exportfunc.right && rm -f /tmp/xx
${THIS_SH} ./exportfunc.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} exportfunc.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
PATH=$PATH:`pwd`
export PATH
${THIS_SH} ./extglob.tests | grep -v '^expect' > /tmp/xx
diff /tmp/xx extglob.right && rm -f /tmp/xx
${THIS_SH} ./extglob.tests | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} extglob.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
PATH=$PATH:`pwd`
export PATH
${THIS_SH} ./extglob2.tests | grep -v '^expect' > /tmp/xx
diff /tmp/xx extglob2.right && rm -f /tmp/xx
${THIS_SH} ./extglob2.tests | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} extglob2.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
PATH=$PATH:`pwd`
export PATH
${THIS_SH} ./extglob3.tests > /tmp/xx
diff /tmp/xx extglob3.right && rm -f /tmp/xx
${THIS_SH} ./extglob3.tests > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} extglob3.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,5 +1,5 @@
echo "warning: if you have exported functions defined in your environment," >&2
echo "warning: they may show up as diff output." >&2
echo "warning: if so, please do not consider this a test failure" >&2
${THIS_SH} ./func.tests > /tmp/xx 2>&1
diff /tmp/xx func.right && rm -f /tmp/xx
${THIS_SH} ./func.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} func.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./getopts.tests > /tmp/xx 2>&1
diff /tmp/xx getopts.right && rm -f /tmp/xx
${THIS_SH} ./getopts.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} getopts.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
PATH=$PATH:`pwd`
export PATH
${THIS_SH} ./glob.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx glob.right && rm -f /tmp/xx
${THIS_SH} ./glob.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} glob.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
PATH=$PATH:`pwd`
export PATH
${THIS_SH} ./globstar.tests > /tmp/xx 2>&1
diff /tmp/xx globstar.right && rm -f /tmp/xx
${THIS_SH} ./globstar.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} globstar.right && rm -f ${BASH_TSTOUT}
+8 -1
View File
@@ -1,4 +1,11 @@
#! /bin/sh
: ${TMPDIR:=/tmp}
export TMPDIR
BASH_TSTOUT=/tmp/xx # for now
export BASH_TSTOUT
trap 'rm -f $BASH_TSTOUT' 0
PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests'
export PATH
@@ -15,7 +22,7 @@ rm -f gmon.sum
${THIS_SH} ./version
rm -f /tmp/xx
rm -f "$BASH_TSTOUT"
# prime the pump; gprof complains if gmon.sum is empty
[ -f bash.gmon ] && gprof -s ${THIS_SH} bash.gmon >/dev/null
+2 -2
View File
@@ -2,5 +2,5 @@ echo "warning: UNIX versions number signals and schedule processes differently."
echo "warning: If output differing only in line numbers is produced, please" >&2
echo "warning: do not consider this a test failure." >&2
${THIS_SH} ./heredoc.tests > /tmp/xx 2>&1
diff /tmp/xx heredoc.right && rm -f /tmp/xx
${THIS_SH} ./heredoc.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} heredoc.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./herestr.tests > /tmp/xx 2>&1
diff /tmp/xx herestr.right && rm -f /tmp/xx
${THIS_SH} ./herestr.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} herestr.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
echo "warning: all of these tests will fail if history has not been compiled" >&2
echo "warning: into the shell" >&2
${THIS_SH} ./histexp.tests > /tmp/xx 2>&1
diff /tmp/xx histexp.right && rm -f /tmp/xx
${THIS_SH} ./histexp.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} histexp.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
echo "warning: all of these tests will fail if history has not been compiled" >&2
echo "warning: into the shell" >&2
${THIS_SH} ./history.tests > /tmp/xx 2>&1
diff /tmp/xx history.right && rm -f /tmp/xx
${THIS_SH} ./history.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} history.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./ifs.tests > /tmp/xx 2>&1
diff /tmp/xx ifs.right && rm -f /tmp/xx
${THIS_SH} ./ifs.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} ifs.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./ifs-posix.tests > /tmp/xx 2>&1
diff /tmp/xx ifs-posix.right && rm -f /tmp/xx
${THIS_SH} ./ifs-posix.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} ifs-posix.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} < ./input-line.sh > /tmp/xx
diff /tmp/xx input.right && rm -f /tmp/xx
${THIS_SH} < ./input-line.sh > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} input.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -4,5 +4,5 @@
echo "warning: some of these tests will fail if you do not have UTF-8" >&2
echo "warning: locales installed on your system." >&2
${THIS_SH} ./intl.tests > /tmp/xx
diff $AFLAG /tmp/xx intl.right && rm -f /tmp/xx
${THIS_SH} ./intl.tests > ${BASH_TSTOUT}
diff $AFLAG ${BASH_TSTOUT} intl.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./invert.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx invert.right && rm -f /tmp/xx
${THIS_SH} ./invert.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} invert.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./iquote.tests >/tmp/xx 2>&1
diff /tmp/xx iquote.right && rm -f /tmp/xx
${THIS_SH} ./iquote.tests >${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} iquote.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -3,5 +3,5 @@ echo "warning: into the shell" >&2
echo "warning: there may be a message regarding a cat process dying due to a" >&2
echo "warning: SIGHUP. Please disregard." >&2
${THIS_SH} ./jobs.tests > /tmp/xx 2>&1
diff /tmp/xx jobs.right && rm -f /tmp/xx
${THIS_SH} ./jobs.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} jobs.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./lastpipe.tests > /tmp/xx 2>&1
diff /tmp/xx lastpipe.right && rm -f /tmp/xx
${THIS_SH} ./lastpipe.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} lastpipe.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./mapfile.tests > /tmp/xx 2>&1
diff /tmp/xx mapfile.right && rm -f /tmp/xx
${THIS_SH} ./mapfile.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} mapfile.right && rm -f ${BASH_TSTOUT}
+10 -1
View File
@@ -3,6 +3,15 @@
# run-minimal - a version of run-all for shells configured with
# --enable-minimal-config
#
: ${TMPDIR:=/tmp}
export TMPDIR
BASH_TSTOUT=/tmp/xx # for now
export BASH_TSTOUT
trap 'rm -f $BASH_TSTOUT' 0
PATH=.:$PATH # just to get the right version of printenv
export PATH
@@ -16,7 +25,7 @@ export THIS_SH
${THIS_SH} ./version.mini
rm -f /tmp/xx
rm -f "$BASH_TSTOUT"
echo Testing ${THIS_SH}
echo Any output from any test, unless otherwise noted, indicates a possible anomaly
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./more-exp.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx more-exp.right && rm -f /tmp/xx
${THIS_SH} ./more-exp.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} more-exp.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
echo "warning: some of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell" >&2
${THIS_SH} ./nameref.tests > /tmp/xx 2>&1
diff /tmp/xx nameref.right && rm -f /tmp/xx
${THIS_SH} ./nameref.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} nameref.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -6,5 +6,5 @@ echo "warning: if you have exported variables beginning with the string _Q," >&2
echo "warning: diff output may be generated. If so, please do not consider" >&2
echo "warning: this a test failure" >&2
${THIS_SH} ./new-exp.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx new-exp.right && rm -f /tmp/xx
${THIS_SH} ./new-exp.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} new-exp.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./nquote.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx nquote.right && rm -f /tmp/xx
${THIS_SH} ./nquote.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} nquote.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
echo "warning: several of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell." >&2
${THIS_SH} ./nquote1.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx nquote1.right && rm -f /tmp/xx
${THIS_SH} ./nquote1.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} nquote1.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
echo "warning: several of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell." >&2
${THIS_SH} ./nquote2.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx nquote2.right && rm -f /tmp/xx
${THIS_SH} ./nquote2.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} nquote2.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
echo "warning: several of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell." >&2
${THIS_SH} ./nquote3.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx nquote3.right && rm -f /tmp/xx
${THIS_SH} ./nquote3.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} nquote3.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,4 +1,4 @@
echo warning: some of these tests will fail if you do not have UTF-8 >&2
echo warning: locales installed on your system >&2
${THIS_SH} ./nquote4.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx nquote4.right && rm -f /tmp/xx
${THIS_SH} ./nquote4.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} nquote4.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./nquote5.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx nquote5.right && rm -f /tmp/xx
${THIS_SH} ./nquote5.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} nquote5.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./parser.tests > /tmp/xx 2>&1
diff /tmp/xx parser.right && rm -f /tmp/xx
${THIS_SH} ./parser.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} parser.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./posix2.tests 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx posix2.right && rm -f /tmp/xx
${THIS_SH} ./posix2.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} posix2.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./posixexp.tests > /tmp/xx 2>&1
diff /tmp/xx posixexp.right && rm -f /tmp/xx
${THIS_SH} ./posixexp.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} posixexp.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./posixexp2.tests > /tmp/xx 2>&1
diff /tmp/xx posixexp2.right && rm -f /tmp/xx
${THIS_SH} ./posixexp2.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} posixexp2.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./posixpat.tests > /tmp/xx
diff /tmp/xx posixpat.right && rm -f /tmp/xx
${THIS_SH} ./posixpat.tests > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} posixpat.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./posixpipe.tests > /tmp/xx 2>&1
diff /tmp/xx posixpipe.right && rm -f /tmp/xx
${THIS_SH} ./posixpipe.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} posixpipe.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./precedence > /tmp/xx
diff /tmp/xx prec.right && rm -f /tmp/xx
${THIS_SH} ./precedence > ${BASH_TSTOUT}
diff ${BASH_TSTOUT} prec.right && rm -f ${BASH_TSTOUT}
+3 -3
View File
@@ -2,6 +2,6 @@
#( diff -a ./printf.tests ./printf.tests >/dev/null 2>&1 ) && AFLAG=-a
# use cat -v (and assume it's there) to make control chars visible
${THIS_SH} ./printf.tests 2>&1 | cat -v > /tmp/xx
#diff $AFLAG /tmp/xx printf.right && rm -f /tmp/xx
diff /tmp/xx printf.right && rm -f /tmp/xx
${THIS_SH} ./printf.tests 2>&1 | cat -v > ${BASH_TSTOUT}
#diff $AFLAG ${BASH_TSTOUT} printf.right && rm -f ${BASH_TSTOUT}
diff ${BASH_TSTOUT} printf.right && rm -f ${BASH_TSTOUT}
+2 -2
View File
@@ -1,2 +1,2 @@
${THIS_SH} ./quote.tests >/tmp/xx 2>&1
diff /tmp/xx quote.right && rm -f /tmp/xx
${THIS_SH} ./quote.tests >${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} quote.right && rm -f ${BASH_TSTOUT}

Some files were not shown because too many files have changed in this diff Show More