summaryrefslogtreecommitdiffstats
path: root/bin/test
Commit message (Collapse)AuthorAgeFilesLines
* Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-061-1/+1
| | | | from the latter.
* Make bsd.test.mk the only public mk fragment for the building of tests.jmmv2014-03-141-1/+1
| | | | | | | | | | | | | | Change {atf,plain,tap}.test.mk to be internal implementation details of bsd.test.mk. Makefiles that build tests should now only include bsd.test.mk and declaratively specify what they want to build, without worrying about the internal implementation of the mk files. The reason for this change is to permit building test programs of different interfaces from a single directory, which is something I had a need for while porting tests over from src/tools/regression/. Additionally, this change makes it possible to perform some other requested changes to bsd.test.mk in an easier manner. Coming soon.
* Replace hand-crafted Kyuafiles with automatic generation.jmmv2014-01-142-13/+6
| | | | | | | | Redo r260506 by using the new TEST_METADATA functionality of bsd.test.mk to mark the sh(1) and test(1) tests as not supporting root. This is to get rid of hand-crafted Kyuafiles for these very simple cases. MFC after: 5 days
* Run the sh(1) and test(1) tests as unprivileged.jmmv2014-01-102-0/+13
| | | | | | | | | | | One of the tests for test(1) fails and some of the tests for sh(1) are silently bypassed when running as root. To fix these tests and ensure they all run, mark the test programs for sh(1) and test(1) as requiring an unprivileged user. (This should and will be the default in Kyua but isn't yet.) MFC after: 1 week
* Migrate tools/regression/bin/ tests to the new layout.jmmv2013-12-113-0/+211
| | | | | | | | | | | | | | | | | | | | This change is a proof of concept on how to easily integrate existing tests from the tools/regression/ hierarchy into the /usr/tests/ test suite and on how to adapt them to the new layout for src. To achieve these goals, this change: - Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/. - Renames the previous regress.sh files to legacy_test.sh. - Adds Makefiles to build and install the tests and all their supporting data files into /usr/tests/bin/. - Plugs the legacy_test test programs into the test suite using the new TAP backend for Kyua (appearing in 0.8) so that the code of the test programs does not have to change. - Registers the new directories in the BSD.test.dist mtree file. Reviewed by: freebsd-testing Approved by: rpaulo (mentor)
* test: Avoid looking up again the type of a known binary operator.jilles2013-12-051-7/+6
|
* test: Simplify the code by unifying op_num and op_type.jilles2013-12-011-78/+75
| | | | The global variable t_wp_op is no longer needed.
* test(1): Add information about replacing -nt/-ot.jilles2013-05-311-0/+16
|
* test(1): List non-standard primaries.jilles2013-05-311-1/+12
|
* test: Remove -ntXY and -otXY primaries.jilles2013-05-312-215/+27
| | | | | | | | | | | | | | | 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.
* Enhance test(1) by adding provision to compare any combination of thepeterj2013-02-252-27/+215
| | | | | | | | | 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
* test(1): Document == alias for =.jilles2012-12-271-1/+8
| | | | | | Reviewed by: gjb Requested by: gjb MFC after: 1 week
* Minor mdoc nits.joel2012-05-131-1/+1
|
* test: Reduce code size of ops table.jilles2011-11-251-5/+5
|
* Put some static keywords in the source code.ed2011-10-311-5/+5
| | | | | | 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.
* bin: Prefer strrchr() to rindex().jilles2011-03-151-1/+1
| | | | This removes the last index/rindex usage from /bin.
* Accept == as an alias of = which is a popular GNU extension.delphij2011-02-271-0/+1
| | | | | | | This is intentionally undocumented for now since it's not part of any standard. MFC after: 1 month
* test: Note that this is used both as a normal program and a shell builtin.jilles2011-02-151-0/+4
| | | | MFC after: 1 week
* test: Move tests to tools/regression/bin/test.jilles2010-11-083-353/+0
| | | | | | | | | 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
* Revert changes of 'assure' to 'ensure' made in r211936.brucec2010-09-111-1/+1
| | | | Approved by: rrs (mentor)
* test(1): Fix markup, ( and ) must be separate arguments so leave spaces.jilles2010-09-101-1/+1
| | | | MFC after: 1 week
* test(1): Clarify grammar ambiguity and -a/-o vs shell &&/||.jilles2010-09-101-5/+12
|
* Fix incorrect usage of 'assure' and 'insure'.brucec2010-08-281-1/+1
| | | | Approved by: rrs (mentor)
* Change all our own code to use st_*tim instead of st_*timespec.ed2010-03-281-3/+3
| | | | Also remove some local patches to diff(1) which are now unneeded.
* Fix various cases with 3 or 4 parameters in test(1) to be POSIX compliant.jilles2009-05-262-9/+99
| | | | | | | | | | | | | | | | | | 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)
* - rename the RETURN VALUES section to EXIT STATUSdanger2009-01-071-1/+1
| | | | | | | - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days
* Simplify some markup.ru2006-12-141-32/+34
|
* Granting the amount of misunderstanding the last change received,yar2006-07-311-1/+7
| | | | extend it with an example to clarify the point.
* Document that both sides of -a or -o are always evaluated. Thisyar2006-07-271-1/+8
| | | | | | | | | "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
* /*- or .\"- or #- to begin license clauses.imp2005-01-103-2/+5
|
* Clarify: test compares strings by binary value, not "ASCII value".tjr2004-07-031-3/+3
|
* Mechanically kill hard sentence breaks.ru2004-07-021-2/+4
|
* Typo: s/SunOP/SunOS/g.maxim2004-06-161-2/+2
|
* Remove a duplicated description of the test for the null string.yar2004-06-071-5/+0
| | | | MFC after: 3 days
* Describe how test(1) will evaluate its expressions for a symlink.yar2004-06-071-1/+13
| | | | | Inspired by: SUSv3 MFC after: 1 week
* Remove clause 3 from the UCB licenses.markm2004-04-061-4/+0
| | | | OK'ed by: imp, core
* Don't escape names in MLINKS: this won't work with bsd.man.mk,v 1.53.ru2003-09-071-1/+1
|
* o Backout rev. 1.40 and rev. 1.49.maxim2002-08-151-36/+34
| | | | | | | | o Add argv[] boudary check. PR: bin/40117 Reviewed by: silence on -audit MFC after: 2 months
* Make test check the tv_nsec part of a struct stat when comparingdwmalone2002-07-271-8/+10
| | | | | | | | | 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
* Fix a memory leak.maxim2002-07-051-0/+1
| | | | | PR: bin/40177 MFC after: 1 week
* Consistently use FBSDIDobrien2002-06-301-4/+2
|
* while i'm breaking stuff, use __dead2 instead of GCC specific __attribute__.alfred2002-05-111-2/+1
|
* backout additional include of cdefs.h, it's not helping any.alfred2002-05-111-1/+0
|
* include cdefs.h for __printf0like to silence warning.alfred2002-05-111-0/+1
|
* Use intmax_t as quad_t replacement, like in exprache2002-03-281-5/+6
|
* Log:maxim2002-03-061-10/+6
| | | | | | | | | | | 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
* __printflike() should really be __printf0like() since verrx() cankris2002-02-041-1/+1
| | | | accept a NULL format string.
* Add a __printflike() attribute to silence warning with FORMAT_AUDIT=1kris2002-02-041-1/+2
|
* Work around a buffer overflow problem on argv that has been exposedknu2002-02-031-6/+16
| | | | | | | | | | | | | | | | | | 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
* o __P has been reovedimp2002-02-021-61/+32
| | | | | | | | | | | | | | | | | | 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) { ...
OpenPOWER on IntegriCloud