All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix compilation error
@ 2018-09-14  9:46 ` Alexey Skidanov
  0 siblings, 0 replies; 8+ messages in thread
From: alexey.skidanov @ 2018-09-14  9:46 UTC (permalink / raw)


ionmap_test compilation failed because there is no dma_buf.h on any of
include paths. Moreover, it's better to use the dma_buf.h file of
kernel under test and not the currently running one.

To fix this, add new target to the Makefile, installing Kernel headers
for user space and direct compiler to look for dma_buf.h file there.

Signed-off-by: Alexey Skidanov <alexey.skidanov at intel.com>
---
 tools/testing/selftests/android/ion/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/android/ion/Makefile b/tools/testing/selftests/android/ion/Makefile
index e036952..a4aac0e 100644
--- a/tools/testing/selftests/android/ion/Makefile
+++ b/tools/testing/selftests/android/ion/Makefile
@@ -1,10 +1,14 @@
 
-INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
+INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../uapi/include
 CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
 
 TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
 
-all: $(TEST_GEN_FILES)
+all: usr_headers $(TEST_GEN_FILES)
+
+usr_headers:
+	cd ../../../../../
+	make headers_install INSTALL_HDR_PATH=./uapi
 
 $(TEST_GEN_FILES): ipcsocket.c ionutils.c
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] Fix compilation error
@ 2018-09-14  9:46 ` Alexey Skidanov
  0 siblings, 0 replies; 8+ messages in thread
From: Alexey Skidanov @ 2018-09-14  9:46 UTC (permalink / raw)


ionmap_test compilation failed because there is no dma_buf.h on any of
include paths. Moreover, it's better to use the dma_buf.h file of
kernel under test and not the currently running one.

To fix this, add new target to the Makefile, installing Kernel headers
for user space and direct compiler to look for dma_buf.h file there.

Signed-off-by: Alexey Skidanov <alexey.skidanov at intel.com>
---
 tools/testing/selftests/android/ion/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/android/ion/Makefile b/tools/testing/selftests/android/ion/Makefile
index e036952..a4aac0e 100644
--- a/tools/testing/selftests/android/ion/Makefile
+++ b/tools/testing/selftests/android/ion/Makefile
@@ -1,10 +1,14 @@
 
-INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
+INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../uapi/include
 CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
 
 TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
 
-all: $(TEST_GEN_FILES)
+all: usr_headers $(TEST_GEN_FILES)
+
+usr_headers:
+	cd ../../../../../
+	make headers_install INSTALL_HDR_PATH=./uapi
 
 $(TEST_GEN_FILES): ipcsocket.c ionutils.c
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] Fix compilation error
@ 2018-09-14 18:30   ` Laura Abbott
  0 siblings, 0 replies; 8+ messages in thread
From: labbott @ 2018-09-14 18:30 UTC (permalink / raw)


On 09/14/2018 02:46 AM, Alexey Skidanov wrote:
> ionmap_test compilation failed because there is no dma_buf.h on any of
> include paths. Moreover, it's better to use the dma_buf.h file of
> kernel under test and not the currently running one.
> 
> To fix this, add new target to the Makefile, installing Kernel headers
> for user space and direct compiler to look for dma_buf.h file there.
> 

This is what gpio has:

../../../../usr/include/linux/gpio.h:
         make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/

I'd like to be consistent with other selftests. Shuah, what's
your opinion on the best way to get the headers?

Thanks,
Laura

> Signed-off-by: Alexey Skidanov <alexey.skidanov at intel.com>
> ---
>   tools/testing/selftests/android/ion/Makefile | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/android/ion/Makefile b/tools/testing/selftests/android/ion/Makefile
> index e036952..a4aac0e 100644
> --- a/tools/testing/selftests/android/ion/Makefile
> +++ b/tools/testing/selftests/android/ion/Makefile
> @@ -1,10 +1,14 @@
>   
> -INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
> +INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../uapi/include
>   CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
>   
>   TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
>   
> -all: $(TEST_GEN_FILES)
> +all: usr_headers $(TEST_GEN_FILES)
> +
> +usr_headers:
> +	cd ../../../../../
> +	make headers_install INSTALL_HDR_PATH=./uapi
>   
>   $(TEST_GEN_FILES): ipcsocket.c ionutils.c
>   
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fix compilation error
@ 2018-09-14 18:30   ` Laura Abbott
  0 siblings, 0 replies; 8+ messages in thread
From: Laura Abbott @ 2018-09-14 18:30 UTC (permalink / raw)


On 09/14/2018 02:46 AM, Alexey Skidanov wrote:
> ionmap_test compilation failed because there is no dma_buf.h on any of
> include paths. Moreover, it's better to use the dma_buf.h file of
> kernel under test and not the currently running one.
> 
> To fix this, add new target to the Makefile, installing Kernel headers
> for user space and direct compiler to look for dma_buf.h file there.
> 

This is what gpio has:

../../../../usr/include/linux/gpio.h:
         make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/

I'd like to be consistent with other selftests. Shuah, what's
your opinion on the best way to get the headers?

Thanks,
Laura

> Signed-off-by: Alexey Skidanov <alexey.skidanov at intel.com>
> ---
>   tools/testing/selftests/android/ion/Makefile | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/android/ion/Makefile b/tools/testing/selftests/android/ion/Makefile
> index e036952..a4aac0e 100644
> --- a/tools/testing/selftests/android/ion/Makefile
> +++ b/tools/testing/selftests/android/ion/Makefile
> @@ -1,10 +1,14 @@
>   
> -INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
> +INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../uapi/include
>   CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
>   
>   TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
>   
> -all: $(TEST_GEN_FILES)
> +all: usr_headers $(TEST_GEN_FILES)
> +
> +usr_headers:
> +	cd ../../../../../
> +	make headers_install INSTALL_HDR_PATH=./uapi
>   
>   $(TEST_GEN_FILES): ipcsocket.c ionutils.c
>   
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fix compilation error
@ 2018-09-14 19:02     ` Daniel Díaz
  0 siblings, 0 replies; 8+ messages in thread
From:  @ 2018-09-14 19:02 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2091 bytes --]

Hello!

On Fri, 14 Sep 2018 at 13:30, Laura Abbott <labbott at redhat.com> wrote:
>
> On 09/14/2018 02:46 AM, Alexey Skidanov wrote:
> > ionmap_test compilation failed because there is no dma_buf.h on any of
> > include paths. Moreover, it's better to use the dma_buf.h file of
> > kernel under test and not the currently running one.
> >
> > To fix this, add new target to the Makefile, installing Kernel headers
> > for user space and direct compiler to look for dma_buf.h file there.
> >
>
> This is what gpio has:
>
> ../../../../usr/include/linux/gpio.h:
>          make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/
>
> I'd like to be consistent with other selftests. Shuah, what's
> your opinion on the best way to get the headers?

Please consider Anders' patch, which is already in Shuah's next branch:
  https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=next&id=b2d35fa5fc80c27e868e393dcab4c94a0d71737f

Greetings!

Daniel Díaz
daniel.diaz at linaro.org


> Thanks,
> Laura
>
> > Signed-off-by: Alexey Skidanov <alexey.skidanov at intel.com>
> > ---
> >   tools/testing/selftests/android/ion/Makefile | 8 ++++++--
> >   1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/android/ion/Makefile b/tools/testing/selftests/android/ion/Makefile
> > index e036952..a4aac0e 100644
> > --- a/tools/testing/selftests/android/ion/Makefile
> > +++ b/tools/testing/selftests/android/ion/Makefile
> > @@ -1,10 +1,14 @@
> >
> > -INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
> > +INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../uapi/include
> >   CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
> >
> >   TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
> >
> > -all: $(TEST_GEN_FILES)
> > +all: usr_headers $(TEST_GEN_FILES)
> > +
> > +usr_headers:
> > +     cd ../../../../../
> > +     make headers_install INSTALL_HDR_PATH=./uapi
> >
> >   $(TEST_GEN_FILES): ipcsocket.c ionutils.c
> >
> >
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fix compilation error
@ 2018-09-14 19:02     ` Daniel Díaz
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Díaz @ 2018-09-14 19:02 UTC (permalink / raw)


Hello!

On Fri, 14 Sep 2018@13:30, Laura Abbott <labbott@redhat.com> wrote:
>
> On 09/14/2018 02:46 AM, Alexey Skidanov wrote:
> > ionmap_test compilation failed because there is no dma_buf.h on any of
> > include paths. Moreover, it's better to use the dma_buf.h file of
> > kernel under test and not the currently running one.
> >
> > To fix this, add new target to the Makefile, installing Kernel headers
> > for user space and direct compiler to look for dma_buf.h file there.
> >
>
> This is what gpio has:
>
> ../../../../usr/include/linux/gpio.h:
>          make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/
>
> I'd like to be consistent with other selftests. Shuah, what's
> your opinion on the best way to get the headers?

Please consider Anders' patch, which is already in Shuah's next branch:
  https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=next&id=b2d35fa5fc80c27e868e393dcab4c94a0d71737f

Greetings!

Daniel Díaz
daniel.diaz at linaro.org


> Thanks,
> Laura
>
> > Signed-off-by: Alexey Skidanov <alexey.skidanov at intel.com>
> > ---
> >   tools/testing/selftests/android/ion/Makefile | 8 ++++++--
> >   1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/android/ion/Makefile b/tools/testing/selftests/android/ion/Makefile
> > index e036952..a4aac0e 100644
> > --- a/tools/testing/selftests/android/ion/Makefile
> > +++ b/tools/testing/selftests/android/ion/Makefile
> > @@ -1,10 +1,14 @@
> >
> > -INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
> > +INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../uapi/include
> >   CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
> >
> >   TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
> >
> > -all: $(TEST_GEN_FILES)
> > +all: usr_headers $(TEST_GEN_FILES)
> > +
> > +usr_headers:
> > +     cd ../../../../../
> > +     make headers_install INSTALL_HDR_PATH=./uapi
> >
> >   $(TEST_GEN_FILES): ipcsocket.c ionutils.c
> >
> >
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fix compilation error
@ 2018-09-14 19:53       ` Alexey Skidanov
  0 siblings, 0 replies; 8+ messages in thread
From: alexey.skidanov @ 2018-09-14 19:53 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2222 bytes --]



On 09/14/2018 10:02 PM, Daniel Díaz wrote:
> Hello!
> 
> On Fri, 14 Sep 2018 at 13:30, Laura Abbott <labbott at redhat.com> wrote:
>>
>> On 09/14/2018 02:46 AM, Alexey Skidanov wrote:
>>> ionmap_test compilation failed because there is no dma_buf.h on any of
>>> include paths. Moreover, it's better to use the dma_buf.h file of
>>> kernel under test and not the currently running one.
>>>
>>> To fix this, add new target to the Makefile, installing Kernel headers
>>> for user space and direct compiler to look for dma_buf.h file there.
>>>
>>
>> This is what gpio has:
>>
>> ../../../../usr/include/linux/gpio.h:
>>          make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/
>>
>> I'd like to be consistent with other selftests. Shuah, what's
>> your opinion on the best way to get the headers?
> 
> Please consider Anders' patch, which is already in Shuah's next branch:
>   https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=next&id=b2d35fa5fc80c27e868e393dcab4c94a0d71737f
> 
> Greetings!
> 
> Daniel Díaz
> daniel.diaz at linaro.org
> 
> 

Looks like the issue is already resolved :)
>> Thanks,
>> Laura
>>
>>> Signed-off-by: Alexey Skidanov <alexey.skidanov at intel.com>
>>> ---
>>>   tools/testing/selftests/android/ion/Makefile | 8 ++++++--
>>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/tools/testing/selftests/android/ion/Makefile b/tools/testing/selftests/android/ion/Makefile
>>> index e036952..a4aac0e 100644
>>> --- a/tools/testing/selftests/android/ion/Makefile
>>> +++ b/tools/testing/selftests/android/ion/Makefile
>>> @@ -1,10 +1,14 @@
>>>
>>> -INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
>>> +INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../uapi/include
>>>   CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
>>>
>>>   TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
>>>
>>> -all: $(TEST_GEN_FILES)
>>> +all: usr_headers $(TEST_GEN_FILES)
>>> +
>>> +usr_headers:
>>> +     cd ../../../../../
>>> +     make headers_install INSTALL_HDR_PATH=./uapi
>>>
>>>   $(TEST_GEN_FILES): ipcsocket.c ionutils.c
>>>
>>>
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fix compilation error
@ 2018-09-14 19:53       ` Alexey Skidanov
  0 siblings, 0 replies; 8+ messages in thread
From: Alexey Skidanov @ 2018-09-14 19:53 UTC (permalink / raw)




On 09/14/2018 10:02 PM, Daniel Díaz wrote:
> Hello!
> 
> On Fri, 14 Sep 2018@13:30, Laura Abbott <labbott@redhat.com> wrote:
>>
>> On 09/14/2018 02:46 AM, Alexey Skidanov wrote:
>>> ionmap_test compilation failed because there is no dma_buf.h on any of
>>> include paths. Moreover, it's better to use the dma_buf.h file of
>>> kernel under test and not the currently running one.
>>>
>>> To fix this, add new target to the Makefile, installing Kernel headers
>>> for user space and direct compiler to look for dma_buf.h file there.
>>>
>>
>> This is what gpio has:
>>
>> ../../../../usr/include/linux/gpio.h:
>>          make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/
>>
>> I'd like to be consistent with other selftests. Shuah, what's
>> your opinion on the best way to get the headers?
> 
> Please consider Anders' patch, which is already in Shuah's next branch:
>   https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=next&id=b2d35fa5fc80c27e868e393dcab4c94a0d71737f
> 
> Greetings!
> 
> Daniel Díaz
> daniel.diaz at linaro.org
> 
> 

Looks like the issue is already resolved :)
>> Thanks,
>> Laura
>>
>>> Signed-off-by: Alexey Skidanov <alexey.skidanov at intel.com>
>>> ---
>>>   tools/testing/selftests/android/ion/Makefile | 8 ++++++--
>>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/tools/testing/selftests/android/ion/Makefile b/tools/testing/selftests/android/ion/Makefile
>>> index e036952..a4aac0e 100644
>>> --- a/tools/testing/selftests/android/ion/Makefile
>>> +++ b/tools/testing/selftests/android/ion/Makefile
>>> @@ -1,10 +1,14 @@
>>>
>>> -INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
>>> +INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../uapi/include
>>>   CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
>>>
>>>   TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
>>>
>>> -all: $(TEST_GEN_FILES)
>>> +all: usr_headers $(TEST_GEN_FILES)
>>> +
>>> +usr_headers:
>>> +     cd ../../../../../
>>> +     make headers_install INSTALL_HDR_PATH=./uapi
>>>
>>>   $(TEST_GEN_FILES): ipcsocket.c ionutils.c
>>>
>>>
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-09-14 19:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-14  9:46 [PATCH] Fix compilation error alexey.skidanov
2018-09-14  9:46 ` Alexey Skidanov
2018-09-14 18:30 ` labbott
2018-09-14 18:30   ` Laura Abbott
2018-09-14 19:02   ` 
2018-09-14 19:02     ` Daniel Díaz
2018-09-14 19:53     ` alexey.skidanov
2018-09-14 19:53       ` Alexey Skidanov

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.