Skip to contentSkip to conversation

selftests/android/ion: Makefile: fix build error

PATCH In review Anders Roxell 3 participants 4 messages Mar 8, 2018 – Mar 21, 2018 Kselftest

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/android/ion: Makefile: fix build error

Fails to build iomap_test.c due to missing include

gcc -I. -I../../../../../drivers/staging/android/uapi/ -Wall -O2 -g
ionmap_test.c ipcsocket.c ionutils.c -o ionmap_test
ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory

 #include <linux/dma-buf.h>
                           ^

compilation terminated.
<builtin>: recipe for target 'ionmap_test' failed
make[2]: *** [ionmap_test] Error 1

In the current code, we add a new -I ../../../../../usr/include/ to the INCLUDEDIR variable. Also add ionmap_test to the .gitignore file.

Fixes ac93f7046a53 ("selftests: ion: Add simple test with the vgem driver")
Signed-off-by Anders Roxell <anders.roxell at linaro.org>
---
 tools/testing/selftests/android/ion/.gitignore | 1 +
 tools/testing/selftests/android/ion/Makefile   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/android/ion/.gitignore +1 -0
index 67e6f391b2a9..95e8f4561474 100644
@@ -1,2 +1,3 @@
 ionapp_export
 ionapp_import
+ionmap_test
tools/testing/selftests/android/ion/Makefile +1 -1
index d23b6d537d8b..e03695287f76 100644
@@ -1,5 +1,5 @@
 
-INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/
+INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
 CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
 
 TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Anders Roxell

Fails to build iomap_test.c due to missing include

gcc -I. -I../../../../../drivers/staging/android/uapi/ -Wall -O2 -g
ionmap_test.c ipcsocket.c ionutils.c -o ionmap_test
ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory

Quoted 9 lines
  #include <linux/dma-buf.h>
                            ^

compilation terminated.
<builtin>: recipe for target 'ionmap_test' failed
make[2]: *** [ionmap_test] Error 1

In the current code, we add a new -I ../../../../../usr/include/ to the INCLUDEDIR variable. Also add ionmap_test to the .gitignore file.

Quoted 1 line
Fixes ac93f7046a53 ("selftests: ion: Add simple test with the vgem driver")

Where is this hash from? It's not in Linus' master branch. Are the /usr/include header properly sanitized, if so that's nice because there's been debates before about how best to pick up the sanitized headers. I see that used several other places around self-tests too. Anyway, you can add

Acked-by Laura Abbott <labbott at redhat.com>

Thanks,
Laura

Quoted 20 lines
Signed-off-by Anders Roxell <anders.roxell at linaro.org>
---
  tools/testing/selftests/android/ion/.gitignore | 1 +
  tools/testing/selftests/android/ion/Makefile   | 2 +-
  2 files changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/android/ion/.gitignore +1 -0
index 67e6f391b2a9..95e8f4561474 100644
@@ -1,2 +1,3 @@
  ionapp_export
  ionapp_import
+ionmap_test
tools/testing/selftests/android/ion/Makefile +0 -0
index d23b6d537d8b..e03695287f76 100644

tools/testing/selftests/android/ion/Makefile line 5

Quoted 6 lines
tools/testing/selftests/android/ion/Makefile +1 -1
@@ -1,5 +1,5 @@
 
-INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/
+INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
  CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
 
  TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 14 lines · Laura Abbott
Quoted 13 lines · Anders Roxell

Fails to build iomap_test.c due to missing include

gcc -I. -I../../../../../drivers/staging/android/uapi/ -Wall -O2 -g
ionmap_test.c ipcsocket.c ionutils.c -o ionmap_test
ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory

  #include <linux/dma-buf.h>
                            ^

compilation terminated.
<builtin>: recipe for target 'ionmap_test' failed
make[2]: *** [ionmap_test] Error 1

Quoted 7 lines
Quoted 4 lines

In the current code, we add a new -I ../../../../../usr/include/ to the INCLUDEDIR variable. Also add ionmap_test to the .gitignore file.

Quoted 2 lines
Fixes ac93f7046a53 ("selftests: ion: Add simple test with the vgem

driver")

Where is this hash from?

In linux-next.

Quoted 2 lines

It's not in Linus' master branch.
Are the /usr/include header properly sanitized

That my understanding but please correct me if I'm wrong.

Cheers,
Anders

Quoted 30 lines

, if so that's nice
because there's been debates before about how best to pick up the sanitized headers. I see that used several other places around self-tests too. Anyway, you can add

Acked-by Laura Abbott <labbott at redhat.com>

Thanks,
Laura

Quoted 19 lines
Signed-off-by Anders Roxell <anders.roxell at linaro.org>
---
  tools/testing/selftests/android/ion/.gitignore | 1 +
  tools/testing/selftests/android/ion/Makefile   | 2 +-
  2 files changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/android/ion/.gitignore +1 -0
index 67e6f391b2a9..95e8f4561474 100644
@@ -1,2 +1,3 @@
  ionapp_export
  ionapp_import
+ionmap_test
tools/testing/selftests/android/ion/Makefile +0 -1
index d23b6d537d8b..e03695287f76 100644
--- a/tools/testing/selftests/android/ion/Makefile
Quoted 9 lines

tools/testing/selftests/android/ion/Makefile line 5

Quoted 8 lines

+++ b/tools/testing/selftests/android/ion/Makefile

tools/testing/selftests/android/ion/Makefile +1 -1
@@ -1,5 +1,5 @@
  -INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/
+INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/
-I../../../../../usr/include/
  CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
    TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#3 lore raw
Quoted 25 lines · Anders Roxell
Quoted 14 lines · Laura Abbott
Quoted 13 lines · Anders Roxell

Fails to build iomap_test.c due to missing include

gcc -I. -I../../../../../drivers/staging/android/uapi/ -Wall -O2 -g
ionmap_test.c ipcsocket.c ionutils.c -o ionmap_test
ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory

  #include <linux/dma-buf.h>
                            ^

compilation terminated.
<builtin>: recipe for target 'ionmap_test' failed
make[2]: *** [ionmap_test] Error 1

Quoted 7 lines
Quoted 4 lines

In the current code, we add a new -I ../../../../../usr/include/ to the INCLUDEDIR variable. Also add ionmap_test to the .gitignore file.

Quoted 2 lines
Fixes ac93f7046a53 ("selftests: ion: Add simple test with the vgem

driver")

Where is this hash from?

In linux-next.

Quoted 15 lines
Quoted 2 lines

It's not in Linus' master branch.
Are the /usr/include header properly sanitized

That my understanding but please correct me if I'm wrong.

Cheers,
Anders

Quoted 7 lines

, if so that's nice
because there's been debates before about how best to pick up the sanitized headers. I see that used several other places around self-tests too. Anyway, you can add

Acked-by Laura Abbott <labbott at redhat.com>

Thanks. Applied to linux-kselftest next for 4.17-rc1

-- Shuah

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html