[Intel-gfx] [PATCH] drm/i915: rename header test build commands to avoid conflicts

Jani Nikula jani.nikula at intel.com
Thu Jun 6 07:24:45 UTC 2019


On Thu, 06 Jun 2019, <yamada.masahiro at socionext.com> wrote:
> Hi,
>
>> -----Original Message-----
>> From: Jani Nikula [mailto:jani.nikula at intel.com]
>> Sent: Wednesday, June 05, 2019 10:22 PM
>> To: intel-gfx at lists.freedesktop.org
>> Cc: jani.nikula at intel.com; kbuild test robot <lkp at intel.com>; Chris Wilson
>> <chris at chris-wilson.co.uk>; Yamada, Masahiro/山田 真弘
>> <yamada.masahiro at socionext.com>; Sam Ravnborg <sam at 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 at intel.com>
>> Cc: Chris Wilson <chris at chris-wilson.co.uk>
>> Cc: Masahiro Yamada <yamada.masahiro at socionext.com>
>> Cc: Sam Ravnborg <sam at ravnborg.org>
>> Signed-off-by: Jani Nikula <jani.nikula at 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 at socionext.com>
> Date: Thu, 6 Jun 2019 11:48:44 +0900
> Subject: [PATCH] FIXUP1
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at 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 at socionext.com>
> Date: Thu, 6 Jun 2019 11:50:20 +0900
> Subject: [PATCH] FIXUP2
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at 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)))

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list