From owner-svn-src-user@FreeBSD.ORG Mon Apr 12 23:11:21 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 628A4106566B; Mon, 12 Apr 2010 23:11:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EA318FC18; Mon, 12 Apr 2010 23:11:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CNBL75069295; Mon, 12 Apr 2010 23:11:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CNBLCN069266; Mon, 12 Apr 2010 23:11:21 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004122311.o3CNBLCN069266@svn.freebsd.org> From: Warner Losh Date: Mon, 12 Apr 2010 23:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206521 - in user/imp/tbemd: tools/build/mk tools/build/options tools/regression/aio/aiotest tools/regression/bin/sh/builtins tools/regression/bin/sh/errors tools/regression/bin/sh/expa... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 23:11:21 -0000 Author: imp Date: Mon Apr 12 23:11:20 2010 New Revision: 206521 URL: http://svn.freebsd.org/changeset/base/206521 Log: merge from head, part 7 of many. Added: user/imp/tbemd/tools/regression/bin/sh/builtins/command10.0 - copied unchanged from r206514, head/tools/regression/bin/sh/builtins/command10.0 user/imp/tbemd/tools/regression/bin/sh/builtins/command11.0 - copied unchanged from r206514, head/tools/regression/bin/sh/builtins/command11.0 user/imp/tbemd/tools/regression/bin/sh/builtins/command8.0 - copied unchanged from r206514, head/tools/regression/bin/sh/builtins/command8.0 user/imp/tbemd/tools/regression/bin/sh/builtins/command9.0 - copied unchanged from r206514, head/tools/regression/bin/sh/builtins/command9.0 user/imp/tbemd/tools/regression/bin/sh/builtins/var-assign2.0 - copied unchanged from r206514, head/tools/regression/bin/sh/builtins/var-assign2.0 user/imp/tbemd/tools/regression/bin/sh/errors/assignment-error1.0 - copied unchanged from r206514, head/tools/regression/bin/sh/errors/assignment-error1.0 user/imp/tbemd/tools/regression/bin/sh/errors/redirection-error3.0 - copied unchanged from r206514, head/tools/regression/bin/sh/errors/redirection-error3.0 user/imp/tbemd/tools/regression/bin/sh/errors/redirection-error4.0 - copied unchanged from r206514, head/tools/regression/bin/sh/errors/redirection-error4.0 user/imp/tbemd/tools/regression/bin/sh/errors/redirection-error5.0 - copied unchanged from r206514, head/tools/regression/bin/sh/errors/redirection-error5.0 user/imp/tbemd/tools/regression/bin/sh/errors/redirection-error6.0 - copied unchanged from r206514, head/tools/regression/bin/sh/errors/redirection-error6.0 user/imp/tbemd/tools/regression/bin/sh/expansion/arith4.0 - copied unchanged from r206514, head/tools/regression/bin/sh/expansion/arith4.0 user/imp/tbemd/tools/regression/bin/sh/expansion/arith5.0 - copied unchanged from r206514, head/tools/regression/bin/sh/expansion/arith5.0 user/imp/tbemd/tools/regression/bin/sh/expansion/assign1.0 - copied unchanged from r206514, head/tools/regression/bin/sh/expansion/assign1.0 user/imp/tbemd/tools/regression/bin/sh/expansion/cmdsubst2.0 - copied unchanged from r206514, head/tools/regression/bin/sh/expansion/cmdsubst2.0 user/imp/tbemd/tools/regression/bin/sh/expansion/plus-minus1.0 - copied unchanged from r206514, head/tools/regression/bin/sh/expansion/plus-minus1.0 user/imp/tbemd/tools/regression/bin/sh/expansion/plus-minus2.0 - copied unchanged from r206514, head/tools/regression/bin/sh/expansion/plus-minus2.0 user/imp/tbemd/tools/regression/bin/sh/expansion/tilde1.0 - copied unchanged from r206514, head/tools/regression/bin/sh/expansion/tilde1.0 user/imp/tbemd/tools/regression/bin/sh/expansion/tilde2.0 - copied unchanged from r206514, head/tools/regression/bin/sh/expansion/tilde2.0 user/imp/tbemd/tools/regression/bin/sh/expansion/trim1.0 - copied unchanged from r206514, head/tools/regression/bin/sh/expansion/trim1.0 user/imp/tbemd/tools/regression/bin/sh/expansion/trim2.0 - copied unchanged from r206514, head/tools/regression/bin/sh/expansion/trim2.0 user/imp/tbemd/tools/regression/bin/sh/parameters/pwd1.0 - copied unchanged from r206514, head/tools/regression/bin/sh/parameters/pwd1.0 user/imp/tbemd/tools/regression/bin/sh/parser/heredoc1.0 - copied unchanged from r206514, head/tools/regression/bin/sh/parser/heredoc1.0 user/imp/tbemd/tools/regression/bin/sh/parser/heredoc2.0 - copied unchanged from r206514, head/tools/regression/bin/sh/parser/heredoc2.0 user/imp/tbemd/tools/regression/usr.bin/apply/ - copied from r206514, head/tools/regression/usr.bin/apply/ user/imp/tbemd/tools/regression/usr.bin/ncal/ - copied from r206514, head/tools/regression/usr.bin/ncal/ user/imp/tbemd/usr.bin/calendar/dates.c - copied unchanged from r206514, head/usr.bin/calendar/dates.c user/imp/tbemd/usr.bin/calendar/events.c - copied unchanged from r206514, head/usr.bin/calendar/events.c user/imp/tbemd/usr.bin/calendar/locale.c - copied unchanged from r206514, head/usr.bin/calendar/locale.c user/imp/tbemd/usr.bin/calendar/parsedata.c - copied unchanged from r206514, head/usr.bin/calendar/parsedata.c user/imp/tbemd/usr.bin/calendar/pom.c - copied unchanged from r206514, head/usr.bin/calendar/pom.c user/imp/tbemd/usr.bin/calendar/sunpos.c - copied unchanged from r206514, head/usr.bin/calendar/sunpos.c user/imp/tbemd/usr.bin/procstat/procstat_sigs.c - copied unchanged from r206514, head/usr.bin/procstat/procstat_sigs.c user/imp/tbemd/usr.sbin/services_mkdb/ - copied from r206514, head/usr.sbin/services_mkdb/ Deleted: user/imp/tbemd/tools/build/options/WITH_GNU_CPIO user/imp/tbemd/tools/tools/nanobsd/pcengines/Pkg/ user/imp/tbemd/usr.sbin/ntp/ntptrace/ Modified: user/imp/tbemd/tools/build/mk/OptionalObsoleteFiles.inc user/imp/tbemd/tools/regression/aio/aiotest/aiotest.c user/imp/tbemd/tools/regression/mqueue/mqtest1/mqtest1.c user/imp/tbemd/tools/regression/mqueue/mqtest2/mqtest2.c user/imp/tbemd/tools/regression/mqueue/mqtest3/mqtest3.c user/imp/tbemd/tools/regression/mqueue/mqtest4/mqtest4.c user/imp/tbemd/tools/regression/mqueue/mqtest5/mqtest5.c user/imp/tbemd/tools/regression/posixsem/posixsem.c user/imp/tbemd/tools/regression/posixsem2/semtest.c user/imp/tbemd/tools/regression/usr.bin/Makefile user/imp/tbemd/tools/tools/nanobsd/Files/root/updatep1 user/imp/tbemd/tools/tools/nanobsd/Files/root/updatep2 user/imp/tbemd/tools/tools/nanobsd/gateworks/common user/imp/tbemd/tools/tools/nanobsd/nanobsd.sh user/imp/tbemd/usr.bin/apply/Makefile user/imp/tbemd/usr.bin/apply/apply.c user/imp/tbemd/usr.bin/biff/biff.1 user/imp/tbemd/usr.bin/calendar/Makefile user/imp/tbemd/usr.bin/calendar/calendar.1 user/imp/tbemd/usr.bin/calendar/calendar.c user/imp/tbemd/usr.bin/calendar/calendar.h user/imp/tbemd/usr.bin/calendar/calendars/calendar.australia user/imp/tbemd/usr.bin/calendar/calendars/calendar.dutch user/imp/tbemd/usr.bin/calendar/calendars/calendar.freebsd user/imp/tbemd/usr.bin/calendar/day.c user/imp/tbemd/usr.bin/calendar/io.c user/imp/tbemd/usr.bin/calendar/ostern.c user/imp/tbemd/usr.bin/calendar/paskha.c user/imp/tbemd/usr.bin/calendar/pathnames.h user/imp/tbemd/usr.bin/comm/comm.c user/imp/tbemd/usr.bin/compress/compress.c user/imp/tbemd/usr.bin/cpio/Makefile user/imp/tbemd/usr.bin/find/find.1 user/imp/tbemd/usr.bin/getent/getent.c user/imp/tbemd/usr.bin/gzip/gzip.1 user/imp/tbemd/usr.bin/gzip/gzip.c user/imp/tbemd/usr.bin/gzip/unbzip2.c user/imp/tbemd/usr.bin/indent/args.c user/imp/tbemd/usr.bin/indent/indent.1 user/imp/tbemd/usr.bin/indent/indent.c user/imp/tbemd/usr.bin/indent/indent_globs.h user/imp/tbemd/usr.bin/indent/lexi.c user/imp/tbemd/usr.bin/kdump/kdump.c user/imp/tbemd/usr.bin/mail/util.c user/imp/tbemd/usr.bin/make/main.c user/imp/tbemd/usr.bin/minigzip/Makefile user/imp/tbemd/usr.bin/ncal/ncal.1 user/imp/tbemd/usr.bin/ncal/ncal.c user/imp/tbemd/usr.bin/netstat/netgraph.c user/imp/tbemd/usr.bin/perror/perror.1 user/imp/tbemd/usr.bin/procstat/Makefile user/imp/tbemd/usr.bin/procstat/procstat.1 user/imp/tbemd/usr.bin/procstat/procstat.c user/imp/tbemd/usr.bin/procstat/procstat.h user/imp/tbemd/usr.bin/script/script.c user/imp/tbemd/usr.bin/sed/main.c user/imp/tbemd/usr.bin/sed/sed.1 user/imp/tbemd/usr.bin/sockstat/sockstat.c user/imp/tbemd/usr.bin/tar/bsdtar.1 user/imp/tbemd/usr.bin/tar/bsdtar.c user/imp/tbemd/usr.bin/tar/bsdtar_platform.h user/imp/tbemd/usr.bin/tar/matching.c user/imp/tbemd/usr.bin/tar/subst.c user/imp/tbemd/usr.bin/tar/tree.h user/imp/tbemd/usr.bin/tar/write.c user/imp/tbemd/usr.bin/touch/touch.c user/imp/tbemd/usr.bin/truss/amd64-fbsd.c user/imp/tbemd/usr.bin/truss/amd64-fbsd32.c user/imp/tbemd/usr.bin/truss/amd64-linux32.c user/imp/tbemd/usr.bin/truss/extern.h user/imp/tbemd/usr.bin/truss/i386-fbsd.c user/imp/tbemd/usr.bin/truss/i386-linux.c user/imp/tbemd/usr.bin/truss/ia64-fbsd.c user/imp/tbemd/usr.bin/truss/main.c user/imp/tbemd/usr.bin/truss/mips-fbsd.c user/imp/tbemd/usr.bin/truss/powerpc-fbsd.c user/imp/tbemd/usr.bin/truss/setup.c user/imp/tbemd/usr.bin/truss/sparc64-fbsd.c user/imp/tbemd/usr.bin/truss/syscalls.c user/imp/tbemd/usr.bin/truss/truss.h user/imp/tbemd/usr.bin/unifdef/unifdef.1 user/imp/tbemd/usr.bin/unifdef/unifdef.c user/imp/tbemd/usr.bin/unifdef/unifdefall.sh user/imp/tbemd/usr.bin/uniq/uniq.c user/imp/tbemd/usr.bin/xlint/lint1/decl.c user/imp/tbemd/usr.bin/xlint/lint1/lint1.h user/imp/tbemd/usr.bin/xlint/lint1/mem1.c user/imp/tbemd/usr.bin/xlint/lint1/scan.l user/imp/tbemd/usr.sbin/Makefile user/imp/tbemd/usr.sbin/ac/ac.c user/imp/tbemd/usr.sbin/acpi/acpidb/Makefile user/imp/tbemd/usr.sbin/acpi/iasl/Makefile user/imp/tbemd/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt user/imp/tbemd/usr.sbin/bsnmpd/modules/snmp_pf/Makefile user/imp/tbemd/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c user/imp/tbemd/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def user/imp/tbemd/usr.sbin/config/config.y user/imp/tbemd/usr.sbin/config/lang.l user/imp/tbemd/usr.sbin/config/main.c user/imp/tbemd/usr.sbin/config/mkmakefile.c user/imp/tbemd/usr.sbin/config/mkoptions.c user/imp/tbemd/usr.sbin/freebsd-update/freebsd-update.8 user/imp/tbemd/usr.sbin/jls/jls.c user/imp/tbemd/usr.sbin/lastlogin/lastlogin.8 user/imp/tbemd/usr.sbin/lastlogin/lastlogin.c user/imp/tbemd/usr.sbin/mailwrapper/mailwrapper.8 user/imp/tbemd/usr.sbin/mailwrapper/mailwrapper.c user/imp/tbemd/usr.sbin/mergemaster/mergemaster.8 user/imp/tbemd/usr.sbin/mergemaster/mergemaster.sh user/imp/tbemd/usr.sbin/mtree/compare.c user/imp/tbemd/usr.sbin/mtree/create.c user/imp/tbemd/usr.sbin/mtree/mtree.8 user/imp/tbemd/usr.sbin/pkg_install/add/futil.c user/imp/tbemd/usr.sbin/pkg_install/add/perform.c user/imp/tbemd/usr.sbin/pkg_install/delete/perform.c user/imp/tbemd/usr.sbin/pkg_install/lib/file.c user/imp/tbemd/usr.sbin/pkg_install/lib/lib.h user/imp/tbemd/usr.sbin/pkg_install/lib/match.c user/imp/tbemd/usr.sbin/pkg_install/lib/pen.c user/imp/tbemd/usr.sbin/pkg_install/lib/plist.c user/imp/tbemd/usr.sbin/pkg_install/lib/url.c user/imp/tbemd/usr.sbin/pkg_install/updating/pkg_updating.1 user/imp/tbemd/usr.sbin/pkg_install/version/perform.c user/imp/tbemd/usr.sbin/pmcannotate/pmcannotate.8 user/imp/tbemd/usr.sbin/pmcstat/pmcpl_callgraph.c user/imp/tbemd/usr.sbin/pmcstat/pmcpl_calltree.c user/imp/tbemd/usr.sbin/pmcstat/pmcstat.c user/imp/tbemd/usr.sbin/pmcstat/pmcstat_log.c user/imp/tbemd/usr.sbin/pmcstat/pmcstat_log.h user/imp/tbemd/usr.sbin/powerd/powerd.8 user/imp/tbemd/usr.sbin/ppp/arp.c user/imp/tbemd/usr.sbin/sysinstall/menus.c user/imp/tbemd/usr.sbin/sysinstall/sysinstall.8 user/imp/tbemd/usr.sbin/uhsoctl/uhsoctl.1 user/imp/tbemd/usr.sbin/vidcontrol/vidcontrol.c user/imp/tbemd/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c user/imp/tbemd/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 user/imp/tbemd/usr.sbin/zic/Makefile Modified: user/imp/tbemd/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- user/imp/tbemd/tools/build/mk/OptionalObsoleteFiles.inc Mon Apr 12 23:09:52 2010 (r206520) +++ user/imp/tbemd/tools/build/mk/OptionalObsoleteFiles.inc Mon Apr 12 23:11:20 2010 (r206521) @@ -776,12 +776,6 @@ OLD_FILES+=usr/share/man/man1/gdbserver. OLD_FILES+=usr/share/man/man1/kgdb.1.gz .endif -.if ${MK_GNU_CPIO} == no -OLD_FILES+=usr/bin/gcpio -OLD_FILES+=usr/share/info/cpio.info.gz -OLD_FILES+=usr/share/man/man1/gcpio.1.gz -.endif - .if ${MK_GPIB} == no OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h OLD_FILES+=usr/include/dev/ieee488/ugpib.h Modified: user/imp/tbemd/tools/regression/aio/aiotest/aiotest.c ============================================================================== --- user/imp/tbemd/tools/regression/aio/aiotest/aiotest.c Mon Apr 12 23:09:52 2010 (r206520) +++ user/imp/tbemd/tools/regression/aio/aiotest/aiotest.c Mon Apr 12 23:11:20 2010 (r206521) @@ -40,14 +40,17 @@ #include #include +#include #include #include #include #include #include +#include #include #include +#include #include #include #include Copied: user/imp/tbemd/tools/regression/bin/sh/builtins/command10.0 (from r206514, head/tools/regression/bin/sh/builtins/command10.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/builtins/command10.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/builtins/command10.0) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$(f() { shift x; }; { command eval f 2>/dev/null; } >/dev/null; echo hi)" = hi' + +exit $((failures > 0)) Copied: user/imp/tbemd/tools/regression/bin/sh/builtins/command11.0 (from r206514, head/tools/regression/bin/sh/builtins/command11.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/builtins/command11.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/builtins/command11.0) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$({ command eval \{ shift x\; \} 2\>/dev/null; } >/dev/null; echo hi)" = hi' + +exit $((failures > 0)) Copied: user/imp/tbemd/tools/regression/bin/sh/builtins/command8.0 (from r206514, head/tools/regression/bin/sh/builtins/command8.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/builtins/command8.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/builtins/command8.0) @@ -0,0 +1,45 @@ +# $FreeBSD$ +IFS=, + +SPECIAL="break,\ + :,\ + continue,\ + . /dev/null,\ + eval,\ + exec,\ + export -p,\ + readonly -p,\ + set,\ + shift 0,\ + times,\ + trap,\ + unset foo" + +set -e + +# Check that special builtins can be executed via "command". + +set -- ${SPECIAL} +for cmd in "$@" +do + sh -c "v=:; while \$v; do v=false; command ${cmd}; done" >/dev/null +done + +while :; do + command break + echo Error on line $LINENO +done + +set p q r +command shift 2 +if [ $# -ne 1 ]; then + echo Error on line $LINENO +fi + +( + command exec >/dev/null + echo Error on line $LINENO +) + +set +e +! command shift 2 2>/dev/null Copied: user/imp/tbemd/tools/regression/bin/sh/builtins/command9.0 (from r206514, head/tools/regression/bin/sh/builtins/command9.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/builtins/command9.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/builtins/command9.0) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$({ command eval shift x 2>/dev/null; } >/dev/null; echo hi)" = hi' + +exit $((failures > 0)) Copied: user/imp/tbemd/tools/regression/bin/sh/builtins/var-assign2.0 (from r206514, head/tools/regression/bin/sh/builtins/var-assign2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/builtins/var-assign2.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/builtins/var-assign2.0) @@ -0,0 +1,55 @@ +# $FreeBSD$ +IFS=, + +SPECIAL="break,\ + :,\ + continue,\ + . /dev/null,\ + eval,\ + exec,\ + export -p,\ + readonly -p,\ + set,\ + shift 0,\ + times,\ + trap,\ + unset foo" + +UTILS="alias,\ + bg,\ + bind,\ + cd,\ + command echo,\ + echo,\ + false,\ + fc -l,\ + fg,\ + getopts a var,\ + hash,\ + jobs,\ + printf a,\ + pwd,\ + read var < /dev/null,\ + test,\ + true,\ + type ls,\ + ulimit,\ + umask,\ + unalias -a,\ + wait" + +set -e + +# With 'command', variable assignments affect the shell environment. + +set -- ${SPECIAL} +for cmd in "$@" +do + sh -c "VAR=0; VAR=1 command ${cmd}; exit \${VAR}" >/dev/null 2>&1 +done + +set -- ${UTILS} +for cmd in "$@" +do + sh -c "VAR=0; VAR=1 command ${cmd}; exit \${VAR}" >/dev/null 2>&1 +done Copied: user/imp/tbemd/tools/regression/bin/sh/errors/assignment-error1.0 (from r206514, head/tools/regression/bin/sh/errors/assignment-error1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/errors/assignment-error1.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/errors/assignment-error1.0) @@ -0,0 +1,30 @@ +# $FreeBSD$ +IFS=, + +SPECIAL="break,\ + :,\ + continue,\ + . /dev/null,\ + eval,\ + exec,\ + export -p,\ + readonly -p,\ + set,\ + shift,\ + times,\ + trap,\ + unset foo" + +# If there is no command word, the shell must abort on an assignment error. +sh -c "readonly a=0; a=2; exit 0" 2>/dev/null && exit 1 + +# Special built-in utilities must abort on an assignment error. +set -- ${SPECIAL} +for cmd in "$@" +do + sh -c "readonly a=0; a=2 ${cmd}; exit 0" 2>/dev/null && exit 1 +done + +# Other utilities must not abort; we currently still execute them. +sh -c "readonly a=0; a=1 true; exit $a" 2>/dev/null || exit 1 +sh -c "readonly a=0; a=1 command :; exit $a" 2>/dev/null || exit 1 Copied: user/imp/tbemd/tools/regression/bin/sh/errors/redirection-error3.0 (from r206514, head/tools/regression/bin/sh/errors/redirection-error3.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/errors/redirection-error3.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/errors/redirection-error3.0) @@ -0,0 +1,54 @@ +# $FreeBSD$ +IFS=, + +SPECIAL="break,\ + :,\ + continue,\ + . /dev/null,\ + eval,\ + exec,\ + export -p,\ + readonly -p,\ + set,\ + shift,\ + times,\ + trap,\ + unset foo" + +UTILS="alias,\ + bg,\ + bind,\ + cd,\ + command echo,\ + echo,\ + false,\ + fc -l,\ + fg,\ + getopts a -a,\ + hash,\ + jobs,\ + printf a,\ + pwd,\ + read var < /dev/null,\ + test,\ + true,\ + type ls,\ + ulimit,\ + umask,\ + unalias -a,\ + wait" + +# When used with 'command', neither special built-in utilities nor other +# utilities must abort on a redirection error. + +set -- ${SPECIAL} +for cmd in "$@" +do + sh -c "command ${cmd} > /; exit 0" 2>/dev/null || exit 1 +done + +set -- ${UTILS} +for cmd in "$@" +do + sh -c "command ${cmd} > /; exit 0" 2>/dev/null || exit 1 +done Copied: user/imp/tbemd/tools/regression/bin/sh/errors/redirection-error4.0 (from r206514, head/tools/regression/bin/sh/errors/redirection-error4.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/errors/redirection-error4.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/errors/redirection-error4.0) @@ -0,0 +1,7 @@ +# $FreeBSD$ +# A redirection error should not abort the shell if there is no command word. +exec 2>/dev/null +/dev/null +( echo bad ) /dev/null +{ echo bad; } 0)) Copied: user/imp/tbemd/tools/regression/bin/sh/expansion/plus-minus1.0 (from r206514, head/tools/regression/bin/sh/expansion/plus-minus1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/expansion/plus-minus1.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/expansion/plus-minus1.0) @@ -0,0 +1,81 @@ +# $FreeBSD$ + +e= q='?' a='*' t=texttext s='ast*que?non' p='/et[c]/' w='a b c' b='{{(#)}}' +h='##' +failures='' +ok='' + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- a b' '2|a|b' +testcase 'set --' '0|' +testcase 'set -- ${e}' '0|' +testcase 'set -- "${e}"' '1|' + +testcase 'set -- $p' '1|/etc/' +testcase 'set -- "$p"' '1|/et[c]/' +testcase 'set -- ${s+$p}' '1|/etc/' +testcase 'set -- "${s+$p}"' '1|/et[c]/' +testcase 'set -- ${s+"$p"}' '1|/et[c]/' +# Dquotes in dquotes is undefined for Bourne shell operators +#testcase 'set -- "${s+"$p"}"' '1|/et[c]/' +testcase 'set -- ${e:-$p}' '1|/etc/' +testcase 'set -- "${e:-$p}"' '1|/et[c]/' +testcase 'set -- ${e:-"$p"}' '1|/et[c]/' +# Dquotes in dquotes is undefined for Bourne shell operators +#testcase 'set -- "${e:-"$p"}"' '1|/et[c]/' +testcase 'set -- ${e:+"$e"}' '0|' +testcase 'set -- ${e:+$w"$e"}' '0|' +testcase 'set -- ${w:+"$w"}' '1|a b c' +testcase 'set -- ${w:+$w"$w"}' '3|a|b|ca b c' + +# These two are known broken in FreeBSD /bin/sh +#testcase 'set -- ${s+a b}' '2|a|b' +#testcase 'set -- ${e:-a b}' '2|a|b' +testcase 'set -- "${s+a b}"' '1|a b' +testcase 'set -- "${e:-a b}"' '1|a b' +testcase 'set -- ${e:-\}}' '1|}' +# Currently broken in FreeBSD /bin/sh +#testcase 'set -- "${e:-\}}"' '1|}' +testcase 'set -- ${e:+{}}' '1|}' +testcase 'set -- "${e:+{}}"' '1|}' + +testcase 'set -- ${e+x}${e+x}' '1|xx' +testcase 'set -- "${e+x}"${e+x}' '1|xx' +testcase 'set -- ${e+x}"${e+x}"' '1|xx' +testcase 'set -- "${e+x}${e+x}"' '1|xx' +testcase 'set -- "${e+x}""${e+x}"' '1|xx' + +testcase 'set -- ${e:-${e:-$p}}' '1|/etc/' +testcase 'set -- "${e:-${e:-$p}}"' '1|/et[c]/' +testcase 'set -- ${e:-"${e:-$p}"}' '1|/et[c]/' +testcase 'set -- ${e:-${e:-"$p"}}' '1|/et[c]/' +testcase 'set -- ${e:-${e:-${e:-$w}}}' '3|a|b|c' +testcase 'set -- ${e:-${e:-${e:-"$w"}}}' '1|a b c' +testcase 'set -- ${e:-${e:-"${e:-$w}"}}' '1|a b c' +testcase 'set -- ${e:-"${e:-${e:-$w}}"}' '1|a b c' +testcase 'set -- "${e:-${e:-${e:-$w}}}"' '1|a b c' + +testcase 'shift $#; set -- ${1+"$@"}' '0|' +testcase 'set -- ""; set -- ${1+"$@"}' '1|' +testcase 'set -- "" a; set -- ${1+"$@"}' '2||a' +testcase 'set -- a ""; set -- ${1+"$@"}' '2|a|' +testcase 'set -- a b; set -- ${1+"$@"}' '2|a|b' +testcase 'set -- a\ b; set -- ${1+"$@"}' '1|a b' +testcase 'set -- " " ""; set -- ${1+"$@"}' '2| |' + +test "x$failures" = x Copied: user/imp/tbemd/tools/regression/bin/sh/expansion/plus-minus2.0 (from r206514, head/tools/regression/bin/sh/expansion/plus-minus2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/expansion/plus-minus2.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/expansion/plus-minus2.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +e= +test "${e:-\}}" = '}' Copied: user/imp/tbemd/tools/regression/bin/sh/expansion/tilde1.0 (from r206514, head/tools/regression/bin/sh/expansion/tilde1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/tbemd/tools/regression/bin/sh/expansion/tilde1.0 Mon Apr 12 23:11:20 2010 (r206521, copy of r206514, head/tools/regression/bin/sh/expansion/tilde1.0) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +HOME=/tmp +roothome=~root +if [ "$roothome" = "~root" ]; then + echo "~root is not expanded!" + exit 2 +fi + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- ~' '1|/tmp' +testcase 'set -- ~/foo' '1|/tmp/foo' +testcase 'set -- x~' '1|x~' +testcase 'set -- ~root' "1|$roothome" +h=~ +testcase 'set -- "$h"' '1|/tmp' +ooIFS=$IFS +IFS=m +testcase 'set -- ~' '1|/tmp' +testcase 'set -- ~/foo' '1|/tmp/foo' +testcase 'set -- $h' '2|/t|p' +IFS=$ooIFS +t=\~ +testcase 'set -- $t' '1|~' +r=$(cat < -#include +#include +#include #include +#include #include -#include +#include #define MQNAME "/mytstqueue1" Modified: user/imp/tbemd/tools/regression/mqueue/mqtest2/mqtest2.c ============================================================================== --- user/imp/tbemd/tools/regression/mqueue/mqtest2/mqtest2.c Mon Apr 12 23:09:52 2010 (r206520) *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***