All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Jonathan Corbet" <corbet@lwn.net>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Ralph Campbell" <rcampbell@nvidia.com>,
	"Shuah Khan" <shuah@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-s390@vger.kernel.org,
	"John Hubbard" <jhubbard@nvidia.com>
Subject: [PATCH 4/8] selftests/vm: minor cleanup: Makefile and gup_test.c
Date: Sun, 27 Sep 2020 23:21:55 -0700	[thread overview]
Message-ID: <20200928062159.923212-5-jhubbard@nvidia.com> (raw)
In-Reply-To: <20200928062159.923212-1-jhubbard@nvidia.com>

A few cleanups that don't deserve separate patches, but that
also should not clutter up other functional changes:

1. Remove an unnecessary #include <prctl.h>

2. Restore the sorted order of TEST_GEN_FILES.

3. Add -lpthread to the common LDLIBS, as it is harmless and several
   tests use it. Including, soon, gup_test.c. This gets rid of one
   special rule already.

Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 tools/testing/selftests/vm/Makefile   | 10 ++++------
 tools/testing/selftests/vm/gup_test.c |  1 -
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index 5a3bd0c497b6..2579242386ac 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -21,14 +21,15 @@ MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/')
 MAKEFLAGS += --no-builtin-rules
 
 CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
-LDLIBS = -lrt
+LDLIBS = -lrt -lpthread
 TEST_GEN_FILES = compaction_test
 TEST_GEN_FILES += gup_test
 TEST_GEN_FILES += hmm-tests
 TEST_GEN_FILES += hugepage-mmap
 TEST_GEN_FILES += hugepage-shm
-TEST_GEN_FILES += map_hugetlb
+TEST_GEN_FILES += khugepaged
 TEST_GEN_FILES += map_fixed_noreplace
+TEST_GEN_FILES += map_hugetlb
 TEST_GEN_FILES += map_populate
 TEST_GEN_FILES += mlock-random-test
 TEST_GEN_FILES += mlock2-tests
@@ -37,7 +38,6 @@ TEST_GEN_FILES += on-fault-limit
 TEST_GEN_FILES += thuge-gen
 TEST_GEN_FILES += transhuge-stress
 TEST_GEN_FILES += userfaultfd
-TEST_GEN_FILES += khugepaged
 
 ifeq ($(ARCH),x86_64)
 CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_32bit_program.c -m32)
@@ -76,7 +76,7 @@ TEST_FILES := test_vmalloc.sh
 KSFT_KHDR_INSTALL := 1
 include ../lib.mk
 
-$(OUTPUT)/hmm-tests: LDLIBS += -lhugetlbfs -lpthread
+$(OUTPUT)/hmm-tests: LDLIBS += -lhugetlbfs
 
 ifeq ($(ARCH),x86_64)
 BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32))
@@ -127,8 +127,6 @@ warn_32bit_failure:
 endif
 endif
 
-$(OUTPUT)/userfaultfd: LDLIBS += -lpthread
-
 $(OUTPUT)/mlock-random-test: LDLIBS += -lcap
 
 $(OUTPUT)/gup_test: ../../../../mm/gup_test.h
diff --git a/tools/testing/selftests/vm/gup_test.c b/tools/testing/selftests/vm/gup_test.c
index 70db259582c3..4e9f5d0ed0fc 100644
--- a/tools/testing/selftests/vm/gup_test.c
+++ b/tools/testing/selftests/vm/gup_test.c
@@ -4,7 +4,6 @@
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
-#include <sys/prctl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include "../../../../mm/gup_test.h"
-- 
2.28.0


  parent reply	other threads:[~2020-09-28  6:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28  6:21 [PATCH 0/8] selftests/vm: gup_test, hmm-tests, assorted improvements John Hubbard
2020-09-28  6:21 ` [PATCH 1/8] mm/gup_benchmark: rename to mm/gup_test John Hubbard
2020-09-28  6:21 ` [PATCH 2/8] selftests/vm: use a common gup_test.h John Hubbard
2020-09-28 12:57   ` Jason Gunthorpe
2020-09-28 20:10     ` John Hubbard
2020-09-29 16:35       ` Jason Gunthorpe
2020-09-29 17:44         ` John Hubbard
2020-09-29 17:55           ` Jason Gunthorpe
2020-09-29 18:59             ` John Hubbard
2020-09-29 19:08               ` Jason Gunthorpe
2020-09-29 19:48                 ` John Hubbard
2020-09-29 19:53                   ` Jason Gunthorpe
2020-09-29 20:00                     ` Shuah Khan
2020-09-29 20:11                       ` John Hubbard
2020-09-29 20:20                         ` Shuah Khan
2020-09-29 20:36                           ` John Hubbard
2020-09-28  6:21 ` [PATCH 3/8] selftests/vm: rename run_vmtests --> run_vmtests.sh John Hubbard
2020-09-28  6:21 ` John Hubbard [this message]
2020-09-28  6:21 ` [PATCH 5/8] selftests/vm: only some gup_test items are really benchmarks John Hubbard
2020-09-28  6:21 ` [PATCH 6/8] selftests/vm: gup_test: introduce the dump_pages() sub-test John Hubbard
2020-09-28 19:25   ` Ira Weiny
2020-09-28  6:21 ` [PATCH 7/8] selftests/vm: run_vmtest.sh: update and clean up gup_test invocation John Hubbard
2020-09-28 19:26   ` Ira Weiny
2020-09-28 19:58     ` John Hubbard
2020-09-28  6:21 ` [PATCH 8/8] selftests/vm: hmm-tests: remove the libhugetlbfs dependency John Hubbard
2020-09-28 13:02   ` Jason Gunthorpe
2020-09-28 20:18     ` John Hubbard
2020-09-28 20:45       ` John Hubbard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200928062159.923212-5-jhubbard@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=jglisse@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=rcampbell@nvidia.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.