LKML Archive on
help / color / mirror / Atom feed
From: Shuah Khan <>
Cc: Shuah Khan <>,,
Subject: [PATCH v2] selftests: kcmp build fails when invoked from kselftest target
Date: Tue, 10 Mar 2015 18:08:32 -0600	[thread overview]
Message-ID: <> (raw)

kcmp Makefile doesn't have an explicit build rule. As a result,
kcmp build fails, when it is run from top level Makefile target
kselftest. Without the explicit rule, make works only when it is
run in the current directory or from selftests directory. Add an
explicit build rule to fix the problem. In addition, build fails
as it can't find kcmp.h. Fix it by passing CFLAGS.

Signed-off-by: Shuah Khan <>
v2: Added deleted pre-requisite back in to address review

 tools/testing/selftests/kcmp/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
index ff0eefd..d615e9c 100644
--- a/tools/testing/selftests/kcmp/Makefile
+++ b/tools/testing/selftests/kcmp/Makefile
@@ -1,8 +1,11 @@
-CFLAGS += -I../../../../usr/include/
+CFLAGS += -I../../../../include/uapi -I../../../../usr/include/
 all: kcmp_test
+	$(CC) $(CFLAGS) kcmp_test.c -o kcmp_test
 run_tests: all
 	@./kcmp_test || echo "kcmp_test: [FAIL]"

             reply	other threads:[~2015-03-11  0:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11  0:08 Shuah Khan [this message]
2015-03-11  2:19 ` [PATCH v2] selftests: kcmp build fails when invoked from kselftest target Michael Ellerman
2015-03-11 13:30   ` Shuah Khan

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:

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

  git send-email \ \ \ \ \ \ \ \ \

* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).