313488 |
09-Feb-2017 |
ngie |
MFC r289172,r290254:
r289172:
Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and netbsd-tests.test.mk (r289151)
- Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity
r290254:
Remove unused variable (SRCDIR) |
307423 |
16-Oct-2016 |
sevan |
MFC r306722: Add history section for test(1) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/test.c
PR: 211789 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104 |
297767 |
09-Apr-2016 |
jilles |
MFC r259017: test: Avoid looking up again the type of a known binary operator. |
297766 |
09-Apr-2016 |
jilles |
MFC r258799: test: Simplify the code by unifying op_num and op_type.
The global variable t_wp_op is no longer needed. |
289969 |
26-Oct-2015 |
ngie |
MFC r289488:
Clean up trailing whitespace |
264483 |
14-Apr-2014 |
jmmv |
MFC refactoring of the *.test.mk files.
- r263161 Make bsd.test.mk the only public mk fragment for the building of tests. - r263172 Move FreeBSD Test Suite-specific code to a suite.test.mk file. - r263204 Add some documentation for bsd.test.mk. - r263217 Document support for TAP-compliant Perl test programs.
This is "make tinderbox" clean. |
262951 |
09-Mar-2014 |
jmmv |
Sync sh(1) in stable/10 to head.
This is a MFC of all the commits listed below.
My original goal of this change was to only merge the move of the tests from tools/regression/bin/ into the new layout (which include tests for sh(1) and other tools as well). However, doing so is tricky due to the ongoing work in sh(1) and, especially, the many changes to its tests since stable/10 was first branched.
Merging everything is the simplest way to achieve this goal and, as a bonus point, we get various fixes and miscellaneous improvements into the branch.
Per jilles' suggestion, I'm avoiding the merge of a couple of changes (r256850 and r257506) that required depending kernel changes. I'm also avoiding very recent changes that have not had a long enough time to be validated in current.
This is "make tinderbox" clean.
r256735 sh: Remove one syscall when waiting for a foreground job. r257399 sh: Allow trapping SIGINT/SIGQUIT after ignore because of '&'. r257504 sh: Reorder union node to reduce its size on 64-bit platforms. r257920 sh: Add a test case for would-be assignments that are not due to quoting. r257929 sh: Properly quote alias output from command -v. r258489 sh: Add tests for the </dev/null implicit in a background command. r258533 sh: Add more tests for the </dev/null implicit in a background command. r258535 sh: Make <&0 disable the </dev/null implicit in a background command. r258776 sh: Prefer memcpy() to strcpy() in most cases. Remove the scopy macro. r259047 sh: Split set -x output into a separate function. r259210 Migrate tools/regression/bin/ tests to the new layout. r259844 sh: Remove an unused variable. r259846 sh: Initialize OPTIND=1 even if it came from the environment. r259874 sh: Simplify code related to PPID variable. r259946 sh: Don't check input for non-whitespace if history is disabled. r260246 sh(1): Discourage use of -e. r260506 Run the sh(1) and test(1) tests as unprivileged. r260586 Mark the bin/pax tests as requiring perl. r260634 Use TAP_TESTS_PERL to register the legacy_test in bin/pax. r260635 Replace hand-crafted Kyuafiles with automatic generation. r260654 sh: Remove SIGWINCH handler and just check for resize before every read. r261121 sh: Add test for nested alias. r261125 sh: Solve the alias recursion problem in a less hackish way. r261141 sh: Do not depend on parse/execute split in new alias test. r261160 sh: Add tests for alias names after another alias. r261192 sh: Allow aliases to force alias substitution on the following word. r262533 sh: Make expari() static. r262565 sh: Do not corrupt internal representation if LINENO inner expansion fails. r262697 sh: Simplify expari().
Reviewed by: jilles |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
251211 |
31-May-2013 |
jilles |
test(1): Add information about replacing -nt/-ot.
|
251209 |
31-May-2013 |
jilles |
test(1): List non-standard primaries.
|
251208 |
31-May-2013 |
jilles |
test: Remove -ntXY and -otXY primaries.
This reverts commit r247274.
As maintainer of sh, I disapprove of this feature addition.
It is too specific and can be done without easily using find(1) or stat(1). I will add some hints to the test(1) man page shortly.
In general, FreeBSD sh is not the place to invent new shell language features. This is how it has been maintained and adding features randomly does not work with that.
The new syntax (e.g. [ FILE1 -ntca FILE2 ]) looks cryptic to me.
|
247274 |
25-Feb-2013 |
peterj |
Enhance test(1) by adding provision to compare any combination of the access, birth, change and modify times of two files, instead of only being able to compare modify times. The builtin test in sh(1) will automagically acquire the same expansion.
Approved by: grog MFC after: 2 weeks
|
244734 |
27-Dec-2012 |
jilles |
test(1): Document == alias for =.
Reviewed by: gjb Requested by: gjb MFC after: 1 week
|
235400 |
13-May-2012 |
joel |
Minor mdoc nits.
|
227984 |
25-Nov-2011 |
jilles |
test: Reduce code size of ops table.
|
226961 |
31-Oct-2011 |
ed |
Put some static keywords in the source code.
For these simple utilities, it doesn't harm to make all global variables static. In fact, this allows the compiler to perform better forms of optimisation and analysis.
|
219680 |
15-Mar-2011 |
jilles |
bin: Prefer strrchr() to rindex().
This removes the last index/rindex usage from /bin.
|
219084 |
27-Feb-2011 |
delphij |
Accept == as an alias of = which is a popular GNU extension.
This is intentionally undocumented for now since it's not part of any standard.
MFC after: 1 month
|
218724 |
15-Feb-2011 |
jilles |
test: Note that this is used both as a normal program and a shell builtin.
MFC after: 1 week
|
215022 |
08-Nov-2010 |
jilles |
test: Move tests to tools/regression/bin/test. Convert the tests to the perl prove format. Remove obsolete TEST.README (results of an old TEST.sh for some old Unices) and TEST.csh (old tests without correct values, far less complete than TEST.sh).
MFC after: 1 week
|
212463 |
11-Sep-2010 |
brucec |
Revert changes of 'assure' to 'ensure' made in r211936.
Approved by: rrs (mentor)
|
212419 |
10-Sep-2010 |
jilles |
test(1): Fix markup, ( and ) must be separate arguments so leave spaces.
MFC after: 1 week
|
212418 |
10-Sep-2010 |
jilles |
test(1): Clarify grammar ambiguity and -a/-o vs shell &&/||.
|
211936 |
28-Aug-2010 |
brucec |
Fix incorrect usage of 'assure' and 'insure'.
Approved by: rrs (mentor)
|
205793 |
28-Mar-2010 |
ed |
Change all our own code to use st_*tim instead of st_*timespec.
Also remove some local patches to diff(1) which are now unneeded.
|
192862 |
26-May-2009 |
jilles |
Fix various cases with 3 or 4 parameters in test(1) to be POSIX compliant. More precisely, this gives precedence to an interpretation not using the '(', ')', '-a' and '-o' in their special meaning, if possible. For example, it is now safe to write [ "$a" = "$b" ] and assume it compares the two strings.
The man page already says that test(1) works this way, so does not need to be changed.
Interpretation of input with more parameters tries a bit harder to find a valid parse in some cases.
Add various additional test cases to TEST.sh.
PR: standards/133369 Approved by: ed (mentor)
|
186849 |
07-Jan-2009 |
danger |
- rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change
Approved by: ru MFC after: 3 days
|
165202 |
14-Dec-2006 |
ru |
Simplify some markup.
|
160848 |
31-Jul-2006 |
yar |
Granting the amount of misunderstanding the last change received, extend it with an example to clarify the point.
|
160760 |
27-Jul-2006 |
yar |
Document that both sides of -a or -o are always evaluated. This "feature" doesn't seem to be in the standards or elsewhere, and it is against what we are used to in C and sh(1), so put the paragraph under BUGS.
Pointed out by: dougb MFC after: 3 days
|
139969 |
10-Jan-2005 |
imp |
/*- or .\"- or #- to begin license clauses.
|
131512 |
03-Jul-2004 |
tjr |
Clarify: test compares strings by binary value, not "ASCII value".
|
131484 |
02-Jul-2004 |
ru |
Mechanically kill hard sentence breaks.
|
130594 |
16-Jun-2004 |
maxim |
Typo: s/SunOP/SunOS/g.
|
130190 |
07-Jun-2004 |
yar |
Remove a duplicated description of the test for the null string.
MFC after: 3 days
|
130189 |
07-Jun-2004 |
yar |
Describe how test(1) will evaluate its expressions for a symlink.
Inspired by: SUSv3 MFC after: 1 week
|
127958 |
06-Apr-2004 |
markm |
Remove clause 3 from the UCB licenses.
OK'ed by: imp, core
|
119837 |
07-Sep-2003 |
ru |
Don't escape names in MLINKS: this won't work with bsd.man.mk,v 1.53.
|
101923 |
15-Aug-2002 |
maxim |
o Backout rev. 1.40 and rev. 1.49. o Add argv[] boudary check.
PR: bin/40117 Reviewed by: silence on -audit MFC after: 2 months
|
100774 |
27-Jul-2002 |
dwmalone |
Make test check the tv_nsec part of a struct stat when comparing the mtimes of a file. (This is probably only useful if you have vfs.timestamp_precision set to something nonzero).
PR: 39163 Submitted by: Hal Burch <hburch@lumeta.com> MFC after: 2 weeks
|
99436 |
05-Jul-2002 |
maxim |
Fix a memory leak.
PR: bin/40177 MFC after: 1 week
|
99110 |
30-Jun-2002 |
obrien |
Consistently use FBSDID
|
96376 |
11-May-2002 |
alfred |
while i'm breaking stuff, use __dead2 instead of GCC specific __attribute__.
|
96375 |
11-May-2002 |
alfred |
backout additional include of cdefs.h, it's not helping any.
|
96374 |
11-May-2002 |
alfred |
include cdefs.h for __printf0like to silence warning.
|
93345 |
28-Mar-2002 |
ache |
Use intmax_t as quad_t replacement, like in expr
|
91737 |
06-Mar-2002 |
maxim |
Log: Remove eaccess(2) absence workaround. Add eaccess(2) checks for FILRD, FILWR, FILEX and FILEXIST cases.
We cannot MFC this because there is no eaccess(2) in -stable yet.
PR: bin/35076 Reviewed by: ru Approved by: ru
|
90157 |
04-Feb-2002 |
kris |
__printflike() should really be __printf0like() since verrx() can accept a NULL format string.
|
90156 |
04-Feb-2002 |
kris |
Add a __printflike() attribute to silence warning with FORMAT_AUDIT=1
|
90133 |
03-Feb-2002 |
knu |
Work around a buffer overflow problem on argv that has been exposed after making test(1) a sh(1) builtin; sh(1) coredumps when you run something like this:
sh -c 'test ! `true 1`'
The cause is that the test(1) code totally depends on the presence of two extra cells at the end of argv that are filled with NULL's. The reason why the bug hasn't been exposed would be because the C startup code kindly prepares argv with some extra zeroed cells for a program.
I know this is not the best fix, but since there are argv++'s without boundary checks everywhere, I'd rather patch it up like this (preparing a copy of argv with extra NULL's) for the moment.
MFC after: 3 days
|
90111 |
02-Feb-2002 |
imp |
o __P has been reoved o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o Change int foo() { ... to int foo(void) { ...
|
88471 |
25-Dec-2001 |
ache |
strtoq -> strtoll (strtoq is deprecated)
|
88084 |
17-Dec-2001 |
ache |
1) Localize (LC_CTYPE) 2) Catch "" to 0 conversion for OSes that not catch it in strto*() (f.e. -stable). It is needed because POSIX agrees with both variants.
|
87961 |
14-Dec-2001 |
ache |
POSIX strto*() functions MAY return EINVAL, so don't assume that only one errno from them allowed and it is always ERANGE
|
87323 |
04-Dec-2001 |
obrien |
Default to WARNS=2. Binary builds that cannot handle this must explicitly set WARNS=0.
Reviewed by: mike
|
86622 |
19-Nov-2001 |
knu |
Fix style bugs I found, and add a comment.
|
86619 |
19-Nov-2001 |
knu |
Oops sorry, forgot to add a #include.
|
86618 |
19-Nov-2001 |
knu |
- Do not reference argv[1] if no argument is given.
Reported by: brian
- Call error() instead of errx() if compiled as sh(1) builtin.
|
86505 |
17-Nov-2001 |
knu |
Make test(1) a builtin command of our sh(1) for efficiency. The binary size increase is 3,784 bytes (about 0.6%).
I don't drop the printf builtin while I'm here because some /etc/rc.* scripts seem to use it before mounting /usr where printf(1) resides.
Reviewed by: arch (sheldonh) Inspired by: NetBSD, ksh Clued by: ume (on how the printf builtin is used)
|
82661 |
31-Aug-2001 |
dd |
The file_descriptor argument to -t isn't optional, so don't mark it up so.
|
81251 |
07-Aug-2001 |
ru |
mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text. Not only this slows down the mdoc(7) processing significantly, but it also has an undesired (in this case) effect of disabling hyphenation within the entire enclosed block.
|
79754 |
15-Jul-2001 |
dd |
Remove whitespace at EOL.
|
78624 |
22-Jun-2001 |
dd |
WARNS= -> WARNS?=
Submitted by: Mike Barcroft <mike@q9media.com>
|
76883 |
20-May-2001 |
kris |
Silence WARNS=2 and BDECFLAGS on alpha and i386
MFC After: 1 week
|
68935 |
20-Nov-2000 |
ru |
mdoc(7) police: use the new features of the Nm macro.
|
68875 |
18-Nov-2000 |
ru |
mdoc(7) police: now that Nm macro accepts punctuation characters as argument, unbreak this page by escaping the `[' character.
Noticed by: sheldonh
|
62925 |
10-Jul-2000 |
se |
Add support for 64bit integer comparisons.
|
60126 |
07-May-2000 |
kris |
Remove test for block device.
|
57663 |
01-Mar-2000 |
sheldonh |
Remove single-space hard sentence breaks. These degrade the quality of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
|
55179 |
28-Dec-1999 |
sheldonh |
Take into account the fact that "[" may be called with a path, for example "/bin/[".
Reported by: Vlad Skvortsov <vss@ulstu.ru> Reported by: Peter Jeremy <peter.jeremy@alcatel.com.au> Message-Id: 99Dec27.111307est.40321@border.alcanet.com.au
|
50471 |
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
50302 |
24-Aug-1999 |
green |
Make the comments nice, short-but-sweet XXX format.
Submitted by: sheldonh
|
50189 |
22-Aug-1999 |
green |
Make a comment I added a bit nicer.
|
50087 |
20-Aug-1999 |
green |
Finally: fix test -x as completely as possible.
Reviewed by: bde Reworked by: bde
|
49993 |
18-Aug-1999 |
green |
The new test(1) did not use access() correctly. I don't know why, since supposedly it's ksh-derived, and it's not broken in pdksh. I've added a test for test running as root: if testing for -x, the file must be mode & 0111 to get "success", rather than just existant.
Reviewed by: chris
|
49884 |
16-Aug-1999 |
sheldonh |
Replace our test(1) with NetBSD's pdksh-derived version. The code is significantly easier to read and extend and offers a few new tests. A few style changes taken from style(9) and OpenBSD, as well as whitespace cleanups.
This change was discussed on freebsd-committers and freebsd-hackers and met with approval from at least des, eivind and brian.
PR: 13091 Obtained from: NetBSD
|
49707 |
14-Aug-1999 |
chris |
Minor style fix - change 'if(!*v)' to 'if (!*v)'
|
46684 |
08-May-1999 |
kris |
Various spelling/formatting changes.
Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
|
41915 |
18-Dec-1998 |
jkoshy |
Add cross-references to test(1) and expr(1) respectively.
PR: docs/9111 Submitted by: Josh Gilliam <josh@quick.net>
|
38914 |
07-Sep-1998 |
cracauer |
Add -S flag to test for sockets. PR: bin/7507 Reviewed by: I tested the patch Submitted by: Stefan `Sec` Zehl sec@42.org
|
36152 |
18-May-1998 |
charnier |
Correct use of .Nm. Add rcsid.
|
31666 |
10-Dec-1997 |
eivind |
Remove simultaneous include of <sys/param.h> and <sys/types.h>. Reorder includes to be alphabetical some places since I already was in here.
|
26367 |
02-Jun-1997 |
charnier |
Typo fix.
|
22988 |
22-Feb-1997 |
peter |
Revert $FreeBSD$ to $Id$
|
21673 |
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
|
20970 |
28-Dec-1996 |
wosch |
add some string examples, eg. test "" -o ""
|
20903 |
25-Dec-1996 |
steve |
Fix handling of -o and -a operators in the 3 argument case.
Submitted by: Tom Rush <tarush@mindspring.com>
|
20424 |
14-Dec-1996 |
steve |
-Wall cleaning.
|
17849 |
27-Aug-1996 |
wosch |
sync copyright with /usr/share/examples/etc/bsd-style-copyright
|
16491 |
19-Jun-1996 |
wosch |
Add a better TEST script. I was surprised how much can be wrong with program test(1) or builtin test(1).
|
14539 |
11-Mar-1996 |
joerg |
err() --> errx() for non-errno related failures.
|
11855 |
28-Oct-1995 |
ache |
Fix -h option: sense symlink even it is unresolved
|
8855 |
30-May-1995 |
rgrimes |
Remove trailing whitespace.
Reviewed by: phk
|
7165 |
19-Mar-1995 |
joerg |
You will find enclosed some changes to make gcc -Wall more happy in /usr/src/bin. Note that some patches are still needed in that directory.
I (Joerg) finished most of Philippe's cleanup. /bin/sh will still need *allot* of work, however.
Submitted by: charnier@lirmm.fr (Philippe Charnier)
|
4171 |
05-Nov-1994 |
ache |
Fix group permissions check for group list size > 1 Pointed by Bruce
|
4170 |
05-Nov-1994 |
ache |
Fix root -w case according to manpage (-x & -r cases already accords) Pointed by Bruce.
|
4168 |
05-Nov-1994 |
ache |
Cosmetique, missing tab/spaces after patch
|
4167 |
05-Nov-1994 |
ache |
More complex implementation of previos superuser fix because rw and x bit treats differently infact
|
4166 |
05-Nov-1994 |
ache |
test produce wrong results for superuser, i.e. tells that file is unreadable when it is readable infact.
|
3044 |
24-Sep-1994 |
dg |
Added $Id$
|
2675 |
11-Sep-1994 |
csgr |
Make get_int() think that "" (null) has the integer value 0. (Which is the same behaviour as in 1.x) The install blows up without this. Reviewed by: rgrimes
|
2664 |
11-Sep-1994 |
csgr |
- handle signs on integers properly, - make sure error messages for bad integers are moderately sensible - handle test ! "abc" -o "abc" (This should evaluate to true) (and similar cases) ie: and/or operator test added to POSIX special case processing. - more test cases added.
Based on: Work done on 1.x's test(1) by Andrew Moore and Adam David.
|
1557 |
26-May-1994 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r1556, which included commits to RCS files with non-trunk default branches.
|