summaryrefslogtreecommitdiffstats
path: root/bin/test
Commit message (Collapse)AuthorAgeFilesLines
* Explicitly add unmarked bin/ binaries to the runtime package.gjb2016-02-091-0/+1
| | | | | | | | Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation
* MFHgjb2016-02-021-67/+97
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * test: Optimize operator lookup.jilles2016-01-301-67/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The linear search using strcmp() shows up in pmcstat for several percent. Split the operators into lengths and whether they start with '-' and compare bytes using == instead of strcmp(). A simple test sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do v=$(printf %sx%s "$w" "$w"); i=$((i+1)); done' is over 4% faster on an amd64 bhyve VM.
* | First pass to fix the 'tests' packages.gjb2016-02-021-0/+4
|/ | | | Sponsored by: The FreeBSD Foundation
* Clean up trailing whitespacengie2015-10-181-9/+9
| | | | MFC after: 3 days
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andngie2015-10-121-2/+0
| | | | | | | | | | | | 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 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison
* Add META_MODE support.sjg2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Updated dependenciessjg2014-05-161-1/+0
| |
| * Updated dependenciessjg2014-05-101-0/+2
| |
| * Merge from headsjg2014-05-081-1/+1
| |\ | |/ |/|
| * Merge headsjg2014-04-284-81/+294
| |\
| * \ Merge from headsjg2013-09-052-216/+55
| |\ \
| * \ \ sync from headsjg2013-04-122-27/+215
| |\ \ \
| * | | | Updated dependenciessjg2013-03-111-0/+1
| | | | |
| * | | | Updated dependenciessjg2013-02-161-2/+0
| | | | |
| * | | | Sync with HEAD.obrien2013-02-081-1/+8
| |\ \ \ \
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | 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
|
OpenPOWER on IntegriCloud