Re: [PATCH v3 3/3] selftests/mm: add new selftests for KSM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-02-27 12:19, Stefan Roesch wrote:

Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> writes:

On Thu, 23 Feb 2023 20:40:00 -0800 Stefan Roesch <shr@xxxxxxxxxxxx> wrote:

This adds three new tests to the selftests for KSM. These tests use the
new prctl API's to enable and disable KSM.

...

diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
index d90cdc06aa59..507cb22bdebd 100644
--- a/tools/testing/selftests/mm/Makefile
+++ b/tools/testing/selftests/mm/Makefile
@@ -29,7 +29,8 @@ MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/p
  # LDLIBS.
  MAKEFLAGS += --no-builtin-rules

-CFLAGS = -Wall -I $(top_srcdir) -I $(top_srcdir)/usr/include $(EXTRA_CFLAGS) $(KHDR_INCLUDES)
+CFLAGS = -Wall -I $(top_srcdir)/tools/include/uapi
+CFLAGS += -I $(top_srcdir) -I $(top_srcdir)/usr/include $(EXTRA_CFLAGS) $(KHDR_INCLUDES)
  LDLIBS = -lrt -lpthread
  TEST_GEN_FILES = cow
  TEST_GEN_FILES += compaction_test

This change runs afoul of the recently merged 8eb3751c73bec
("selftests: vm: Fix incorrect kernel headers search path").

I did this:

--- a/tools/testing/selftests/mm/Makefile~selftests-mm-add-new-selftests-for-ksm
+++ b/tools/testing/selftests/mm/Makefile
@@ -29,7 +29,7 @@ MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/p
  # LDLIBS.
  MAKEFLAGS += --no-builtin-rules

-CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES)
+CFLAGS = -Wall -I $(top_srcdir) -I $(top_srcdir)/tools/include/uapi $(EXTRA_CFLAGS) $(KHDR_INCLUDES)
  LDLIBS = -lrt -lpthread
  TEST_GEN_FILES = cow
  TEST_GEN_FILES += compaction_test
_

But I expect it's a bit wrong.  Please check?
This change looks good.

As the content of tools/include/uapi is indeed part of the kernel sources and not generated as the result of 'make headers' in an output directory which can be overridden by O=<...>, referring to it from $(top_srcdir) seems appropriate.

lgtm

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux