diff mbox series

drm/i915: rename header test build commands to avoid conflicts

Message ID 20190605132137.11818-1-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: rename header test build commands to avoid conflicts | expand

Commit Message

Jani Nikula June 5, 2019, 1:21 p.m. UTC
We have a local hack to test if headers are self-contained, while
upstreaming a proper generic solution in kbuild [1]. Now that both have
found themselves in linux-next, the identical cmd_header_test build
commands conflict, leading to errors such as:

>> drivers/gpu/drm/i915/header_test_intel_audio.c:1:10: fatal error:
>> drivers/gpu/drm/i915/intel_audio.h: No such file or directory
    #include "drivers/gpu/drm/i915/intel_audio.h"
	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Rename the i915 local build command until the proper kbuild solution
finds its way to Linus' master and gets backported to our tree, and we
can finally switch over.

Note that since the kbuild header test requires CONFIG_HEADER_TEST=y,
and our hack requires our debug option CONFIG_DRM_I915_WERROR=y, this is
likely hit only by build test bots.

[1] http://marc.info/?i=20190604124248.5564-1-jani.nikula@intel.com

Reported-by: kbuild test robot <lkp@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/Makefile.header-test     | 6 +++---
 drivers/gpu/drm/i915/gem/Makefile.header-test | 6 +++---
 drivers/gpu/drm/i915/gt/Makefile.header-test  | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

Comments

Sam Ravnborg June 5, 2019, 1:35 p.m. UTC | #1
Hi Jani.

On Wed, Jun 05, 2019 at 04:21:37PM +0300, Jani Nikula wrote:
> We have a local hack to test if headers are self-contained, while
> upstreaming a proper generic solution in kbuild [1]. Now that both have
> found themselves in linux-next, the identical cmd_header_test build
> commands conflict, leading to errors such as:
> 
> >> drivers/gpu/drm/i915/header_test_intel_audio.c:1:10: fatal error:
> >> drivers/gpu/drm/i915/intel_audio.h: No such file or directory
>     #include "drivers/gpu/drm/i915/intel_audio.h"
> 	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Rename the i915 local build command until the proper kbuild solution
> finds its way to Linus' master and gets backported to our tree, and we
> can finally switch over.
You could also ihave switched over now, and accpet that this only would be used
in -next for a few months.

Then at least you did not have to rememebr to change it again.

Any way works for me, just a suggestion.

	Sam
Masahiro Yamada June 6, 2019, 3:04 a.m. UTC | #2
Hi,

> -----Original Message-----
> From: Jani Nikula [mailto:jani.nikula@intel.com]
> Sent: Wednesday, June 05, 2019 10:22 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: jani.nikula@intel.com; kbuild test robot <lkp@intel.com>; Chris Wilson
> <chris@chris-wilson.co.uk>; Yamada, Masahiro/山田 真弘
> <yamada.masahiro@socionext.com>; Sam Ravnborg <sam@ravnborg.org>
> Subject: [PATCH] drm/i915: rename header test build commands to avoid
> conflicts
> 
> We have a local hack to test if headers are self-contained, while
> upstreaming a proper generic solution in kbuild [1]. Now that both have
> found themselves in linux-next, the identical cmd_header_test build
> commands conflict, leading to errors such as:
> 
> >> drivers/gpu/drm/i915/header_test_intel_audio.c:1:10: fatal error:
> >> drivers/gpu/drm/i915/intel_audio.h: No such file or directory
>     #include "drivers/gpu/drm/i915/intel_audio.h"
> 	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Rename the i915 local build command until the proper kbuild solution
> finds its way to Linus' master and gets backported to our tree, and we
> can finally switch over.
> 
> Note that since the kbuild header test requires CONFIG_HEADER_TEST=y,
> and our hack requires our debug option CONFIG_DRM_I915_WERROR=y, this is
> likely hit only by build test bots.
> 
> [1] http://marc.info/?i=20190604124248.5564-1-jani.nikula@intel.com
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---


This is not really queued up yet.

So, we can squash fix-up to avoid 0day bot report.


I attached two patches.

00001-FIXUP1.patch is a one-liner fixup.
If you want to clean up your Makefile by yourself later,
I will squash it.


If you want to switch to the generic notation now,
I will squash 0001-FIXUP2.patch.


Either is OK for me.


Thanks.

Masahiro Yamada
Jani Nikula June 6, 2019, 7:24 a.m. UTC | #3
On Thu, 06 Jun 2019, <yamada.masahiro@socionext.com> wrote:
> Hi,
>
>> -----Original Message-----
>> From: Jani Nikula [mailto:jani.nikula@intel.com]
>> Sent: Wednesday, June 05, 2019 10:22 PM
>> To: intel-gfx@lists.freedesktop.org
>> Cc: jani.nikula@intel.com; kbuild test robot <lkp@intel.com>; Chris Wilson
>> <chris@chris-wilson.co.uk>; Yamada, Masahiro/山田 真弘
>> <yamada.masahiro@socionext.com>; Sam Ravnborg <sam@ravnborg.org>
>> Subject: [PATCH] drm/i915: rename header test build commands to avoid
>> conflicts
>> 
>> We have a local hack to test if headers are self-contained, while
>> upstreaming a proper generic solution in kbuild [1]. Now that both have
>> found themselves in linux-next, the identical cmd_header_test build
>> commands conflict, leading to errors such as:
>> 
>> >> drivers/gpu/drm/i915/header_test_intel_audio.c:1:10: fatal error:
>> >> drivers/gpu/drm/i915/intel_audio.h: No such file or directory
>>     #include "drivers/gpu/drm/i915/intel_audio.h"
>> 	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 
>> Rename the i915 local build command until the proper kbuild solution
>> finds its way to Linus' master and gets backported to our tree, and we
>> can finally switch over.
>> 
>> Note that since the kbuild header test requires CONFIG_HEADER_TEST=y,
>> and our hack requires our debug option CONFIG_DRM_I915_WERROR=y, this is
>> likely hit only by build test bots.
>> 
>> [1] http://marc.info/?i=20190604124248.5564-1-jani.nikula@intel.com
>> 
>> Reported-by: kbuild test robot <lkp@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>
>
> This is not really queued up yet.
>
> So, we can squash fix-up to avoid 0day bot report.

Except I don't think your linux-kbuild.git baseline has the files you're
patching below. The problem only exists at the merge of our trees,
currently only linux-next, and not "for real" until the v5.3 merge
window. So I think the sane option is to patch it up in our tree.

I want to use our local hack until we can get the backmerge from
v5.3-rc1, because it's 7-8 weeks away, and I want to retain our own
pre-merge build test coverage until then rather than relying on 0day
post-merge testing on linux-next.

BR,
Jani.


>
>
> I attached two patches.
>
> 00001-FIXUP1.patch is a one-liner fixup.
> If you want to clean up your Makefile by yourself later,
> I will squash it.
>
>
> If you want to switch to the generic notation now,
> I will squash 0001-FIXUP2.patch.
>
>
> Either is OK for me.
>
>
> Thanks.
>
> Masahiro Yamada
>
> From 1f6a6367354eec9fa8d9ebae4a9e8ba66ad68af7 Mon Sep 17 00:00:00 2001
> From: Masahiro Yamada <yamada.masahiro@socionext.com>
> Date: Thu, 6 Jun 2019 11:48:44 +0900
> Subject: [PATCH] FIXUP1
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>  drivers/gpu/drm/i915/Makefile.header-test | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
> index c1c391816fa7..2a456c9223db 100644
> --- a/drivers/gpu/drm/i915/Makefile.header-test
> +++ b/drivers/gpu/drm/i915/Makefile.header-test
> @@ -37,7 +37,7 @@ header_test := \
>  	intel_workarounds_types.h
>  
>  quiet_cmd_header_test = HDRTEST $@
> -      cmd_header_test = echo "\#include \"$(<F)\"" > $@
> +override cmd_header_test = echo "\#include \"$(<F)\"" > $@
>  
>  header_test_%.c: %.h
>  	$(call cmd,header_test)
> -- 
> 2.17.1
>
> From 22f46cedb22062f158e99d7eec18564f4d5b2eed Mon Sep 17 00:00:00 2001
> From: Masahiro Yamada <yamada.masahiro@socionext.com>
> Date: Thu, 6 Jun 2019 11:50:20 +0900
> Subject: [PATCH] FIXUP2
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>  drivers/gpu/drm/i915/.gitignore           |  1 -
>  drivers/gpu/drm/i915/Makefile.header-test | 12 +-----------
>  2 files changed, 1 insertion(+), 12 deletions(-)
>  delete mode 100644 drivers/gpu/drm/i915/.gitignore
>
> diff --git a/drivers/gpu/drm/i915/.gitignore b/drivers/gpu/drm/i915/.gitignore
> deleted file mode 100644
> index cff45d81f42f..000000000000
> --- a/drivers/gpu/drm/i915/.gitignore
> +++ /dev/null
> @@ -1 +0,0 @@
> -header_test_*.c
> diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
> index c1c391816fa7..639b596a06a9 100644
> --- a/drivers/gpu/drm/i915/Makefile.header-test
> +++ b/drivers/gpu/drm/i915/Makefile.header-test
> @@ -2,7 +2,7 @@
>  # Copyright (C) 2019 Intel Corporation
>  
>  # Test the headers are compilable as standalone units
> -header_test := \
> +header-test-$(CONFIG_DRM_I915_WERROR) := \
>  	i915_active_types.h \
>  	i915_gem_context_types.h \
>  	i915_priolist_types.h \
> @@ -35,13 +35,3 @@ header_test := \
>  	intel_sprite.h \
>  	intel_tv.h \
>  	intel_workarounds_types.h
> -
> -quiet_cmd_header_test = HDRTEST $@
> -      cmd_header_test = echo "\#include \"$(<F)\"" > $@
> -
> -header_test_%.c: %.h
> -	$(call cmd,header_test)
> -
> -i915-$(CONFIG_DRM_I915_WERROR) += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.o,$(h)))
> -
> -clean-files += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.c,$(h)))
Masahiro Yamada June 6, 2019, 7:32 a.m. UTC | #4
Hi Jani,

> -----Original Message-----
> From: Jani Nikula [mailto:jani.nikula@intel.com]
> Sent: Thursday, June 06, 2019 4:25 PM
> To: Yamada, Masahiro/山田 真弘 <yamada.masahiro@socionext.com>;
> intel-gfx@lists.freedesktop.org
> Cc: lkp@intel.com; chris@chris-wilson.co.uk; sam@ravnborg.org;
> masahiroy@kernel.org
> Subject: RE: [PATCH] drm/i915: rename header test build commands to avoid
> conflicts
> 
> On Thu, 06 Jun 2019, <yamada.masahiro@socionext.com> wrote:
> > Hi,
> >
> >> -----Original Message-----
> >> From: Jani Nikula [mailto:jani.nikula@intel.com]
> >> Sent: Wednesday, June 05, 2019 10:22 PM
> >> To: intel-gfx@lists.freedesktop.org
> >> Cc: jani.nikula@intel.com; kbuild test robot <lkp@intel.com>; Chris
> Wilson
> >> <chris@chris-wilson.co.uk>; Yamada, Masahiro/山田 真弘
> >> <yamada.masahiro@socionext.com>; Sam Ravnborg <sam@ravnborg.org>
> >> Subject: [PATCH] drm/i915: rename header test build commands to avoid
> >> conflicts
> >>
> >> We have a local hack to test if headers are self-contained, while
> >> upstreaming a proper generic solution in kbuild [1]. Now that both have
> >> found themselves in linux-next, the identical cmd_header_test build
> >> commands conflict, leading to errors such as:
> >>
> >> >> drivers/gpu/drm/i915/header_test_intel_audio.c:1:10: fatal error:
> >> >> drivers/gpu/drm/i915/intel_audio.h: No such file or directory
> >>     #include "drivers/gpu/drm/i915/intel_audio.h"
> >> 	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>
> >> Rename the i915 local build command until the proper kbuild solution
> >> finds its way to Linus' master and gets backported to our tree, and we
> >> can finally switch over.
> >>
> >> Note that since the kbuild header test requires CONFIG_HEADER_TEST=y,
> >> and our hack requires our debug option CONFIG_DRM_I915_WERROR=y, this
> is
> >> likely hit only by build test bots.
> >>
> >> [1] http://marc.info/?i=20190604124248.5564-1-jani.nikula@intel.com
> >>
> >> Reported-by: kbuild test robot <lkp@intel.com>
> >> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> >> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> >> Cc: Sam Ravnborg <sam@ravnborg.org>
> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >> ---
> >
> >
> > This is not really queued up yet.
> >
> > So, we can squash fix-up to avoid 0day bot report.
> 
> Except I don't think your linux-kbuild.git baseline has the files you're
> patching below. The problem only exists at the merge of our trees,
> currently only linux-next, and not "for real" until the v5.3 merge
> window. So I think the sane option is to patch it up in our tree.


I do not understand.

This is a _real_ problem since
  drivers/gpu/drm/i915/Makefile.header-test
exists in Linus' tree.


The 0-day bot reported the build error against my tree,
so I must fix it in my tree.


> I want to use our local hack until we can get the backmerge from
> v5.3-rc1, because it's 7-8 weeks away, and I want to retain our own
> pre-merge build test coverage until then rather than relying on 0day
> post-merge testing on linux-next.


Neither of my patches breaks your test coverage.
CONFIG_DRM_I915_WERROR still works in linux-next too.

What am I missing?



Thanks.

Masahiro Yamada
Jani Nikula June 6, 2019, 8 a.m. UTC | #5
On Thu, 06 Jun 2019, <yamada.masahiro@socionext.com> wrote:
> Hi Jani,
>
>> -----Original Message-----
>> From: Jani Nikula [mailto:jani.nikula@intel.com]
>> Sent: Thursday, June 06, 2019 4:25 PM
>> To: Yamada, Masahiro/山田 真弘 <yamada.masahiro@socionext.com>;
>> intel-gfx@lists.freedesktop.org
>> Cc: lkp@intel.com; chris@chris-wilson.co.uk; sam@ravnborg.org;
>> masahiroy@kernel.org
>> Subject: RE: [PATCH] drm/i915: rename header test build commands to avoid
>> conflicts
>> 
>> On Thu, 06 Jun 2019, <yamada.masahiro@socionext.com> wrote:
>> > Hi,
>> >
>> >> -----Original Message-----
>> >> From: Jani Nikula [mailto:jani.nikula@intel.com]
>> >> Sent: Wednesday, June 05, 2019 10:22 PM
>> >> To: intel-gfx@lists.freedesktop.org
>> >> Cc: jani.nikula@intel.com; kbuild test robot <lkp@intel.com>; Chris
>> Wilson
>> >> <chris@chris-wilson.co.uk>; Yamada, Masahiro/山田 真弘
>> >> <yamada.masahiro@socionext.com>; Sam Ravnborg <sam@ravnborg.org>
>> >> Subject: [PATCH] drm/i915: rename header test build commands to avoid
>> >> conflicts
>> >>
>> >> We have a local hack to test if headers are self-contained, while
>> >> upstreaming a proper generic solution in kbuild [1]. Now that both have
>> >> found themselves in linux-next, the identical cmd_header_test build
>> >> commands conflict, leading to errors such as:
>> >>
>> >> >> drivers/gpu/drm/i915/header_test_intel_audio.c:1:10: fatal error:
>> >> >> drivers/gpu/drm/i915/intel_audio.h: No such file or directory
>> >>     #include "drivers/gpu/drm/i915/intel_audio.h"
>> >> 	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> >>
>> >> Rename the i915 local build command until the proper kbuild solution
>> >> finds its way to Linus' master and gets backported to our tree, and we
>> >> can finally switch over.
>> >>
>> >> Note that since the kbuild header test requires CONFIG_HEADER_TEST=y,
>> >> and our hack requires our debug option CONFIG_DRM_I915_WERROR=y, this
>> is
>> >> likely hit only by build test bots.
>> >>
>> >> [1] http://marc.info/?i=20190604124248.5564-1-jani.nikula@intel.com
>> >>
>> >> Reported-by: kbuild test robot <lkp@intel.com>
>> >> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> >> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>> >> Cc: Sam Ravnborg <sam@ravnborg.org>
>> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> >> ---
>> >
>> >
>> > This is not really queued up yet.
>> >
>> > So, we can squash fix-up to avoid 0day bot report.
>> 
>> Except I don't think your linux-kbuild.git baseline has the files you're
>> patching below. The problem only exists at the merge of our trees,
>> currently only linux-next, and not "for real" until the v5.3 merge
>> window. So I think the sane option is to patch it up in our tree.
>
>
> I do not understand.
>
> This is a _real_ problem since
>   drivers/gpu/drm/i915/Makefile.header-test
> exists in Linus' tree.
>
>
> The 0-day bot reported the build error against my tree,
> so I must fix it in my tree.
>
>
>> I want to use our local hack until we can get the backmerge from
>> v5.3-rc1, because it's 7-8 weeks away, and I want to retain our own
>> pre-merge build test coverage until then rather than relying on 0day
>> post-merge testing on linux-next.
>
>
> Neither of my patches breaks your test coverage.
> CONFIG_DRM_I915_WERROR still works in linux-next too.
>
> What am I missing?

Apologies, my bad. I completely failed to realize Makefile.header-test
already hit Linus' tree. *facepalm*

You're totally right, it needs to be fixed in your tree. For that, I
think the best option is your fixup patch #2.

(Now that header-test-y is behind CONFIG_HEADER_TEST=y, I don't think
this really requires CONFIG_DRM_I915_WERROR=y anymore, but no big deal
either way.)

We do have two more instances in -next that are not in Linus' tree, so
we'll need to fix those locally anyway. Part of the confusion.


BR,
Jani.



>
>
>
> Thanks.
>
> Masahiro Yamada
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Masahiro Yamada June 6, 2019, 12:03 p.m. UTC | #6
On Thu, Jun 6, 2019 at 4:57 PM Jani Nikula <jani.nikula@intel.com> wrote:
>
> You're totally right, it needs to be fixed in your tree. For that, I
> think the best option is your fixup patch #2.


OK, I will squash patch #2.
Jani Nikula June 6, 2019, 12:16 p.m. UTC | #7
On Thu, 06 Jun 2019, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> On Thu, Jun 6, 2019 at 4:57 PM Jani Nikula <jani.nikula@intel.com> wrote:
>>
>> You're totally right, it needs to be fixed in your tree. For that, I
>> think the best option is your fixup patch #2.
>
>
> OK, I will squash patch #2.

Many thanks!

BR,
Jani.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
index 6ef3b647ac65..1b4537405b4b 100644
--- a/drivers/gpu/drm/i915/Makefile.header-test
+++ b/drivers/gpu/drm/i915/Makefile.header-test
@@ -63,11 +63,11 @@  header_test := \
 	intel_vdsc.h \
 	intel_wakeref.h
 
-quiet_cmd_header_test = HDRTEST $@
-      cmd_header_test = echo "\#include \"$(<F)\"" > $@
+quiet_cmd_i915_header_test = HDRTEST $@
+      cmd_i915_header_test = echo "\#include \"$(<F)\"" > $@
 
 header_test_%.c: %.h
-	$(call cmd,header_test)
+	$(call cmd,i915_header_test)
 
 i915-$(CONFIG_DRM_I915_WERROR) += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.o,$(h)))
 
diff --git a/drivers/gpu/drm/i915/gem/Makefile.header-test b/drivers/gpu/drm/i915/gem/Makefile.header-test
index 61e06cbb4b32..50a3aa983659 100644
--- a/drivers/gpu/drm/i915/gem/Makefile.header-test
+++ b/drivers/gpu/drm/i915/gem/Makefile.header-test
@@ -4,11 +4,11 @@ 
 # Test the headers are compilable as standalone units
 header_test := $(notdir $(wildcard $(src)/*.h))
 
-quiet_cmd_header_test = HDRTEST $@
-      cmd_header_test = echo "\#include \"$(<F)\"" > $@
+quiet_cmd_i915_header_test = HDRTEST $@
+      cmd_i915_header_test = echo "\#include \"$(<F)\"" > $@
 
 header_test_%.c: %.h
-	$(call cmd,header_test)
+	$(call cmd,i915_header_test)
 
 extra-$(CONFIG_DRM_I915_WERROR) += \
 	$(foreach h,$(header_test),$(patsubst %.h,header_test_%.o,$(h)))
diff --git a/drivers/gpu/drm/i915/gt/Makefile.header-test b/drivers/gpu/drm/i915/gt/Makefile.header-test
index 61e06cbb4b32..50a3aa983659 100644
--- a/drivers/gpu/drm/i915/gt/Makefile.header-test
+++ b/drivers/gpu/drm/i915/gt/Makefile.header-test
@@ -4,11 +4,11 @@ 
 # Test the headers are compilable as standalone units
 header_test := $(notdir $(wildcard $(src)/*.h))
 
-quiet_cmd_header_test = HDRTEST $@
-      cmd_header_test = echo "\#include \"$(<F)\"" > $@
+quiet_cmd_i915_header_test = HDRTEST $@
+      cmd_i915_header_test = echo "\#include \"$(<F)\"" > $@
 
 header_test_%.c: %.h
-	$(call cmd,header_test)
+	$(call cmd,i915_header_test)
 
 extra-$(CONFIG_DRM_I915_WERROR) += \
 	$(foreach h,$(header_test),$(patsubst %.h,header_test_%.o,$(h)))