Commit Graph

122 Commits

Author SHA1 Message Date
Julio Merino
f5fd950e35 Make bsd.test.mk the only public mk fragment for the building of tests.
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.
2014-03-14 08:56:19 +00:00
Kevin Lo
248825e568 Stop the options string leak if it is not attached into the options
linked list.

Obtained from:	OpenBSD
2014-01-26 07:20:32 +00:00
Julio Merino
d935b54263 Use TAP_TESTS_PERL to register the legacy_test in bin/pax.
Redo r260586 by using the new functionality in tap.test.mk to transparently
support perl-based test programs.

As a side-effect, we get rid of an explicit path to /usr/bin/perl by
replacing it with /usr/local/bin/perl (or as defined in tap.test.mk).

This also fixes the name of the legacy_test source file because this should
have always been legacy_test.pl and not legacy_test.sh.  My mistake when
originally moving the code around without realizing that this was a perl
script.

MFC after:	5 days
2014-01-14 18:39:30 +00:00
Julio Merino
0b7cffde5f Mark the bin/pax tests as requiring perl.
The effect of this is that the test program is marked as skipped when perl
is missing, instead of marking it as broken due to an execution failure.

MFC after:	3 days
2014-01-13 12:17:41 +00:00
Chris Rees
e26f656669 Document the lack of chflags support in pax(1)
PR:		docs/135516
Submitted by:	arundel (based on)
Approved by:	gjb (mentor)
2013-12-21 19:29:08 +00:00
Julio Merino
13de33a5dc Migrate tools/regression/bin/ tests to the new layout.
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)
2013-12-11 04:09:17 +00:00
Ed Schouten
ae824d80f2 Fix warnings found by -Wmising-variable-declarations.
This self-written compiler warning, which is hopefully going to be
committed into LLVM sources soon, warns about potentially missing
`static' keywords, similar to -Wmissing-prototypes.

- bin/pax: Move external declaration of chdname and s_mask into extern.h.
- bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h.
- sbin/mount_fusefs: Remove char *progname; use getprogname().
- others: add `static' where possible.
2012-10-19 05:43:38 +00:00
Ulrich Spörlein
01c9917634 Fix a bunch of typos and a couple of whitespace nits.
Helped by:	codespell and vim's spellchecker
2011-05-22 14:03:38 +00:00
Brian Somers
3b8199dbfc Touch the man page date after updating the ustar limitations.
MFC after:	3 weeks
2010-08-29 12:17:16 +00:00
Brian Somers
cd14b45756 Correct an out-by-one error when earlying out ustar filenames that
are too long.  Filenames escaping this test are caught later on,
so the bug doesn't cause any breakage.

Document the correct ustar limitations in pax.  As I have no access
to the IEEE 1003.2 spec, I can only assume that the limitations
imposed are in fact correct.

Add regression tests for the filename limitations imposed by pax.

MFC after:	3 weeks
2010-08-29 11:56:56 +00:00
Brian Somers
f77b6c6a25 Fix an off-by-one error where we try to split a path name that's
more than 100 characters long and the 101th last character is a
'/'.

MFC after:	3 weeks
2010-08-27 08:54:40 +00:00
Ulrich Spörlein
c9022a35b2 Fix back references in substitute command for pax(1)
pax(1) was trying to copy the back-referenced data from
the match pattern, not the matched data.

PR:		bin/118132
Obtained from:	Debian bug #451361
Reviewed by:	jilles
MFC after:	3 weeks
2010-05-24 06:33:14 +00:00
Xin LI
0a2ad1242b Merge OpenBSD revisions 1.4 through 1.9, mostly style cleanups.
Obtained from:	OpenBSD
MFC after:	3 month
2010-03-30 23:14:35 +00:00
Xin LI
608675f243 Remove unused files. 2010-03-30 23:10:56 +00:00
Warner Losh
ff52ef9533 Tell the compiler these structures are aligned to a byte boundary.
All the elements of these structs are char anyway, so it won't hurt
performance.

Bump warns back up to the default.

# we likely should have CTASSERTS to make sure they are the right size.
# but with libarchive based tar maybe we shouldn't bother.
2010-02-07 17:05:22 +00:00
Warner Losh
6ca3abc9bb Arm doesn't seem to need such kit gloves. Bump the warnings to 3 here
as well.
2010-02-04 07:18:19 +00:00
Ed Schouten
759dba8c5a Port everything in bin/ from utmp to utmpx.
date: use libc utmpx routines instead of the ones provided by libulog.
pax:  don't depend on <utmp.h>
2010-01-13 17:56:54 +00:00
Ed Schouten
3d65b2f568 Add missing `void' for function without arguments. 2009-12-29 08:45:50 +00:00
Xin LI
f3ef893ad4 Plug a memory leak.
PR:		bin/141835
Submitted by:	Henning Petersen <henning.petersen t-online.de>
MFC after:	2 weeks
2009-12-21 19:18:27 +00:00
Tim Kientzle
db77c5b943 Before this fix, pax would stop the restore sequence for
symlinks after setting the owner.  As a result, mode
and timestamp were not restored.  This patch corrects the
problem by simply removing the short-circuit for symlinks
and using lchown()/lchmod()/lutimes() always for restoring
metadata.

PR:		bin/91316
Submitted by:	Jaakko Heinonen
Reviewed by:	Joerg Sonnenberger
MFC after:	14 days
2009-02-01 06:15:46 +00:00
Brian Somers
367787a3c6 Remove unnecessary free argument casts.
Don't abuse arcname's constness.
2007-05-25 17:53:38 +00:00
Ralf S. Engelschall
f2703795ca Cleanup pax(1) sources a little bit while I poked around in them:
- remove a superfluous doubled trailing semicolon.
- remove the extra void casts on calls to void-function free(3).
2007-05-24 06:44:37 +00:00
Ruslan Ermilov
c65bb135d9 Fix some of the alignment warnings on ARM. 2006-11-27 22:17:11 +00:00
Ruslan Ermilov
9badf57f01 Markup fixes. 2006-09-17 17:40:07 +00:00
Coleman Kane
6ff45b4e35 Fix the wording about the blocksize (-b) parameter. The existing
wording makes it look like pax archives > 32256 bytes are not
POSIX-compliant! Correct this to state that pax archives with
block sizes > 32256 are not POSIX compliant...and settle our fears.

PR:		docs/97059
Reviewed by:	Giorgos Keramidas <keramida>
2006-05-10 20:32:57 +00:00
David E. O'Brien
5f44e053cc Fix bin/pax doesn't wait for compress/gzip before exiting.
Submitted by:	Joerg Sonnenberger <joerg@britannica.bec.de>
Obtained from:	OpenBSD (commited fix to PR 3455)
2005-03-12 06:38:01 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
6b806d21d1 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
Ruslan Ermilov
6fca4c7c3f Add the new standard EXIT STATUS section where appropriate.
Sort standard sections in the (documented) preferred order.
2005-01-16 16:41:59 +00:00
Brian Somers
0e32d64e56 Don't decend into directories when -d is set and the directory itself doesn't
match.

PR:		28095
Submitted by:	bill at twwells dot com
MFC after:	7 days
2005-01-12 03:25:55 +00:00
Warner Losh
9ddb49cbe4 /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
Yaroslav Tykhiy
5512dc5460 Fix off-by-one errors and potential buffer overruns
WRT handling file and link names that reach the allowed
maximum for old tar and ustar archive formats.

PR:		bin/40466
Submitted by:	Cyrille Lefevre <email in the PR> (portions)
Reviewed by:	freebsd-arch (silence)
MFC after:	1 month
2004-11-13 10:56:35 +00:00
Tim J. Robbins
128dc4a2e3 Document missing multibyte character handling in utilities specified
by POSIX.
2004-07-03 02:03:44 +00:00
Ruslan Ermilov
1171aedcdf Deal with double whitespace. 2004-07-03 00:06:28 +00:00
Ruslan Ermilov
eccea571a7 Mechanically kill hard sentence breaks. 2004-07-02 21:04:19 +00:00
David E. O'Brien
c33c2570d3 Don't continue if the '-C' option (a-la GNUtar; commited in options.c
rev 1.18, but not documented in the man page) caused a failed chdir.
Otherwise, one can easily overwrite files.

Submitted by:	Robert Nagy <robert@openbsd.org>
Obtained from:	OpenBSD
2004-06-25 05:27:59 +00:00
Olivier Houchard
c1b2de5af0 Use WARNS?=3 for these in the arm case for now, due to toolchain issues. 2004-05-14 13:31:21 +00:00
Mark Murray
6195fb4102 Remove clause 3 from the UCB licenses.
OK'ed by:	imp, core
2004-04-06 20:06:54 +00:00
Colin Percival
3ed29c96cf Fix memory leak
PR:		bin/64321
Submitted by:	Rodney Ruddock <rodney@interopsystems.com>
MFOpenBSD:	rev 1.17
MFC after:	3 days
2004-03-16 08:33:33 +00:00
Mark Murray
16fc3635f7 Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64
2004-03-05 08:10:19 +00:00
Mark Murray
eac4bdcca4 Get this area compiling with the highest WARNS= that it works with.
Obsolete WFORMAT= junk also removed where possible.

OK'ed by:	obrien
Tested on:	sparc64, alpha, i386
2003-06-13 07:04:02 +00:00
Mark Murray
40feca3a99 Fix a bazillion warnings. This makes almost the whole of src/bin/*
WARNS=6, std=c99 clean.

Tested on:	i386, alpha
2003-05-03 16:39:34 +00:00
David E. O'Brien
8705f13eab Quiet warnings about copyright[]. 2003-05-02 00:04:21 +00:00
David E. O'Brien
cee22cbd29 Fix signed/unsigned mix comparisons involving sizeof. 2003-05-02 00:03:10 +00:00
Tim J. Robbins
005197bb40 Add the -j and -y options to the synopsis. 2003-05-01 02:37:46 +00:00
David E. O'Brien
2e79837f7b Make the "tarcp" example more direct. 2003-01-10 17:37:23 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Tim J. Robbins
e79f14fad9 Ensure all va_starts have a matching va_end.
Obtained from:	NetBSD
2002-10-06 09:23:58 +00:00
Tim J. Robbins
e7ed0f64bf /dev/sa0 is the default tape device, not /dev/rst0. 2002-10-06 07:56:27 +00:00
Tim J. Robbins
5b94264c20 Fix format string errors relating mainly to the use of %qu to print off_t's.
Instead use %ju and cast the argument.

WFORMAT=0 is still required in the Makefile because gcc warns about
some strftime() calls (I don't think this behaviour is useful.)

Tested on:	sparc64, alpha, i386
2002-10-06 03:20:27 +00:00