Commit Graph

146 Commits

Author SHA1 Message Date
Baptiste Daroussin
a651f2bc6c Rename getline with get_line to avoid collision with getline(3)
When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from:	NetBSD
2016-05-10 11:11:23 +00:00
Enji Cooper
430f7286a5 Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed
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
2016-05-04 23:20:53 +00:00
Glen Barber
7d536dc855 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-10 21:16:01 +00:00
Bryan Drewery
15c433351f DIRDEPS_BUILD: Connect MK_TESTS.
Sponsored by:	EMC / Isilon Storage Division
2016-03-09 22:46:01 +00:00
Glen Barber
52259a98ad MFH
Sponsored by:	The FreeBSD Foundation
2016-03-02 16:14:46 +00:00
Edward Tomasz Napierala
3ea98e058d dump(1) -> dump(8).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-02-29 17:17:10 +00:00
Glen Barber
ac2875fa16 Explicitly add unmarked bin/ binaries to the runtime package.
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
2016-02-09 16:58:50 +00:00
Glen Barber
43faedc133 First pass to fix the 'tests' packages.
Sponsored by:	The FreeBSD Foundation
2016-02-02 22:26:49 +00:00
Pedro F. Giffuni
1e00885aec pax: prevent possible buffer overflow
Or at least quiet down some static analyzers about it.

CID:	978835
MFC after:	1 week
Obtained from:	OpenBSD
2015-12-29 16:31:28 +00:00
Enji Cooper
b2d48be1bc 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

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison
2015-10-12 08:16:03 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
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
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Xin LI
94bdf5cfcc Eliminate unneeded includes.
MFC after:	2 weeks
2015-05-21 18:29:36 +00:00
Eitan Adler
d6e1f8d70c Implement pax -O option to permit limiting a PAX archive to a single volume.
-O Force the archive to be one volume.  If a volume ends prematurely, pax will
not prompt for a new volume.

PR:		198481
Submitted by:	Sevan Janiyan
Reviewed by:	allanjude (doc)
2015-03-18 05:48:05 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
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
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +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
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +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