public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET v2] fstests: random fixes for v2025.02.02
@ 2025-02-04 21:22 Darrick J. Wong
  2025-02-04 21:22 ` [PATCH 01/34] generic/476: fix fsstress process management Darrick J. Wong
                   ` (34 more replies)
  0 siblings, 35 replies; 71+ messages in thread
From: Darrick J. Wong @ 2025-02-04 21:22 UTC (permalink / raw)
  To: zlang, djwong; +Cc: dchinner, joannelkoong, fstests, linux-xfs

Hi all,

This is an unusually large set of bug fixes for fstests.  The first 20
patches in this patchset are corrections for that RFC series.

The most significant change is that I made ./check run each test with
its own Unix process session id.  This means that a test can use pkill
to kill all of its own subprocesses, without killing anyone else's
subprocesses.  I wasn't completely sold on that approach, but it works
for me.  A better approach is to run each test in a separate pid and
mount namespace, but then kernel support for that becomes a hard
requirement.  Both approaches seems to work for check and
check-parallel, though I've not tested that all that much.

Note: I am /not/ happy about Dave's RFC going straight to for-next
without even a complete review right before everyone went on PTO for
several weeks for xmas/solar new year.  But in the interests of getting
QA back on line for myself and everyone else who's having problems, here
it is.

At this point this series has accumulated even more bug fixes: an
unexplained insertion of -R in a umount command; fixes for the new
generic/759 hugepages IO test, fixes to the pptr size calculations in
common/fuzzy, memory consumption reductions in scrub fsstress tests,
fixes for excessive fsstress ops scaling, and some cleanups to how we
locate the fsstress and fsx binaries.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=random-fixes

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=random-fixes

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=random-fixes
---
Commits in this patchset:
 * generic/476: fix fsstress process management
 * metadump: make non-local function variables more obvious
 * metadump: fix cleanup for v1 metadump testing
 * generic/019: don't fail if fio crashes while shutting down
 * fuzzy: do not set _FSSTRESS_PID when exercising fsx
 * common/rc: revert recursive unmount in _clear_mount_stack
 * common/dump: don't replace pids arbitrarily
 * common/populate: correct the parent pointer name creation formulae
 * generic/759,760: fix MADV_COLLAPSE detection and inclusion
 * generic/759,760: skip test if we can't set up a hugepage for IO
 * common/rc: create a wrapper for the su command
 * fuzzy: kill subprocesses with SIGPIPE, not SIGINT
 * common/rc: hoist pkill to a helper function
 * common: fix pkill by running test program in a separate session
 * check: run tests in a private pid/mount namespace
 * check: deprecate using process sessions to isolate test instances
 * common/rc: don't copy fsstress to $TEST_DIR
 * unmount: resume logging of stdout and stderr for filtering
 * mkfs: don't hardcode log size
 * common/rc: return mount_ret in _try_scratch_mount
 * preamble: fix missing _kill_fsstress
 * generic/650: revert SOAK DURATION changes
 * generic/032: fix pinned mount failure
 * fuzzy: stop __stress_scrub_fsx_loop if fsx fails
 * fuzzy: don't use readarray for xfsfind output
 * fuzzy: always stop the scrub fsstress loop on error
 * fuzzy: port fsx and fsstress loop to use --duration
 * fix _require_scratch_duperemove ordering
 * fsstress: fix a memory leak
 * fsx: fix leaked log file pointer
 * misc: don't put nr_cpus into the fsstress -n argument
 * common/config: add $here to FSSTRESS_PROG
 * config: add FSX_PROG variable
 * build: initialize stack variables to zero by default
---
 check                 |   89 +++++++++++++++++++++++++------
 common/config         |    5 +-
 common/dump           |    1 
 common/fuzzy          |  100 ++++++++++++++++++++++-------------
 common/metadump       |   42 +++++++--------
 common/populate       |   13 +++--
 common/preamble       |    2 -
 common/quota          |    2 -
 common/rc             |  141 ++++++++++++++++++++++++++++++++++++++++++-------
 common/reflink        |    6 +-
 configure.ac          |    1 
 include/builddefs.in  |    3 +
 ltp/fsstress.c        |    1 
 ltp/fsx.c             |    8 ++-
 m4/package_libcdev.m4 |   14 +++++
 src/nsexec.c          |   18 +++++-
 src/xfsfind.c         |   14 ++++-
 tests/generic/019     |    2 -
 tests/generic/032     |    9 +++
 tests/generic/050     |    2 -
 tests/generic/075     |    2 -
 tests/generic/085     |    2 -
 tests/generic/093     |    2 -
 tests/generic/112     |    2 -
 tests/generic/125     |    2 -
 tests/generic/127     |   16 +++---
 tests/generic/128     |    2 -
 tests/generic/193     |   36 ++++++-------
 tests/generic/230     |   14 ++---
 tests/generic/231     |    4 +
 tests/generic/233     |    2 -
 tests/generic/270     |   12 ++--
 tests/generic/310     |    6 +-
 tests/generic/314     |    2 -
 tests/generic/327     |    2 -
 tests/generic/328     |    4 +
 tests/generic/355     |    2 -
 tests/generic/361     |    4 +
 tests/generic/453     |    6 +-
 tests/generic/455     |    2 -
 tests/generic/456     |    2 -
 tests/generic/457     |    2 -
 tests/generic/469     |    2 -
 tests/generic/476     |    4 +
 tests/generic/499     |    2 -
 tests/generic/504     |   15 +++++
 tests/generic/511     |    2 -
 tests/generic/514     |    2 -
 tests/generic/530     |    6 --
 tests/generic/531     |    6 --
 tests/generic/561     |    2 -
 tests/generic/573     |    2 -
 tests/generic/590     |    2 -
 tests/generic/600     |    2 -
 tests/generic/601     |    2 -
 tests/generic/603     |   10 ++-
 tests/generic/642     |    2 -
 tests/generic/650     |    6 +-
 tests/generic/673     |    2 -
 tests/generic/674     |    2 -
 tests/generic/675     |    2 -
 tests/generic/680     |    2 -
 tests/generic/681     |    2 -
 tests/generic/682     |    2 -
 tests/generic/683     |    2 -
 tests/generic/684     |    2 -
 tests/generic/685     |    2 -
 tests/generic/686     |    2 -
 tests/generic/687     |    2 -
 tests/generic/688     |    2 -
 tests/generic/691     |    8 +--
 tests/generic/721     |   10 ++-
 tests/generic/726     |    2 -
 tests/generic/727     |    2 -
 tests/generic/746     |    2 -
 tests/generic/750     |    2 -
 tests/generic/759     |    7 +-
 tests/generic/760     |    7 +-
 tests/xfs/149         |    2 -
 tests/xfs/501         |    2 -
 tests/xfs/502         |    2 -
 tests/xfs/530         |    2 -
 tests/xfs/720         |    2 -
 tests/xfs/795         |    2 -
 tests/xfs/803         |    2 -
 tools/run_seq_pidns   |   28 ++++++++++
 tools/run_seq_setsid  |   22 ++++++++
 87 files changed, 546 insertions(+), 250 deletions(-)
 create mode 100755 tools/run_seq_pidns
 create mode 100755 tools/run_seq_setsid


^ permalink raw reply	[flat|nested] 71+ messages in thread
* [PATCHSET v3] fstests: random fixes for v2025.02.02
@ 2025-02-12  3:30 Darrick J. Wong
  2025-02-12  3:33 ` [PATCH 12/34] fuzzy: kill subprocesses with SIGPIPE, not SIGINT Darrick J. Wong
  0 siblings, 1 reply; 71+ messages in thread
From: Darrick J. Wong @ 2025-02-12  3:30 UTC (permalink / raw)
  To: djwong, zlang; +Cc: dchinner, joannelkoong, fstests, linux-xfs

Hi all,

This is an unusually large set of bug fixes for fstests.  The first 20
patches in this patchset are corrections for that RFC series.

The most significant change is that I made ./check run each test with
its own Unix process session id.  This means that a test can use pkill
to kill all of its own subprocesses, without killing anyone else's
subprocesses.  I wasn't completely sold on that approach, but it works
for me.  A better approach is to run each test in a separate pid and
mount namespace, but then kernel support for that becomes a hard
requirement.  Both approaches seems to work for check and
check-parallel, though I've not tested that all that much.

Note: I am /not/ happy about Dave's RFC going straight to for-next
without even a complete review right before everyone went on PTO for
several weeks for xmas/solar new year.  But in the interests of getting
QA back on line for myself and everyone else who's having problems, here
it is.

At this point this series has accumulated even more bug fixes: an
unexplained insertion of -R in a umount command; fixes for the new
generic/759 hugepages IO test, fixes to the pptr size calculations in
common/fuzzy, memory consumption reductions in scrub fsstress tests,
fixes for excessive fsstress ops scaling, and some cleanups to how we
locate the fsstress and fsx binaries.

v2: update to 2025.02.02
v3: update with feedback from dchinner

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=random-fixes

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=random-fixes

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=random-fixes
---
Commits in this patchset:
 * generic/476: fix fsstress process management
 * metadump: make non-local function variables more obvious
 * metadump: fix cleanup for v1 metadump testing
 * generic/019: don't fail if fio crashes while shutting down
 * fuzzy: do not set _FSSTRESS_PID when exercising fsx
 * common/rc: revert recursive unmount in _clear_mount_stack
 * common/dump: don't replace pids arbitrarily
 * common/populate: correct the parent pointer name creation formulae
 * generic/759,760: fix MADV_COLLAPSE detection and inclusion
 * generic/759,760: skip test if we can't set up a hugepage for IO
 * common/rc: create a wrapper for the su command
 * fuzzy: kill subprocesses with SIGPIPE, not SIGINT
 * common/rc: hoist pkill to a helper function
 * common: fix pkill by running test program in a separate session
 * check: run tests in a private pid/mount namespace
 * check: deprecate using process sessions to isolate test instances
 * common/rc: don't copy fsstress to $TEST_DIR
 * unmount: resume logging of stdout and stderr for filtering
 * mkfs: don't hardcode log size
 * common/rc: return mount_ret in _try_scratch_mount
 * preamble: fix missing _kill_fsstress
 * generic/650: revert SOAK DURATION changes
 * generic/032: fix pinned mount failure
 * fuzzy: stop __stress_scrub_fsx_loop if fsx fails
 * fuzzy: don't use readarray for xfsfind output
 * fuzzy: always stop the scrub fsstress loop on error
 * fuzzy: port fsx and fsstress loop to use --duration
 * fix _require_scratch_duperemove ordering
 * fsstress: fix a memory leak
 * fsx: fix leaked log file pointer
 * misc: don't put nr_cpus into the fsstress -n argument
 * common/config: add $here to FSSTRESS_PROG
 * config: add FSX_PROG variable
 * build: initialize stack variables to zero by default
---
 check                 |   89 +++++++++++++++++++++++++------
 common/config         |    5 +-
 common/dump           |    1 
 common/fuzzy          |  102 ++++++++++++++++++++++-------------
 common/metadump       |   42 +++++++--------
 common/populate       |   13 +++--
 common/preamble       |    2 -
 common/quota          |    2 -
 common/rc             |  141 ++++++++++++++++++++++++++++++++++++++++++-------
 common/reflink        |    6 +-
 configure.ac          |    1 
 include/builddefs.in  |    3 +
 ltp/fsstress.c        |    1 
 ltp/fsx.c             |    8 ++-
 m4/package_libcdev.m4 |   14 +++++
 src/nsexec.c          |   18 +++++-
 src/xfsfind.c         |   14 ++++-
 tests/generic/019     |    2 -
 tests/generic/032     |    9 +++
 tests/generic/050     |    2 -
 tests/generic/075     |    2 -
 tests/generic/085     |    2 -
 tests/generic/093     |    2 -
 tests/generic/112     |    2 -
 tests/generic/125     |    2 -
 tests/generic/127     |   16 +++---
 tests/generic/128     |    2 -
 tests/generic/193     |   36 ++++++-------
 tests/generic/230     |   14 ++---
 tests/generic/231     |    4 +
 tests/generic/233     |    2 -
 tests/generic/270     |   12 ++--
 tests/generic/310     |    6 +-
 tests/generic/314     |    2 -
 tests/generic/327     |    2 -
 tests/generic/328     |    4 +
 tests/generic/355     |    2 -
 tests/generic/361     |    4 +
 tests/generic/453     |    6 +-
 tests/generic/455     |    2 -
 tests/generic/456     |    2 -
 tests/generic/457     |    2 -
 tests/generic/469     |    2 -
 tests/generic/476     |    4 +
 tests/generic/499     |    2 -
 tests/generic/504     |   15 +++++
 tests/generic/511     |    2 -
 tests/generic/514     |    2 -
 tests/generic/530     |    6 --
 tests/generic/531     |    6 --
 tests/generic/561     |    2 -
 tests/generic/573     |    2 -
 tests/generic/590     |    2 -
 tests/generic/600     |    2 -
 tests/generic/601     |    2 -
 tests/generic/603     |   10 ++-
 tests/generic/642     |    2 -
 tests/generic/650     |    6 +-
 tests/generic/673     |    2 -
 tests/generic/674     |    2 -
 tests/generic/675     |    2 -
 tests/generic/680     |    2 -
 tests/generic/681     |    2 -
 tests/generic/682     |    2 -
 tests/generic/683     |    2 -
 tests/generic/684     |    2 -
 tests/generic/685     |    2 -
 tests/generic/686     |    2 -
 tests/generic/687     |    2 -
 tests/generic/688     |    2 -
 tests/generic/691     |    8 +--
 tests/generic/721     |   10 ++-
 tests/generic/726     |    2 -
 tests/generic/727     |    2 -
 tests/generic/746     |    2 -
 tests/generic/750     |    2 -
 tests/generic/759     |    7 +-
 tests/generic/760     |    7 +-
 tests/xfs/149         |    2 -
 tests/xfs/501         |    2 -
 tests/xfs/502         |    2 -
 tests/xfs/530         |    2 -
 tests/xfs/720         |    2 -
 tests/xfs/795         |    2 -
 tests/xfs/803         |    2 -
 tools/run_privatens   |   28 ++++++++++
 tools/run_setsid      |   22 ++++++++
 87 files changed, 546 insertions(+), 252 deletions(-)
 create mode 100755 tools/run_privatens
 create mode 100755 tools/run_setsid


^ permalink raw reply	[flat|nested] 71+ messages in thread

end of thread, other threads:[~2025-02-12  6:10 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04 21:22 [PATCHSET v2] fstests: random fixes for v2025.02.02 Darrick J. Wong
2025-02-04 21:22 ` [PATCH 01/34] generic/476: fix fsstress process management Darrick J. Wong
2025-02-04 21:22 ` [PATCH 02/34] metadump: make non-local function variables more obvious Darrick J. Wong
2025-02-04 21:23 ` [PATCH 03/34] metadump: fix cleanup for v1 metadump testing Darrick J. Wong
2025-02-04 21:23 ` [PATCH 04/34] generic/019: don't fail if fio crashes while shutting down Darrick J. Wong
2025-02-04 21:23 ` [PATCH 05/34] fuzzy: do not set _FSSTRESS_PID when exercising fsx Darrick J. Wong
2025-02-04 21:23 ` [PATCH 06/34] common/rc: revert recursive unmount in _clear_mount_stack Darrick J. Wong
2025-02-05  0:07   ` Dave Chinner
2025-02-04 21:24 ` [PATCH 07/34] common/dump: don't replace pids arbitrarily Darrick J. Wong
2025-02-05  0:09   ` Dave Chinner
2025-02-04 21:24 ` [PATCH 08/34] common/populate: correct the parent pointer name creation formulae Darrick J. Wong
2025-02-04 21:24 ` [PATCH 09/34] generic/759,760: fix MADV_COLLAPSE detection and inclusion Darrick J. Wong
2025-02-04 21:24 ` [PATCH 10/34] generic/759,760: skip test if we can't set up a hugepage for IO Darrick J. Wong
2025-02-05 18:06   ` Darrick J. Wong
2025-02-04 21:25 ` [PATCH 11/34] common/rc: create a wrapper for the su command Darrick J. Wong
2025-02-05  0:14   ` Dave Chinner
2025-02-04 21:25 ` [PATCH 12/34] fuzzy: kill subprocesses with SIGPIPE, not SIGINT Darrick J. Wong
2025-02-05  0:16   ` Dave Chinner
2025-02-05 17:38     ` Darrick J. Wong
2025-02-04 21:25 ` [PATCH 13/34] common/rc: hoist pkill to a helper function Darrick J. Wong
2025-02-05  0:17   ` Dave Chinner
2025-02-04 21:25 ` [PATCH 14/34] common: fix pkill by running test program in a separate session Darrick J. Wong
2025-02-05  0:23   ` Dave Chinner
2025-02-05 17:43     ` Darrick J. Wong
2025-02-04 21:26 ` [PATCH 15/34] check: run tests in a private pid/mount namespace Darrick J. Wong
2025-02-05  0:37   ` Dave Chinner
2025-02-05 18:00     ` Darrick J. Wong
2025-02-05 18:19       ` Darrick J. Wong
2025-02-05 21:15         ` Dave Chinner
2025-02-05 21:25           ` Darrick J. Wong
2025-02-05 21:13       ` Dave Chinner
2025-02-04 21:26 ` [PATCH 16/34] check: deprecate using process sessions to isolate test instances Darrick J. Wong
2025-02-05  0:38   ` Dave Chinner
2025-02-04 21:26 ` [PATCH 17/34] common/rc: don't copy fsstress to $TEST_DIR Darrick J. Wong
2025-02-04 21:27 ` [PATCH 18/34] unmount: resume logging of stdout and stderr for filtering Darrick J. Wong
2025-02-04 21:27 ` [PATCH 19/34] mkfs: don't hardcode log size Darrick J. Wong
2025-02-05  0:40   ` Dave Chinner
2025-02-04 21:27 ` [PATCH 20/34] common/rc: return mount_ret in _try_scratch_mount Darrick J. Wong
2025-02-05  0:42   ` Dave Chinner
2025-02-05 18:03     ` Darrick J. Wong
2025-02-04 21:27 ` [PATCH 21/34] preamble: fix missing _kill_fsstress Darrick J. Wong
2025-02-04 21:28 ` [PATCH 22/34] generic/650: revert SOAK DURATION changes Darrick J. Wong
2025-02-05  0:43   ` Dave Chinner
2025-02-04 21:28 ` [PATCH 23/34] generic/032: fix pinned mount failure Darrick J. Wong
2025-02-04 21:28 ` [PATCH 24/34] fuzzy: stop __stress_scrub_fsx_loop if fsx fails Darrick J. Wong
2025-02-05  0:44   ` Dave Chinner
2025-02-04 21:28 ` [PATCH 25/34] fuzzy: don't use readarray for xfsfind output Darrick J. Wong
2025-02-04 21:29 ` [PATCH 26/34] fuzzy: always stop the scrub fsstress loop on error Darrick J. Wong
2025-02-05  0:45   ` Dave Chinner
2025-02-04 21:29 ` [PATCH 27/34] fuzzy: port fsx and fsstress loop to use --duration Darrick J. Wong
2025-02-05  0:50   ` Dave Chinner
2025-02-05 18:08     ` Darrick J. Wong
2025-02-04 21:29 ` [PATCH 28/34] fix _require_scratch_duperemove ordering Darrick J. Wong
2025-02-05  0:51   ` Dave Chinner
2025-02-04 21:29 ` [PATCH 29/34] fsstress: fix a memory leak Darrick J. Wong
2025-02-05  0:54   ` Dave Chinner
2025-02-04 21:30 ` [PATCH 30/34] fsx: fix leaked log file pointer Darrick J. Wong
2025-02-05  0:57   ` Dave Chinner
2025-02-04 21:30 ` [PATCH 31/34] misc: don't put nr_cpus into the fsstress -n argument Darrick J. Wong
2025-02-05  1:00   ` Dave Chinner
2025-02-04 21:30 ` [PATCH 32/34] common/config: add $here to FSSTRESS_PROG Darrick J. Wong
2025-02-05  1:00   ` Dave Chinner
2025-02-04 21:30 ` [PATCH 33/34] config: add FSX_PROG variable Darrick J. Wong
2025-02-05  1:04   ` Dave Chinner
2025-02-04 21:31 ` [PATCH 34/34] build: initialize stack variables to zero by default Darrick J. Wong
2025-02-05  1:05   ` Dave Chinner
2025-02-05 12:46 ` [PATCHSET v2] fstests: random fixes for v2025.02.02 Amir Goldstein
  -- strict thread matches above, loose matches on Subject: below --
2025-02-12  3:30 [PATCHSET v3] " Darrick J. Wong
2025-02-12  3:33 ` [PATCH 12/34] fuzzy: kill subprocesses with SIGPIPE, not SIGINT Darrick J. Wong
2025-02-12  4:45   ` Dave Chinner
2025-02-12  6:05     ` Darrick J. Wong
2025-02-12  6:10   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox