* [PATCH 1/3] common/cgroup2: better error message if cgroup2 fs is not mounted
@ 2019-07-15 8:25 Christoph Hellwig
2019-07-15 8:25 ` [PATCH 2/3] shared/011: run for all block device based file systems Christoph Hellwig
2019-07-15 8:25 ` [PATCH 3/3] shared/011: move to generic/ Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2019-07-15 8:25 UTC (permalink / raw)
To: fstests
Improve the _require_cgroup2 helper to print a more useful message
if the cgroup2 fs is not mounted.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
common/cgroup2 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/common/cgroup2 b/common/cgroup2
index f89825e2..8833c9c8 100644
--- a/common/cgroup2
+++ b/common/cgroup2
@@ -4,9 +4,14 @@ export CGROUP2_PATH="${CGROUP2_PATH:-/sys/fs/cgroup}"
_require_cgroup2()
{
+ if [ `findmnt -d backward -n -o FSTYPE -f ${CGROUP2_PATH}` != "cgroup2" ]; then
+ _notrun "cgroup2 not mounted on ${CGROUP2_PATH}"
+ fi
+
if [ ! -f "${CGROUP2_PATH}/cgroup.subtree_control" ]; then
_notrun "Test requires cgroup2 enabled"
fi
+
if [[ ! $(cat ${CGROUP2_PATH}/cgroup.controllers) =~ $1 ]]; then
_notrun "Cgroup2 doesn't support $1 controller $1"
fi
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/3] shared/011: run for all block device based file systems
2019-07-15 8:25 [PATCH 1/3] common/cgroup2: better error message if cgroup2 fs is not mounted Christoph Hellwig
@ 2019-07-15 8:25 ` Christoph Hellwig
2019-07-15 8:25 ` [PATCH 3/3] shared/011: move to generic/ Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2019-07-15 8:25 UTC (permalink / raw)
To: fstests
Cgroupv2 writeback support can't be easily detected. But it is
kindof expected from block based file systems and can be easily
added, so just assume support and fail if it doesn't work.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
tests/shared/011 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/shared/011 b/tests/shared/011
index a0ac375d..b4cdc5ed 100755
--- a/tests/shared/011
+++ b/tests/shared/011
@@ -39,11 +39,14 @@ rm -f $seqres.full
# real QA test starts here
# Modify as appropriate.
-_supported_fs ext4 btrfs
+_supported_fs generic
_supported_os Linux
_require_scratch
_require_cgroup2 io
+# cgroup v2 writeback is only support on block devices so far
+_require_block_device $SCRATCH_DEV
+
smajor=$((0x`stat -L -c %t $SCRATCH_DEV`))
sminor=$((0x`stat -L -c %T $SCRATCH_DEV`))
cgdir=$CGROUP2_PATH
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] shared/011: move to generic/
2019-07-15 8:25 [PATCH 1/3] common/cgroup2: better error message if cgroup2 fs is not mounted Christoph Hellwig
2019-07-15 8:25 ` [PATCH 2/3] shared/011: run for all block device based file systems Christoph Hellwig
@ 2019-07-15 8:25 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2019-07-15 8:25 UTC (permalink / raw)
To: fstests
Now that we run the test for all block device based file systems, there
is no reason to keep it out of generic.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
tests/{shared/011 => generic/563} | 0
tests/{shared/011.out => generic/563.out} | 0
tests/generic/group | 1 +
tests/shared/group | 1 -
4 files changed, 1 insertion(+), 1 deletion(-)
rename tests/{shared/011 => generic/563} (100%)
rename tests/{shared/011.out => generic/563.out} (100%)
diff --git a/tests/shared/011 b/tests/generic/563
similarity index 100%
rename from tests/shared/011
rename to tests/generic/563
diff --git a/tests/shared/011.out b/tests/generic/563.out
similarity index 100%
rename from tests/shared/011.out
rename to tests/generic/563.out
diff --git a/tests/generic/group b/tests/generic/group
index 9ceaf317..284a1d93 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -565,3 +565,4 @@
560 auto stress dedupe
561 auto stress dedupe
562 auto clone
+563 auto quick
diff --git a/tests/shared/group b/tests/shared/group
index 6112c8dd..a8b926d8 100644
--- a/tests/shared/group
+++ b/tests/shared/group
@@ -4,6 +4,5 @@
# - comment line before each group is "new" description
#
002 auto metadata quick log
-011 auto quick
032 mkfs auto quick
298 auto trim
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-15 8:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-15 8:25 [PATCH 1/3] common/cgroup2: better error message if cgroup2 fs is not mounted Christoph Hellwig
2019-07-15 8:25 ` [PATCH 2/3] shared/011: run for all block device based file systems Christoph Hellwig
2019-07-15 8:25 ` [PATCH 3/3] shared/011: move to generic/ Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox