Commit Graph

48 Commits

Author SHA1 Message Date
Warner Losh
d37eb51047 contrib: Remove various $FreeBSD$ tags not upstream
Sponsored by:		Netflix
2024-05-31 13:49:17 -06:00
Dag-Erling Smørgrav
a7beca6fb1 atf: Guard against multiple evaluation.
Note that the ATF-C++ macros have the same issue, but they are not as
easily fixed.

MFC after:	3 days
Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D45148
2024-05-15 12:08:44 +02:00
Igor Ostapenko
d4d14d965f atf-sh: fix comment typo
Signed-off-by: Igor Ostapenko <pm@igoro.pro>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/895
2023-12-26 16:24:42 -07:00
Alan Somers
71a1ae7ceb Import atf 0.22 snapshot 55c21b2c5fb189bbdfccb2b297bfa89236502542
The main improvement is the ability to skip a test that is expected to
fail.
2021-09-10 17:08:42 -06:00
Alex Richardson
c203bd70b5 Import atf 0.22 snapshot ca73d08c3fc1ecffc1f1c97458c31ab82c12bb01
This includes improvements to the atf-sh helper functions that
significantly reduce the number of spawned processes for each test
and therefore speeds up running the testsuite noticeably.
2021-02-04 15:03:05 +00:00
Enji Cooper
4fb696d630 atf-sh(3): document atf_init_test_cases(3) fully
The function was missing from the NAME/SYNOPSIS sections. Add a manpage link
to complete the documentation reference.

MFC after:	1 month
2017-06-30 05:49:12 +00:00
John Baldwin
6dfb9460ca Skip tests depending on coredumps if coredumps are disabled via kern.coredump.
The kern.coredump sysctl can be set to 0 to disable coredumps.  Skip the
'status_coredump' and 'wait6_coredumped' tests if this sysctl is set to 0
rather than reporting a failure.

Submitted by:	brooks
Reviewed by:	ngie
Obtained from:	CheriBSD
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D10665
2017-05-16 18:42:44 +00:00
Enji Cooper
1d30387920 atf-c: fix documentation description for atf_utils_wait(3)
atf_utils_wait(3) should be used in combination with atf_utils_fork(3),
not itself (atf_utils_wait(3)).

MFC after:	2 months
Sponsored by:	Dell EMC Isilon
2017-04-06 03:50:58 +00:00
Enji Cooper
de5e156be6 Remove *-api(3) manpages removed in ATF 0.21
I overlooked the fact that these manpages had been removed upstream
and replaced with their non *-api(3) equivalents. Follow upstream's
lead and remove the unused manpages.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-06 22:18:14 +00:00
Enji Cooper
af6edc1bfd Fix issues noted by igor/manlint
- Fix typos [1]:
-- manged -> managed
-- specifiying -> specifying
- Escape '.' at start of lines using & to tell the roff processor
  that the line isn't meant to be treated as a command [2].

Bump .Dd for the change

MFC after:	1 week
Reported by:	igor [1], manlint [2]
Sponsored by:	Dell EMC Isilon
2017-03-06 22:08:47 +00:00
Enji Cooper
b9684bc104 Fix typos
- specifiying -> specifying
- manged -> managed

Bump .Dd for the change

MFC after:	1 week
Reported by:	igor
Sponsored by:	Dell EMC Isilon
2017-03-06 21:50:35 +00:00
Enji Cooper
35c3281fb6 Fix atf-c-api(3) manpage issues
- Fix typo (specifiying -> specifying).
- Remove surrounding ellipses in i.e. section and add a comma before
  and after the i.e. reference.

Bump .Dd for the change

MFC after:	1 week
Reported by:	igor
Sponsored by:	Dell EMC Isilon
2017-03-06 21:45:25 +00:00
Enji Cooper
ddde9fa737 Fix igor/manlint issues with atf-c(3)
- Remove surrounding ellipses in i.e. section and add a comma before
  and after the i.e. reference [1].
- Fix typo (specifiying -> specifying) [1].
- Escape '.' at start of lines using & to tell the roff processor
  that the line isn't meant to be treated as a command [2].

Bump .Dd for the change

MFC after:	1 week
Reported by:	igor [1], manlint [2]
Sponsored by:	Dell EMC Isilon
2017-03-06 21:43:47 +00:00
Enji Cooper
459f307b4a Fix issues with atf-check(1) found by igor and refer to atf-check(1)
- Fix typo (specifiying -> specifying)
- Add atf-check(1) to SEE ALSO section for completeness. It's mentioned
  above, but by convention the SEE ALSO section should list all relevant
  references to other tools and APIs.

Bump .Dd for the change

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-06 21:39:57 +00:00
Enji Cooper
ed20d3f52f Fix manlint issues with atf-check(1)
- Use `.Bf Em`/`.Ef` instead of prefixing lines with `.Em`. The forms
  are equivalent with traditional roff, but unnecessarily verbose. The
  former form applies the .Em macro to the enclosed block.
- Move EXIT_STATUS section down so the section complies with section
  ordering specified by mdoc(7) and enforced by manlint(1).

Bump .Dd for the change

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-06 21:35:33 +00:00
Enji Cooper
b93c1b1a3b Fix out-of-order sections in atf-sh(1)
- `.Op` must be used in the SYNOPSIS section, not the NAME section.
- Move ATF_SHELL environment variable description up to first
  ENVIRONMENT section. Garbage collect the duplicate ENVIRONMENT
  section.

Bump .Dd for the change

MFC after:	1 week
Reported by:	manlint
Sponsored by:	Dell EMC Isilon
2017-03-06 21:30:06 +00:00
Enji Cooper
e5bab279a8 Fix grammar warning noted by igor
Remove surrounding ellipses in e.g. section and add a comma before and after
the e.g. reference.

MFC after:	1 week
Reported by:	igor
Sponsored by:	Dell EMC Isilon
2017-03-06 21:26:45 +00:00
Enji Cooper
ba31e895b9 Fix atf-sh(3) manpage issues
- Fix spelling errors (specifiying -> specifying) [1]
- Escape '.' at start of lines using & to tell the roff processor
  that the line isn't meant to be treated as a command [2].

Bump .Dd for the change

MFC after:	1 week
Reported by:	igor [1], manlint [2]
Sponsored by:	Dell EMC Isilon
2017-03-06 21:24:55 +00:00
Enji Cooper
63bb40b55d Fix ATF_TP_ADD_TCS example in atf-c-api(3)
ATF_TP_ADD_TC should use `tp` as the second argument, not `tcs`, as
ATF_TP_ADD_TCS uses `tp` as its first argument.

Bump .Dd for the change.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-06 20:54:21 +00:00
Ruslan Bukin
c5072d5c94 Fix conversion from C++ std::string into C const char *.
This fixes operation on MIPS64EB with GCC 4.2.1.

Reviewed by:	jmmv
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D7952
2016-09-29 09:16:02 +00:00
Ed Schouten
2c7da872aa Don't let ATF call basename() and dirname() in a non-standard way.
POSIX basename() and dirname() are allowed to overwrite the input
buffer. The advantage of implementing it that way is that the functions
can be thread-safe, as they don't store the result in a global buffer.

It looks like ATF wants to call basename() and dirname() in the
non-standard way where the argument is of type "const char *". This
change disables the calls to basename() and dirname(), which only seems
to affect the formatting of some rare debug/error messages.

Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D6627
2016-06-08 20:54:56 +00:00
Conrad Meyer
6c8eb57da5 atf map: Fix double-free in low memory error path
If atf_list_append(, X, ) fails, X is freed.  Don't free it again.

If anyone wants to walk this patch upstream, be my guest.  I literally cannot
upstream it myself due to Google's stupid CLA.

Reported by:	Coverity
CID:		979936
Sponsored by:	EMC / Isilon Storage Division
2016-05-11 23:39:39 +00:00
Enji Cooper
da3067c138 Import proposed fix from upstream for
atf-sh/atf_check_test:flush_stdout_on_timeout

Many thanks for jmmv for the fix!

MFC after: 1 week
PR: 197060

Original commit message:

From 0e546407567ea858e261e72f75c5ed61e07d0ddf Mon Sep 17 00:00:00 2001
From: Julio Merino <jmmv@google.com>
Date: Tue, 17 Feb 2015 18:10:11 -0500
Subject: [PATCH] Fix atf-sh/atf_check_test:flush_stdout_on_death

The test atf-sh/atf_check_test:flush_stdout_on_timeout was flaky as it
was playing solely with time.  Fix this by making the test more robust
and rename it while we are at it: there is nothing left about "timeouts"
in this test, considering that ATF itself does not enforce deadlines
any longer.

Fixes FreeBSD PR 197060.
2015-05-21 05:06:08 +00:00
Julio Merino
0677dfd1c4 MFV: Import atf-0.21. 2014-11-01 11:17:54 +00:00
Enji Cooper
abe0c5587d Fix a typo in the upgrade directions
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2014-09-24 06:50:14 +00:00
Craig Rodrigues
b9306c0473 Delete mentions to removed manpages
Obtained from:  atf (git 23c570d6f393c76dff041360bb5f7779900c7191)
2014-09-23 22:29:03 +00:00
Craig Rodrigues
4c998508be The ATF source code is now hosted on GitHub. 2014-09-23 22:20:19 +00:00
Craig Rodrigues
dfdc97ae08 Reference the test case "packs" to fix warnings
Put the various atf_tc_pack_t variables generated by ATF_TC to use in
the macros_h_test.c file so that we prevent some build warnings (and
thus some build errors) with clang and -Wunused.

Obtained from:  atf (git 70126d013db25c72539803f19f7e00baddacdf51)
2014-09-19 17:18:27 +00:00
Julio Merino
17a286a994 Change libatf-c and libatf-c++ to be private libraries.
We should not be leaking these interfaces to the outside world given
that it's much easier for third-party components to use the devel/atf
package from ports.

As a side-effect, we can also drop the ATF pkgconfig and aclocal files
from the base system.  Nothing in the base system needs these, and it
was quite ugly to have to get them installed only so that a few ports
could build.  The offending ports have been fixed to depend on
devel/atf explicitly.

Reviewed by:	bapt
2014-05-25 12:01:13 +00:00
Julio Merino
912eec3015 Add atf m4 files from the vendor branch.
These were originally deleted as "not important" but, actually we need them
in place if we want to be able to use autoconf on software that provides
atf-based tests.  (That includes being able to rebuild autotest from scratch
on the Kyua cluster machines, as the automated setup does.)
2014-04-01 13:47:08 +00:00
Julio Merino
c9be23cfca Undefine HAVE_VSNPRINTF_IN_STD.
Should fix the build with g++/libstdc++.

This is what we used to do prior the import of atf 0.20 and the build worked
just fine with both libstdc++ and libc++.  Still investigating how to properly
fix this upstream so that we do not hit the same issue on the next import.
2014-02-16 21:53:33 +00:00
Julio Merino
1a61beb054 MFV: Import atf-0.20. 2014-02-14 19:33:16 +00:00
Julio Merino
a62905a977 Add atf pkg-config files from the vendor branch.
These were originally deleted by mistake (because they were not yet being
installed) and are actually necessary.

This should have been part of r260576 but I missed committing this
directory.

MFC after:	5 days
2014-01-12 22:17:10 +00:00
Julio Merino
b17b15d8ea Fix path to the process_helpers for the libatf-c++ tests.
Because we respect the FreeBSD src tree layout under /usr/tests, and because
the layout of the tests in the atf distfile does not match the former, the
tests for atf-c++ were not able to find the process_helper binary.

Fix this by explicitly hardcoding the right path in the FreeBSD test suite.

Obtained from:	atf (git 1f0e878f7f127741a3762883ef24aef317e239d5)
MFC after:	1 week
2014-01-10 23:41:01 +00:00
Julio Merino
6d732c66bc Use .cpp as the extension for temporary C++ files.
Using a .c extension for a C++ file raises the following warning, which
breaks our header file tests if the compiler is using -Werror as well:

c++: warning: treating 'c' input as 'c++' when in C++ mode, this
behavior is deprecated

Obtained from:	atf (git 3104010c2849330440cc0ce108ff341913433339)
MFC after:	3 days
2014-01-09 18:53:21 +00:00
Julio Merino
be1938b303 Drop all ATF tools code.
We stopped building the tools in r256365 so there is no need to ship
their code any longer.

Approved by:	rpaulo (mentor)
2013-11-18 01:28:29 +00:00
Julio Merino
a18eacbefd MFV: Import atf-0.18.
Approved by:	rpaulo (mentor)
2013-11-17 23:51:19 +00:00
Julio Merino
73cdac7877 Update notes for imports of atf.
This is because the atf vendor branch now includes a verbatim copy of
the distfile sources.  As a result, the list of files to-be-removed from
the contrib/ directory is now more aggressive (and different) and the
upgrade notes now only describe stuff that is specific to the atf import
and is not documented in the Subversion Primer.

Approved by:	rpaulo (mentor)
2013-11-17 23:19:06 +00:00
Marcel Moolenaar
5686c6c38a Modify atf::fs::path::get_process_helpers_path API to properly
handle pathing with detail/ tests. Based on patch pushed upstream to
ATF project.

Obtained from:	Garrett Cooper <yaneurabeya@gmail.com>
2013-05-29 19:41:36 +00:00
Marcel Moolenaar
701791c75b Add ATF update instructions and file exclude list.
Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-15 04:51:37 +00:00
Marcel Moolenaar
8017b8a3c1 The *_STR* macros use strcmp() to check their arguments. Include string.h
to have this definition available.
Upstream commit: 1dc1884f778f88811583e6a54610a6d7e421ca63

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-15 04:42:30 +00:00
Marcel Moolenaar
89e54125a4 Add support for DragonFly and FreeBSD.
Upstreamed:
    http://code.google.com/p/kyua/issues/detail?id=45

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-15 04:32:55 +00:00
Marcel Moolenaar
112988e702 Fix typos in description for exp{err,out}_mismatch_head.
Upstreamed:
    http://code.google.com/p/kyua/issues/detail?id=44

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-15 04:29:12 +00:00
Marcel Moolenaar
a4fb74f1ac Remove redundant text describing the cleanup routine.
Upstreamed:
    http://code.google.com/p/kyua/issues/detail?id=43

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-15 04:24:17 +00:00
Dimitry Andric
c9c047798c Fix two clang warnings in the recent atf import. These have also been
sent upstream.

Tested by:	Garrett Cooper <yanegomi@gmail.com>
2012-10-23 18:38:04 +00:00
Marcel Moolenaar
b514734386 Update to a pruned 0.16. 2012-09-05 16:01:08 +00:00
Marcel Moolenaar
451f0851c2 Add headers created by running configure. 2012-09-04 23:27:07 +00:00
Marcel Moolenaar
c243e4902b Merge ATF 0.16 from vendor/atf/dist.
Provenance: http://code.google.com/p/kyua
Discussed with: gibbs, gnn, keramida, mdf, mlaier,
Discussed with: Garrett Cooper
2012-09-04 23:16:58 +00:00