Skip to contentSkip to conversation

selftests/mm: Add configs to fix testcase failure

PATCH Applied Dev Jain 5 participants 5 messages Jun 13, 2025

Subsystems (3)
lore
Share & tools
lore

Dev Jain

author
#0 lore raw

PATCH v2 1/1 selftests/mm: Add configs to fix testcase failure

If CONFIG_UPROBES is not set, a merge subtest fails:

Failure log:

  7151 12:46:54.627936  # # #  RUN           merge.handle_uprobe_upon_merged_vma ...
  7152 12:46:54.639014  # # f /sys/bus/event_source/devices/uprobe/type
  7153 12:46:54.639306  # # fopen: No such file or directory
  7154 12:46:54.650451  # # # merge.c:473:handle_uprobe_upon_merged_vma:Expected read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type) (1) == 0 (0)
  7155 12:46:54.650730  # # # handle_uprobe_upon_merged_vma: Test terminated by assertion
  7156 12:46:54.661750  # # #          FAIL  merge.handle_uprobe_upon_merged_vma
  7157 12:46:54.662030  # # not ok 8 merge.handle_uprobe_upon_merged_vma

CONFIG_UPROBES is enabled by CONFIG_UPROBE_EVENTS, which gets enabled by CONFIG_FTRACE. Therefore add these configs to selftests/mm/config so that CI systems can include this config in the kernel build. To be completely safe, add CONFIG_PROFILING too, to enable the dependency chain PROFILING -> PERF_EVENTS -> UPROBE_EVENTS -> UPROBES.

Fixes efe99fabeb11b ("selftests/mm: add test about uprobe pte be orphan during vma merge")

---
v1->v2:
- Add CONFIG_UPROBES (Mark Brown)
- Add CONFIG_PROFILING (Lorenzo)

 tools/testing/selftests/mm/config | 3 +++
 1 file changed, 3 insertions(+)
tools/testing/selftests/mm/config +3 -0
index a28baa536332..deba93379c80 100644
@@ -8,3 +8,6 @@ CONFIG_GUP_TEST=y
 CONFIG_TRANSPARENT_HUGEPAGE=y
 CONFIG_MEM_SOFT_DIRTY=y
 CONFIG_ANON_VMA_NAME=y
+CONFIG_FTRACE=y
+CONFIG_PROFILING=y
+CONFIG_UPROBES=y
Signature · 1 line
2.30.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 38 lines · Dev Jain

If CONFIG_UPROBES is not set, a merge subtest fails:

Failure log:

  7151 12:46:54.627936  # # #  RUN           merge.handle_uprobe_upon_merged_vma ...
  7152 12:46:54.639014  # # f /sys/bus/event_source/devices/uprobe/type
  7153 12:46:54.639306  # # fopen: No such file or directory
  7154 12:46:54.650451  # # # merge.c:473:handle_uprobe_upon_merged_vma:Expected read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type) (1) == 0 (0)
  7155 12:46:54.650730  # # # handle_uprobe_upon_merged_vma: Test terminated by assertion
  7156 12:46:54.661750  # # #          FAIL  merge.handle_uprobe_upon_merged_vma
  7157 12:46:54.662030  # # not ok 8 merge.handle_uprobe_upon_merged_vma

CONFIG_UPROBES is enabled by CONFIG_UPROBE_EVENTS, which gets enabled by CONFIG_FTRACE. Therefore add these configs to selftests/mm/config so that CI systems can include this config in the kernel build. To be completely safe, add CONFIG_PROFILING too, to enable the dependency chain PROFILING -> PERF_EVENTS -> UPROBE_EVENTS -> UPROBES.

Fixes efe99fabeb11b ("selftests/mm: add test about uprobe pte be orphan during vma merge")

---
v1->v2:
- Add CONFIG_UPROBES (Mark Brown)
- Add CONFIG_PROFILING (Lorenzo)

 tools/testing/selftests/mm/config | 3 +++
 1 file changed, 3 insertions(+)
tools/testing/selftests/mm/config +0 -0
index a28baa536332..deba93379c80 100644

tools/testing/selftests/mm/config CONFIG_GUP_TEST=y · line 13

Quoted 6 lines
tools/testing/selftests/mm/config +3 -0
@@ -8,3 +8,6 @@ CONFIG_GUP_TEST=y
 CONFIG_TRANSPARENT_HUGEPAGE=y
 CONFIG_MEM_SOFT_DIRTY=y
 CONFIG_ANON_VMA_NAME=y
+CONFIG_FTRACE=y
+CONFIG_PROFILING=y
+CONFIG_UPROBES=y
Reviewed-by on v2 1/1
#3 lore raw
In reply to Dev Jain
Quoted 38 lines · Dev Jain

If CONFIG_UPROBES is not set, a merge subtest fails:

Failure log:

   7151 12:46:54.627936  # # #  RUN           merge.handle_uprobe_upon_merged_vma ...
   7152 12:46:54.639014  # # f /sys/bus/event_source/devices/uprobe/type
   7153 12:46:54.639306  # # fopen: No such file or directory
   7154 12:46:54.650451  # # # merge.c:473:handle_uprobe_upon_merged_vma:Expected read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type) (1) == 0 (0)
   7155 12:46:54.650730  # # # handle_uprobe_upon_merged_vma: Test terminated by assertion
   7156 12:46:54.661750  # # #          FAIL  merge.handle_uprobe_upon_merged_vma
   7157 12:46:54.662030  # # not ok 8 merge.handle_uprobe_upon_merged_vma

CONFIG_UPROBES is enabled by CONFIG_UPROBE_EVENTS, which gets enabled by CONFIG_FTRACE. Therefore add these configs to selftests/mm/config so that CI systems can include this config in the kernel build. To be completely safe, add CONFIG_PROFILING too, to enable the dependency chain PROFILING -> PERF_EVENTS -> UPROBE_EVENTS -> UPROBES.

Fixes efe99fabeb11b ("selftests/mm: add test about uprobe pte be orphan during vma merge")

---
v1->v2:
- Add CONFIG_UPROBES (Mark Brown)
- Add CONFIG_PROFILING (Lorenzo)

  tools/testing/selftests/mm/config | 3 +++
  1 file changed, 3 insertions(+)
tools/testing/selftests/mm/config +0 -0
index a28baa536332..deba93379c80 100644

tools/testing/selftests/mm/config CONFIG_GUP_TEST=y · line 13

Quoted 6 lines
tools/testing/selftests/mm/config +3 -0
@@ -8,3 +8,6 @@ CONFIG_GUP_TEST=y
  CONFIG_TRANSPARENT_HUGEPAGE=y
  CONFIG_MEM_SOFT_DIRTY=y
  CONFIG_ANON_VMA_NAME=y
+CONFIG_FTRACE=y
+CONFIG_PROFILING=y
+CONFIG_UPROBES=y

This looks good to me.

Reviewed-by on v2 1/1
#4 lore raw
In reply to Dev Jain
Quoted 18 lines · Dev Jain

If CONFIG_UPROBES is not set, a merge subtest fails:

Failure log:

  7151 12:46:54.627936  # # #  RUN           merge.handle_uprobe_upon_merged_vma ...
  7152 12:46:54.639014  # # f /sys/bus/event_source/devices/uprobe/type
  7153 12:46:54.639306  # # fopen: No such file or directory
  7154 12:46:54.650451  # # # merge.c:473:handle_uprobe_upon_merged_vma:Expected read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type) (1) == 0 (0)
  7155 12:46:54.650730  # # # handle_uprobe_upon_merged_vma: Test terminated by assertion
  7156 12:46:54.661750  # # #          FAIL  merge.handle_uprobe_upon_merged_vma
  7157 12:46:54.662030  # # not ok 8 merge.handle_uprobe_upon_merged_vma

CONFIG_UPROBES is enabled by CONFIG_UPROBE_EVENTS, which gets enabled by CONFIG_FTRACE. Therefore add these configs to selftests/mm/config so that CI systems can include this config in the kernel build. To be completely safe, add CONFIG_PROFILING too, to enable the dependency chain PROFILING -> PERF_EVENTS -> UPROBE_EVENTS -> UPROBES.

Quoted 7 lines
Fixes efe99fabeb11b ("selftests/mm: add test about uprobe pte be orphan during vma merge")
Signature · 1 line
Pedro