Commit Graph

9 Commits

Author SHA1 Message Date
Warner Losh
b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Mark Johnston
8a271827e7 tests: Add ATF_REQUIRE_SYSCTL_BOOL
Modify a capability mode test to use it for kern.trap_enotcap, to avoid
false positives.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2023-04-25 09:54:23 -04:00
Alexander V. Chernikov
924226fba1 testing: move atf-pytest-wrapper to /usr/libexec
Move pytest wrapper to the collection of the other atf wrappers
 in libexec. It solves the problem of combining bits & pieces from
 bsd.test.mk and bgs.prog.mk to address "test binary, but not the
 suite binary".

Reviewed by:	kp
Differential Revision: https://reviews.freebsd.org/D35604
MFC after:	2 weeks
2022-06-26 13:25:47 +00:00
Alexander V. Chernikov
8eb2bee6c0 testing: Add basic atf support to pytest.
Implementation consists of the pytest plugin implementing ATF format and
a simple C++ wrapper, which reorders the provided arguments from ATF format
to the format understandable by pytest. Each test has this wrapper specified
after the shebang. When kyua executes the test, wrapper calls pytest, which
loads atf plugin, does the work and returns the result. Additionally, a
separate python "package", `/usr/tests/atf_python` has been added to collect
code that may be useful across different tests.

Current limitations:
* Opaque metadata passing via X-Name properties. Require some fixtures to write
* `-s srcdir` parameter passed by the runner is ignored.
* No `atf-c-api(3)` or similar - relying on pytest framework & existing python libraries
* No support for `atf_tc_<get|has>_config_var()` & `atf_tc_set_md_var()`.
 Can be probably implemented with env variables & autoload fixtures

Differential Revision: https://reviews.freebsd.org/D31084
Reviewed by:	kp, ngie
2022-06-25 19:25:15 +00:00
Alan Somers
3c5ba95ad1 Fix sys/opencrypto/blake2_test when kern.cryptodevallowsoft=0
Two of these testcases require software crypto to be enabled. Curiously, it
isn't by default.

PR:		230671
Reported by:	Jenkins
Reviewed by:	cem
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D16755
2018-08-16 23:49:56 +00:00
Enji Cooper
11b249f99e Add ATF_REQUIRE_FEATURE and PLAIN_REQUIRE_FEATURE macros for
testing for kernel features via the feature_present(3) libcall

The semantics are similar to the other macros in the header (skip
testcase with ATF macro; exit with appropriate exit code with the
PLAIN macro)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-12-16 05:44:53 +00:00
Enji Cooper
7ad92e6ab7 Fix typo. It should have been atf_tc_skip, not atf_skip
Reported by: many, Jenkins
Pointyhat to: ngie
MFC after: 4 days
2015-04-29 19:08:11 +00:00
Enji Cooper
c82b9f9234 ATF_REQUIRE_KERNEL_MODULE: use atf_skip, not ATF_REQUIRE_MSG so the testcase
no longer bombs out
PLAIN_REQUIRE_KERNEL_MODULE: use printf + _exit, no err so the testcase no
longer bombs out if it prints to stderr

MFC after: 5 days
2015-04-29 08:56:56 +00:00
Enji Cooper
b740c88bfb Add initial (unpolished) macros for interfacing with the FreeBSD test suite
This is very rough, but will be replaced/redesigned some time soon after I fix
the Jenkins breakage I introduced

MFC after: 6 days
2015-04-28 10:50:31 +00:00