#
96950419 |
| 27-Nov-2023 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tests: don't run atf_* in a subshell
Shell limitation is that a classic function call via $() is a subshell and atf-sh(3) commands won't work as epxected there. Subsequently, atf_skip inside a func
tests: don't run atf_* in a subshell
Shell limitation is that a classic function call via $() is a subshell and atf-sh(3) commands won't work as epxected there. Subsequently, atf_skip inside a function won't skip a test. The test will fail later.
A working approach is to pass desired variable name as argument to a function and don't run subshell.
Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D42646 Fixes: ea82362219ee715cfbb195b2114e73fdc8599fa5
show more ...
|
#
d0b2dbfa |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
#
cf551b8a |
| 02-Dec-2018 |
Alan Somers <asomers@FreeBSD.org> |
Unbreak geli/gmirror testcases if their geom classes cannot be loaded
The problem with the logic prior to this commit was twofold:
1. The wrong set of idioms (TAP-compatible) were being applied to
Unbreak geli/gmirror testcases if their geom classes cannot be loaded
The problem with the logic prior to this commit was twofold:
1. The wrong set of idioms (TAP-compatible) were being applied to the ATF testcases when run, resulting in confusing ATF failure results on setup. 2. The cleanup subroutines were broken when the geom classes could not be loaded as they exited with 0 unexpectedly.
This commit changes the test code to source the class-specific configuration (conf.sh) once globally, instead of sourcing it per testcase and per cleanup subroutine, and to call the ATF-specific setup subroutine(s) inline in the testcases.
The refactoring done is effectively a no-op for the TAP testcases, modulo any refactoring done to create common code between the ATF and TAP testcases.
This unbreaks the geli testcases converted to ATF in r327662 and r327683, and the gmirror testcases added in r327780, respectively, when the geom class could not be loaded.
tests/sys/geom/class/mirror/... While here, ignore errors when turning debug failpoint sysctl off, which could occur if the gmirror class was not loaded.
Submitted by: ngie MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd/pull/241
show more ...
|
#
f397a004 |
| 07-Jan-2018 |
Alan Somers <asomers@FreeBSD.org> |
geli: convert most tests from TAP to ATF
I'm leaving readonly_test and nokey_test alone for now. In a future commit they should be broken up into several smaller test cases and distributed between m
geli: convert most tests from TAP to ATF
I'm leaving readonly_test and nokey_test alone for now. In a future commit they should be broken up into several smaller test cases and distributed between multiple files.
Reviewed by: ngie MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D13717
show more ...
|
#
3a8d2bd4 |
| 29-Dec-2017 |
Alan Somers <asomers@FreeBSD.org> |
geli: fix the resize test on arm64
The resize test used bsdlabel(8), which is not available on all architectures. Change it to use gpart(8) instead, which should be available everywhere.
PR: 2217
geli: fix the resize test on arm64
The resize test used bsdlabel(8), which is not available on all architectures. Change it to use gpart(8) instead, which should be available everywhere.
PR: 221763 Reported by: andrew MFC after: 2 weeks
show more ...
|
#
041999e3 |
| 29-Dec-2017 |
Alan Somers <asomers@FreeBSD.org> |
Fix potential TOCTTOU bug in the geli tests
This change mostly reverts r293436, which introduced the bug due to a belief that geli(8) would allocate md(4) devices by itself. However, that belief is
Fix potential TOCTTOU bug in the geli tests
This change mostly reverts r293436, which introduced the bug due to a belief that geli(8) would allocate md(4) devices by itself. However, that belief is incorrect. Instead of using linear probing to find available md(4) numbers, it's best to use the existing attach_md function.
Reviewed by: ngie MFC after: 2 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13666
show more ...
|
#
5b347b28 |
| 10-Oct-2017 |
Enji Cooper <ngie@FreeBSD.org> |
Check the exit code from fsck_ffs instead of relying on MODIFIED being in the output
^/head@r323923 changed when MODIFIED is printed at exit. It's better to follow the documented way of determining
Check the exit code from fsck_ffs instead of relying on MODIFIED being in the output
^/head@r323923 changed when MODIFIED is printed at exit. It's better to follow the documented way of determining whether or not a filesystem is clean per fsck_ffs, i.e., ensure that the exit code is either 0 or 7.
The pass/fail determination is brittle prior to this commit, and ^/head@r323923 made the issue apparent -- thus this needs to be fixed independent of ^/head@r323923.
PR: 222780 MFC after: 1 week MFC with: r323923 Reported by: Jenkins
show more ...
|
#
d29c5551 |
| 22-Sep-2016 |
Ruslan Bukin <br@FreeBSD.org> |
Use bsdlabel as we don't have hardlink disklabel -> bsdlabel on some platforms.
Reviewed by: ngie Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D79
Use bsdlabel as we don't have hardlink disklabel -> bsdlabel on some platforms.
Reviewed by: ngie Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D7968
show more ...
|
#
09d98641 |
| 13-Jan-2016 |
Enji Cooper <ngie@FreeBSD.org> |
Integrate tools/regression/geom_{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip} in to the FreeBSD test suite as tests/sys/geom/class/{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}
The too
Integrate tools/regression/geom_{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip} in to the FreeBSD test suite as tests/sys/geom/class/{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}
The tools/regression/geom and tools/regression/geom_part testcases are being left alone because both test sets are both currently broken.
The majority of this work was done on ^/user/ngie/more-tests2 . The differences are as follows: - tests/sys/geom/class/Makefile.inc is not present; it was inlined into the class's Makefiles for explicitness. - The testcases officially require root via kyua - The geom_gate(4) tests don't use the pidfile changes proposed in https://reviews.freebsd.org/D4836 .
MFC after: 1 month Sponsored by: EMC / Isilon Storage Division
show more ...
|