Re: [PATCH v2 12/13] selftests/ftrace: add uprobe tests on overlayfs
From: Masami Hiramatsu (Google)
Date: Tue Nov 17 2026 - 20:51:20 EST
On Mon, 16 Nov 2026 10:44:09 +0100, Christian Brauner <brauner@xxxxxxxxxx> wrote:
> diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe_overlayfs.tc b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe_overlayfs.tc
> --- a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe_overlayfs.tc
> +++ b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe_overlayfs.tc
> @@ -0,0 +1,96 @@
> +
> +OVL=$TMPDIR/ovl
> +mkdir $OVL
> +mount -t tmpfs tmpfs $OVL
nit: If `CONFIG_TMPFS` is not enabled in the running kernel, `mount -t
tmpfs` will fail under `set -e` and report `[FAIL]` instead of
`[UNSUPPORTED]`.
Maybe you need to check tmpfs support in /proc/filesystems too?
> +
> +cleanup() {
> + echo 0 > events/enable
> [...]
> +setfattr -n trusted.overlay.metacopy $OVL/lower/broken
> +setfattr -n trusted.overlay.redirect -v /missing $OVL/lower/broken
> +
> +mount -t overlay overlay -o lowerdir=$OVL/lower::$OVL/data $OVL/merged
Similarly to `test_attach_api_fails_ovl_no_data()` in patch 13/13, if
mounting overlayfs with data-only lower layers
(`lowerdir=$OVL/lower::$OVL/data`) fails (e.g., on an older kernel that
lacks data-only layer support), it would be better to skip with
`exit_unsupported` rather than failing the test.
(Note that this selftest can be ran on older stable kernels.)
Thank you,
> +
> +TAINT_WARN=512
> +TAINTED=`cat /proc/sys/kernel/tainted`
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>