summaryrefslogtreecommitdiffstats
path: root/usr.bin/xargs
Commit message (Collapse)AuthorAgeFilesLines
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedngie2016-05-041-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division
* MFHgjb2016-03-101-0/+11
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * DIRDEPS_BUILD: Connect MK_TESTS.bdrewery2016-03-091-0/+11
| | | | | | | | Sponsored by: EMC / Isilon Storage Division
* | First pass to fix the 'tests' packages.gjb2016-02-021-0/+4
|/ | | | Sponsored by: The FreeBSD Foundation
* Fix type mismatches for malloc(3) and Co.uqs2015-12-291-2/+2
| | | | | | | | | This is rather pedantic, as for most architectures it holds that sizeof(type *) == sizeof(type **) Found by: clang static analyzer Reviewed by: ed Differential Revision: https://reviews.freebsd.org/D4722
* 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
* Fix the racy xargs -P0 -n2 test added in r286289ngie2015-08-212-3/+3
| | | | | | | | Sort the output obtained from xargs and the expected output to ensure the end result versus the input file is stable Differential Revision: D3432 Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com>
* Disable the -P0 testngie2015-08-211-1/+1
| | | | | | It's unreliable (sometimes it passes, sometimes it fails) Reported by: Jenkins (many times over the past few weeks)
* fix regression in xargs -Px (introduced in r286289) and add regression testsallanjude2015-08-086-6/+17
| | | | | | | | PR: 202152 Submitted by: jbeich (original), Nikolai Lifanov (final) Reviewed by: jbeich Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D3330
* xargs now takes -P0, creating as many concurrent processes as possibleallanjude2015-08-042-3/+19
| | | | | | | | | | | PR: 199976 Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com> Reviewed by: mjg, bjk Approved by: bapt (mentor) MFC after: 1 month Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D2616
* Convert atoi(3) to stronum(3) which allows to arguments and report proper errorsbapt2015-07-141-6/+13
| | | | | | to the users Obtained from: OpenBSD
* 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-2821-1/+137
| |\
| * \ Merge from headsjg2013-09-051-2/+4
| |\ \
| * | | Updated dependenciessjg2013-03-111-0/+1
| | | |
| * | | Updated dependenciessjg2013-02-161-2/+0
| | | |
| * | | Sync with HEAD.obrien2013-02-081-1/+1
| |\ \ \
| * | | | 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.
* | | | Migrate most of tools/regression/usr.bin/ to the new tests layout.jmmv2014-03-1620-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm starting with the easy cases. The leftovers need to be looked at a bit more closely. Note that this change _does_ modify the code of the old tests. This is required in order to allow the code to locate the data files in the source directory instead of the current directory, because Kyua automatically changes the latter to a temporary directory. Also note that at least one test is known to be broken here. Actually, the test is not really broken: it's marked as a TODO but unfortunately Kyua's TAP parser currently does not understand that. Will have to be fixed separately.
* | | | mdoc: minor paragraph fixes.joel2014-02-081-1/+0
| |_|/ |/| |
* | | Style(9) changes fo xargs.ceadler2013-05-101-2/+4
| |/ |/|
* | Follow calloc convention in other code, this is functionally identicaldelphij2013-01-051-1/+1
|/ | | | to its previous form.
* xargs: Before exiting, wait for all invocations of the utility.jilles2012-03-162-45/+81
| | | | | | | This only has an effect with -P, otherwise errors are only detected when the utility is not running. Submitted by: Matthew Story
* xargs: Remove an unclear comment that only tried to repeat what the code didjilles2012-02-261-4/+0
| | | | Reported by: bde
* xargs: Fix comma splice in error message.jilles2012-02-261-2/+2
| | | | Reported by: bde
* xargs: If a utility exits with 255 or a signal, write an error message.jilles2012-02-241-4/+7
| | | | | | | | If a utility called by xargs exits with status 255 or because of a signal, POSIX requires writing an error message. PR: 165155 Submitted by: Matthew Story matthewstory gmail com
* Discourage from using "cp -r".ru2011-03-241-2/+2
|
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-113-12/+2
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Various syntactic tweaks to satisfy style(9). No change to execution.mckay2010-11-211-14/+14
| | | | Submitted by: gcooper@
* xargs can be fooled by exiting children that it did not start, causingmckay2010-11-211-5/+118
| | | | | | | | | | it to kick off a new command before the previous has finished, resulting in corrupted (interleaved) output. It is also fooled by non-exiting children it did not start, failing to exit until all extraneous children have exited. This patch makes xargs keep track of children it starts, ignoring pre-existing ones.
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-1/+0
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* Revive '-opt' flags which I accidentally removed.keramida2008-01-271-1/+1
| | | | Noticed by: simon
* Document the no-op -r option of BSD xargs(1).keramida2008-01-261-2/+30
| | | | | | PR: docs/106416 Submitted by: Pete Slagle, freebsd-stable at voidcaptain.com MFC after: 3 days
* Markup fixes.ru2006-09-291-3/+3
|
* NUL terminate buffer from fgetln(3). From fgsch@OpenBSD.jmallett2006-01-011-0/+1
|
* Whitespace after switch.jmallett2006-01-011-3/+3
| | | | Inspired by: OpenBSD
* Check the entire length of the current argument for the EOF string with -E,jmallett2005-12-311-1/+1
| | | | | | | | | | | | | but don't expect a proper ASCII string to exist right here right now, don't use strcmp(3) which checks for a NUL. As we're still building the argument up, the next character might be garbage. It would probably be just as safe to temporarily write a NUL there, but if we've reached the end of argument memory that might not be the best idea, I think. It's unclear. Doing it this way seems to meet the most with the original intent. PR: 85696 Prodded by: stefanf
* Add a FreeBSD-specific -S flag which controls the maximum size of an argumentjmallett2005-12-302-10/+34
| | | | having replacements done in it via -I.
* Handle maxsize==0 in such a way that we don't modify the string.jmallett2005-12-301-0/+12
|
* Wording tweaks.des2005-12-071-3/+2
| | | | | PR: not quite docs/84620 MFC after: 2 weeks
* Add -r option for GNU compatibility.des2005-12-071-1/+4
| | | | MFC after: 2 weeks
* Sync program's usage() with manpage's SYNOPSIS.ru2005-05-211-1/+1
|
* MFC 1.22: Fix -0 vs -L/-I processing, mainly so that 'xargs -0 -I []' willgad2005-02-271-2/+9
| | | | | | | do something sensible (namely: treat then '\0' as the EOL character, when deciding what "a line" is for -N). Note that -I implies -N. MFC after: 3 days
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Modify behaviour of `xargs -I` in order to:cperciva2004-10-181-2/+2
| | | | | | | | | | | | | | | | | 1. Conform to IEEE Std 1003.1-2004, which state that "Constructed arguments cannot grow larger than 255 bytes", and 2. Avoid a buffer overflow. Unfortunately the standard doesn't indicate how xargs is supposed to handle arguments which (with the appropriate substitutions) would grow larger than 255 bytes; this solution handles those by making as many substitutions as possible without overflowing the buffer. OpenBSD's xargs resolves this in a different direction, by making all the substitutions and then silently truncating the resulting string. Since this change may break existing scripts which rely upon the buffer overflow (255 bytes isn't really all that long...) it will not be MFCed.
OpenPOWER on IntegriCloud