All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
@ 2016-08-29  9:19 ` Ioan-Adrian Ratiu
  0 siblings, 0 replies; 12+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-08-29  9:19 UTC (permalink / raw)
  To: openembedded-core; +Cc: yocto

merge_configs.sh calls make on the generated kernel config from
the defconfig + fragments to fill in any missing symbols. make
can fail and this can lead to nasty errors further on in the
build like generating an unbootable kernel image.

Check the make return code and fail loudly if non-zero.

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
---
 tools/merge_config.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/merge_config.sh b/tools/merge_config.sh
index 67d1314..5212f37 100755
--- a/tools/merge_config.sh
+++ b/tools/merge_config.sh
@@ -152,7 +152,10 @@ fi
 # alldefconfig: Fills in any missing symbols with Kconfig default
 # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
 make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
-
+if [ "$?" -ne 0 ]; then
+    echo "Make failed to fill missing config symbols. Exit." >&2
+    exit 1
+fi
 
 # Check all specified config values took (might have missed-dependency issues)
 for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
-- 
2.9.3



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

* [yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
@ 2016-08-29  9:19 ` Ioan-Adrian Ratiu
  0 siblings, 0 replies; 12+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-08-29  9:19 UTC (permalink / raw)
  To: openembedded-core; +Cc: yocto

merge_configs.sh calls make on the generated kernel config from
the defconfig + fragments to fill in any missing symbols. make
can fail and this can lead to nasty errors further on in the
build like generating an unbootable kernel image.

Check the make return code and fail loudly if non-zero.

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
---
 tools/merge_config.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/merge_config.sh b/tools/merge_config.sh
index 67d1314..5212f37 100755
--- a/tools/merge_config.sh
+++ b/tools/merge_config.sh
@@ -152,7 +152,10 @@ fi
 # alldefconfig: Fills in any missing symbols with Kconfig default
 # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
 make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
-
+if [ "$?" -ne 0 ]; then
+    echo "Make failed to fill missing config symbols. Exit." >&2
+    exit 1
+fi
 
 # Check all specified config values took (might have missed-dependency issues)
 for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
-- 
2.9.3



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

* Re: [OE-core][yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
  2016-08-29  9:19 ` [yocto-kernel-tools][PATCH] " Ioan-Adrian Ratiu
@ 2016-08-29 12:07   ` Bruce Ashfield
  -1 siblings, 0 replies; 12+ messages in thread
From: Bruce Ashfield @ 2016-08-29 12:07 UTC (permalink / raw)
  To: Ioan-Adrian Ratiu
  Cc: Yocto Project Discussion,
	Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1681 bytes --]

On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
wrote:

> merge_configs.sh calls make on the generated kernel config from
> the defconfig + fragments to fill in any missing symbols. make
> can fail and this can lead to nasty errors further on in the
> build like generating an unbootable kernel image.
>
> Check the make return code and fail loudly if non-zero.
>

We don't want merge config to fail in a scenario like this. It is up to
whatever
calls merge_config to add that sort of logic. Which is what I do with the
kernel
audit phase of linux-yocto.

If you do want to try and make it fail in a scenario like this, the patch
needs to
go to the linux kernel mailing list.

Cheers,

Bruce


>
> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
> ---
>  tools/merge_config.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/merge_config.sh b/tools/merge_config.sh
> index 67d1314..5212f37 100755
> --- a/tools/merge_config.sh
> +++ b/tools/merge_config.sh
> @@ -152,7 +152,10 @@ fi
>  # alldefconfig: Fills in any missing symbols with Kconfig default
>  # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>  make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
> -
> +if [ "$?" -ne 0 ]; then
> +    echo "Make failed to fill missing config symbols. Exit." >&2
> +    exit 1
> +fi


>  # Check all specified config values took (might have missed-dependency
> issues)
>  for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
> --
> 2.9.3
>
>


-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 2646 bytes --]

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

* Re: [yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
@ 2016-08-29 12:07   ` Bruce Ashfield
  0 siblings, 0 replies; 12+ messages in thread
From: Bruce Ashfield @ 2016-08-29 12:07 UTC (permalink / raw)
  To: Ioan-Adrian Ratiu
  Cc: Yocto Project Discussion,
	Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1681 bytes --]

On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
wrote:

> merge_configs.sh calls make on the generated kernel config from
> the defconfig + fragments to fill in any missing symbols. make
> can fail and this can lead to nasty errors further on in the
> build like generating an unbootable kernel image.
>
> Check the make return code and fail loudly if non-zero.
>

We don't want merge config to fail in a scenario like this. It is up to
whatever
calls merge_config to add that sort of logic. Which is what I do with the
kernel
audit phase of linux-yocto.

If you do want to try and make it fail in a scenario like this, the patch
needs to
go to the linux kernel mailing list.

Cheers,

Bruce


>
> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
> ---
>  tools/merge_config.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/merge_config.sh b/tools/merge_config.sh
> index 67d1314..5212f37 100755
> --- a/tools/merge_config.sh
> +++ b/tools/merge_config.sh
> @@ -152,7 +152,10 @@ fi
>  # alldefconfig: Fills in any missing symbols with Kconfig default
>  # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>  make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
> -
> +if [ "$?" -ne 0 ]; then
> +    echo "Make failed to fill missing config symbols. Exit." >&2
> +    exit 1
> +fi


>  # Check all specified config values took (might have missed-dependency
> issues)
>  for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
> --
> 2.9.3
>
>


-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 2646 bytes --]

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

* Re: [OE-core][yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
  2016-08-29 12:07   ` [yocto-kernel-tools][PATCH] " Bruce Ashfield
@ 2016-08-29 12:55     ` Bruce Ashfield
  -1 siblings, 0 replies; 12+ messages in thread
From: Bruce Ashfield @ 2016-08-29 12:55 UTC (permalink / raw)
  To: Bruce Ashfield, Ioan-Adrian Ratiu
  Cc: Yocto Project Discussion,
	Patches and discussions about the oe-core layer

On 2016-08-29 08:07 AM, Bruce Ashfield wrote:
>
>
> On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com
> <mailto:adrian.ratiu@ni.com>> wrote:
>
>     merge_configs.sh calls make on the generated kernel config from
>     the defconfig + fragments to fill in any missing symbols. make
>     can fail and this can lead to nasty errors further on in the
>     build like generating an unbootable kernel image.
>
>     Check the make return code and fail loudly if non-zero.
>
>
> We don't want merge config to fail in a scenario like this. It is up to
> whatever
> calls merge_config to add that sort of logic. Which is what I do with
> the kernel
> audit phase of linux-yocto.

I saw the other patch after replying here. So this is causing some sort
of non Kconfig related error (i.e. host contamination) ? If so, that is
a different scenario than I was thinking of when I wrote this.

Either way, like I said in my other email, I'd like to understand why
this is popping up now, since I'm not seeing anything like it in my
builds .. with my recent changes, all that I've essentially done is
expose merge_config to the actual tasks, so if this is showing an error
I jiggled something else, or it was always around.

Bruce

>
> If you do want to try and make it fail in a scenario like this, the
> patch needs to
> go to the linux kernel mailing list.
>
> Cheers,
>
> Bruce
>
>
>
>     Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com
>     <mailto:adrian.ratiu@ni.com>>
>     ---
>      tools/merge_config.sh | 5 ++++-
>      1 file changed, 4 insertions(+), 1 deletion(-)
>
>     diff --git a/tools/merge_config.sh b/tools/merge_config.sh
>     index 67d1314..5212f37 100755
>     --- a/tools/merge_config.sh
>     +++ b/tools/merge_config.sh
>     @@ -152,7 +152,10 @@ fi
>      # alldefconfig: Fills in any missing symbols with Kconfig default
>      # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>      make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
>     -
>     +if [ "$?" -ne 0 ]; then
>     +    echo "Make failed to fill missing config symbols. Exit." >&2
>     +    exit 1
>     +fi
>
>
>      # Check all specified config values took (might have
>     missed-dependency issues)
>      for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
>     --
>     2.9.3
>
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"
>
>



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

* Re: [yocto] [yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
@ 2016-08-29 12:55     ` Bruce Ashfield
  0 siblings, 0 replies; 12+ messages in thread
From: Bruce Ashfield @ 2016-08-29 12:55 UTC (permalink / raw)
  To: Bruce Ashfield, Ioan-Adrian Ratiu
  Cc: Yocto Project Discussion,
	Patches and discussions about the oe-core layer

On 2016-08-29 08:07 AM, Bruce Ashfield wrote:
>
>
> On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com
> <mailto:adrian.ratiu@ni.com>> wrote:
>
>     merge_configs.sh calls make on the generated kernel config from
>     the defconfig + fragments to fill in any missing symbols. make
>     can fail and this can lead to nasty errors further on in the
>     build like generating an unbootable kernel image.
>
>     Check the make return code and fail loudly if non-zero.
>
>
> We don't want merge config to fail in a scenario like this. It is up to
> whatever
> calls merge_config to add that sort of logic. Which is what I do with
> the kernel
> audit phase of linux-yocto.

I saw the other patch after replying here. So this is causing some sort
of non Kconfig related error (i.e. host contamination) ? If so, that is
a different scenario than I was thinking of when I wrote this.

Either way, like I said in my other email, I'd like to understand why
this is popping up now, since I'm not seeing anything like it in my
builds .. with my recent changes, all that I've essentially done is
expose merge_config to the actual tasks, so if this is showing an error
I jiggled something else, or it was always around.

Bruce

>
> If you do want to try and make it fail in a scenario like this, the
> patch needs to
> go to the linux kernel mailing list.
>
> Cheers,
>
> Bruce
>
>
>
>     Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com
>     <mailto:adrian.ratiu@ni.com>>
>     ---
>      tools/merge_config.sh | 5 ++++-
>      1 file changed, 4 insertions(+), 1 deletion(-)
>
>     diff --git a/tools/merge_config.sh b/tools/merge_config.sh
>     index 67d1314..5212f37 100755
>     --- a/tools/merge_config.sh
>     +++ b/tools/merge_config.sh
>     @@ -152,7 +152,10 @@ fi
>      # alldefconfig: Fills in any missing symbols with Kconfig default
>      # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>      make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
>     -
>     +if [ "$?" -ne 0 ]; then
>     +    echo "Make failed to fill missing config symbols. Exit." >&2
>     +    exit 1
>     +fi
>
>
>      # Check all specified config values took (might have
>     missed-dependency issues)
>      for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
>     --
>     2.9.3
>
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"
>
>



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

* Re: [OE-core][yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
  2016-08-29 12:07   ` [yocto-kernel-tools][PATCH] " Bruce Ashfield
@ 2016-08-29 13:09     ` Ioan-Adrian Ratiu
  -1 siblings, 0 replies; 12+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-08-29 13:09 UTC (permalink / raw)
  To: Bruce Ashfield
  Cc: Yocto Project Discussion,
	Patches and discussions about the oe-core layer

On Mon, 29 Aug 2016, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
> On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
> wrote:
>
>> merge_configs.sh calls make on the generated kernel config from
>> the defconfig + fragments to fill in any missing symbols. make
>> can fail and this can lead to nasty errors further on in the
>> build like generating an unbootable kernel image.
>>
>> Check the make return code and fail loudly if non-zero.
>>
>
> We don't want merge config to fail in a scenario like this. It is up to
> whatever
> calls merge_config to add that sort of logic. Which is what I do with the
> kernel
> audit phase of linux-yocto.

Why exactly don't we want to check for errors here? Anyone calling
merge_configs has no way of knowing if this make call failed if we don't
check its return code and pass the error up the call chain.

>
> If you do want to try and make it fail in a scenario like this, the patch
> needs to
> go to the linux kernel mailing list.

I don't understand how sending this patch to lkml helps because
yocto-kernel-tools is a yocto/oe project and is outside the kernel
codebase, no?

>
> Cheers,
>
> Bruce
>
>
>>
>> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
>> ---
>>  tools/merge_config.sh | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/merge_config.sh b/tools/merge_config.sh
>> index 67d1314..5212f37 100755
>> --- a/tools/merge_config.sh
>> +++ b/tools/merge_config.sh
>> @@ -152,7 +152,10 @@ fi
>>  # alldefconfig: Fills in any missing symbols with Kconfig default
>>  # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>>  make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
>> -
>> +if [ "$?" -ne 0 ]; then
>> +    echo "Make failed to fill missing config symbols. Exit." >&2
>> +    exit 1
>> +fi
>
>
>>  # Check all specified config values took (might have missed-dependency
>> issues)
>>  for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
>> --
>> 2.9.3
>>
>>
>
>
> -- 
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee
> at its end"


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

* Re: [yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
@ 2016-08-29 13:09     ` Ioan-Adrian Ratiu
  0 siblings, 0 replies; 12+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-08-29 13:09 UTC (permalink / raw)
  To: Bruce Ashfield
  Cc: Yocto Project Discussion,
	Patches and discussions about the oe-core layer

On Mon, 29 Aug 2016, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
> On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
> wrote:
>
>> merge_configs.sh calls make on the generated kernel config from
>> the defconfig + fragments to fill in any missing symbols. make
>> can fail and this can lead to nasty errors further on in the
>> build like generating an unbootable kernel image.
>>
>> Check the make return code and fail loudly if non-zero.
>>
>
> We don't want merge config to fail in a scenario like this. It is up to
> whatever
> calls merge_config to add that sort of logic. Which is what I do with the
> kernel
> audit phase of linux-yocto.

Why exactly don't we want to check for errors here? Anyone calling
merge_configs has no way of knowing if this make call failed if we don't
check its return code and pass the error up the call chain.

>
> If you do want to try and make it fail in a scenario like this, the patch
> needs to
> go to the linux kernel mailing list.

I don't understand how sending this patch to lkml helps because
yocto-kernel-tools is a yocto/oe project and is outside the kernel
codebase, no?

>
> Cheers,
>
> Bruce
>
>
>>
>> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
>> ---
>>  tools/merge_config.sh | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/merge_config.sh b/tools/merge_config.sh
>> index 67d1314..5212f37 100755
>> --- a/tools/merge_config.sh
>> +++ b/tools/merge_config.sh
>> @@ -152,7 +152,10 @@ fi
>>  # alldefconfig: Fills in any missing symbols with Kconfig default
>>  # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>>  make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
>> -
>> +if [ "$?" -ne 0 ]; then
>> +    echo "Make failed to fill missing config symbols. Exit." >&2
>> +    exit 1
>> +fi
>
>
>>  # Check all specified config values took (might have missed-dependency
>> issues)
>>  for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
>> --
>> 2.9.3
>>
>>
>
>
> -- 
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee
> at its end"


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

* Re: [OE-core][yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
  2016-08-29 12:55     ` [yocto] [yocto-kernel-tools][PATCH] " Bruce Ashfield
@ 2016-08-29 13:22       ` Ioan-Adrian Ratiu
  -1 siblings, 0 replies; 12+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-08-29 13:22 UTC (permalink / raw)
  To: Bruce Ashfield, Bruce Ashfield
  Cc: Yocto Project Discussion,
	Patches and discussions about the oe-core layer

On Mon, 29 Aug 2016, Bruce Ashfield <bruce.ashfield@windriver.com> wrote:
> On 2016-08-29 08:07 AM, Bruce Ashfield wrote:
>>
>>
>> On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com
>> <mailto:adrian.ratiu@ni.com>> wrote:
>>
>>     merge_configs.sh calls make on the generated kernel config from
>>     the defconfig + fragments to fill in any missing symbols. make
>>     can fail and this can lead to nasty errors further on in the
>>     build like generating an unbootable kernel image.
>>
>>     Check the make return code and fail loudly if non-zero.
>>
>>
>> We don't want merge config to fail in a scenario like this. It is up to
>> whatever
>> calls merge_config to add that sort of logic. Which is what I do with
>> the kernel
>> audit phase of linux-yocto.
>
> I saw the other patch after replying here. So this is causing some sort
> of non Kconfig related error (i.e. host contamination) ? If so, that is
> a different scenario than I was thinking of when I wrote this.

Yes, exactly.

>
> Either way, like I said in my other email, I'd like to understand why
> this is popping up now, since I'm not seeing anything like it in my
> builds .. with my recent changes, all that I've essentially done is
> expose merge_config to the actual tasks, so if this is showing an error
> I jiggled something else, or it was always around.

It was always around, even before the cleanup you did in this area .
Remember I sent you a year ago patches for this issue when you were on
vacation and you told me you didn't need that patch?

These patches are a rebase on top of the current master of those from
a year ago. This issue is around since the sysroot poisoning commit back
in 2014.

>
> Bruce
>
>>
>> If you do want to try and make it fail in a scenario like this, the
>> patch needs to
>> go to the linux kernel mailing list.
>>
>> Cheers,
>>
>> Bruce
>>
>>
>>
>>     Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com
>>     <mailto:adrian.ratiu@ni.com>>
>>     ---
>>      tools/merge_config.sh | 5 ++++-
>>      1 file changed, 4 insertions(+), 1 deletion(-)
>>
>>     diff --git a/tools/merge_config.sh b/tools/merge_config.sh
>>     index 67d1314..5212f37 100755
>>     --- a/tools/merge_config.sh
>>     +++ b/tools/merge_config.sh
>>     @@ -152,7 +152,10 @@ fi
>>      # alldefconfig: Fills in any missing symbols with Kconfig default
>>      # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>>      make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
>>     -
>>     +if [ "$?" -ne 0 ]; then
>>     +    echo "Make failed to fill missing config symbols. Exit." >&2
>>     +    exit 1
>>     +fi
>>
>>
>>      # Check all specified config values took (might have
>>     missed-dependency issues)
>>      for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
>>     --
>>     2.9.3
>>
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end"
>>
>>


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

* Re: [yocto] [yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
@ 2016-08-29 13:22       ` Ioan-Adrian Ratiu
  0 siblings, 0 replies; 12+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-08-29 13:22 UTC (permalink / raw)
  To: Bruce Ashfield, Bruce Ashfield
  Cc: Yocto Project Discussion,
	Patches and discussions about the oe-core layer

On Mon, 29 Aug 2016, Bruce Ashfield <bruce.ashfield@windriver.com> wrote:
> On 2016-08-29 08:07 AM, Bruce Ashfield wrote:
>>
>>
>> On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com
>> <mailto:adrian.ratiu@ni.com>> wrote:
>>
>>     merge_configs.sh calls make on the generated kernel config from
>>     the defconfig + fragments to fill in any missing symbols. make
>>     can fail and this can lead to nasty errors further on in the
>>     build like generating an unbootable kernel image.
>>
>>     Check the make return code and fail loudly if non-zero.
>>
>>
>> We don't want merge config to fail in a scenario like this. It is up to
>> whatever
>> calls merge_config to add that sort of logic. Which is what I do with
>> the kernel
>> audit phase of linux-yocto.
>
> I saw the other patch after replying here. So this is causing some sort
> of non Kconfig related error (i.e. host contamination) ? If so, that is
> a different scenario than I was thinking of when I wrote this.

Yes, exactly.

>
> Either way, like I said in my other email, I'd like to understand why
> this is popping up now, since I'm not seeing anything like it in my
> builds .. with my recent changes, all that I've essentially done is
> expose merge_config to the actual tasks, so if this is showing an error
> I jiggled something else, or it was always around.

It was always around, even before the cleanup you did in this area .
Remember I sent you a year ago patches for this issue when you were on
vacation and you told me you didn't need that patch?

These patches are a rebase on top of the current master of those from
a year ago. This issue is around since the sysroot poisoning commit back
in 2014.

>
> Bruce
>
>>
>> If you do want to try and make it fail in a scenario like this, the
>> patch needs to
>> go to the linux kernel mailing list.
>>
>> Cheers,
>>
>> Bruce
>>
>>
>>
>>     Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com
>>     <mailto:adrian.ratiu@ni.com>>
>>     ---
>>      tools/merge_config.sh | 5 ++++-
>>      1 file changed, 4 insertions(+), 1 deletion(-)
>>
>>     diff --git a/tools/merge_config.sh b/tools/merge_config.sh
>>     index 67d1314..5212f37 100755
>>     --- a/tools/merge_config.sh
>>     +++ b/tools/merge_config.sh
>>     @@ -152,7 +152,10 @@ fi
>>      # alldefconfig: Fills in any missing symbols with Kconfig default
>>      # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>>      make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
>>     -
>>     +if [ "$?" -ne 0 ]; then
>>     +    echo "Make failed to fill missing config symbols. Exit." >&2
>>     +    exit 1
>>     +fi
>>
>>
>>      # Check all specified config values took (might have
>>     missed-dependency issues)
>>      for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
>>     --
>>     2.9.3
>>
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end"
>>
>>


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

* Re: [OE-core][yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
  2016-08-29 13:22       ` [yocto] [yocto-kernel-tools][PATCH] " Ioan-Adrian Ratiu
@ 2016-08-29 13:27         ` Bruce Ashfield
  -1 siblings, 0 replies; 12+ messages in thread
From: Bruce Ashfield @ 2016-08-29 13:27 UTC (permalink / raw)
  To: Ioan-Adrian Ratiu, Bruce Ashfield
  Cc: Yocto Project Discussion,
	Patches and discussions about the oe-core layer

On 2016-08-29 09:22 AM, Ioan-Adrian Ratiu wrote:
> On Mon, 29 Aug 2016, Bruce Ashfield <bruce.ashfield@windriver.com> wrote:
>> On 2016-08-29 08:07 AM, Bruce Ashfield wrote:
>>>
>>>
>>> On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com
>>> <mailto:adrian.ratiu@ni.com>> wrote:
>>>
>>>     merge_configs.sh calls make on the generated kernel config from
>>>     the defconfig + fragments to fill in any missing symbols. make
>>>     can fail and this can lead to nasty errors further on in the
>>>     build like generating an unbootable kernel image.
>>>
>>>     Check the make return code and fail loudly if non-zero.
>>>
>>>
>>> We don't want merge config to fail in a scenario like this. It is up to
>>> whatever
>>> calls merge_config to add that sort of logic. Which is what I do with
>>> the kernel
>>> audit phase of linux-yocto.
>>
>> I saw the other patch after replying here. So this is causing some sort
>> of non Kconfig related error (i.e. host contamination) ? If so, that is
>> a different scenario than I was thinking of when I wrote this.
>
> Yes, exactly.
>
>>
>> Either way, like I said in my other email, I'd like to understand why
>> this is popping up now, since I'm not seeing anything like it in my
>> builds .. with my recent changes, all that I've essentially done is
>> expose merge_config to the actual tasks, so if this is showing an error
>> I jiggled something else, or it was always around.
>
> It was always around, even before the cleanup you did in this area .
> Remember I sent you a year ago patches for this issue when you were on
> vacation and you told me you didn't need that patch?

Let me spin up a couple more builds.

I'm about to push v4.8 support, and I'd like to see if I can trigger
the same issue in my clean builds.

If I can't make it happen, my answer will still be the same :D But
If I do see this, I'll queue the patch with my series and let you
know.

Bruce

>
> These patches are a rebase on top of the current master of those from
> a year ago. This issue is around since the sysroot poisoning commit back
> in 2014.
>
>>
>> Bruce
>>
>>>
>>> If you do want to try and make it fail in a scenario like this, the
>>> patch needs to
>>> go to the linux kernel mailing list.
>>>
>>> Cheers,
>>>
>>> Bruce
>>>
>>>
>>>
>>>     Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com
>>>     <mailto:adrian.ratiu@ni.com>>
>>>     ---
>>>      tools/merge_config.sh | 5 ++++-
>>>      1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>>     diff --git a/tools/merge_config.sh b/tools/merge_config.sh
>>>     index 67d1314..5212f37 100755
>>>     --- a/tools/merge_config.sh
>>>     +++ b/tools/merge_config.sh
>>>     @@ -152,7 +152,10 @@ fi
>>>      # alldefconfig: Fills in any missing symbols with Kconfig default
>>>      # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>>>      make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
>>>     -
>>>     +if [ "$?" -ne 0 ]; then
>>>     +    echo "Make failed to fill missing config symbols. Exit." >&2
>>>     +    exit 1
>>>     +fi
>>>
>>>
>>>      # Check all specified config values took (might have
>>>     missed-dependency issues)
>>>      for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
>>>     --
>>>     2.9.3
>>>
>>>
>>>
>>>
>>> --
>>> "Thou shalt not follow the NULL pointer, for chaos and madness await
>>> thee at its end"
>>>
>>>



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

* Re: [yocto] [yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
@ 2016-08-29 13:27         ` Bruce Ashfield
  0 siblings, 0 replies; 12+ messages in thread
From: Bruce Ashfield @ 2016-08-29 13:27 UTC (permalink / raw)
  To: Ioan-Adrian Ratiu, Bruce Ashfield
  Cc: Yocto Project Discussion,
	Patches and discussions about the oe-core layer

On 2016-08-29 09:22 AM, Ioan-Adrian Ratiu wrote:
> On Mon, 29 Aug 2016, Bruce Ashfield <bruce.ashfield@windriver.com> wrote:
>> On 2016-08-29 08:07 AM, Bruce Ashfield wrote:
>>>
>>>
>>> On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com
>>> <mailto:adrian.ratiu@ni.com>> wrote:
>>>
>>>     merge_configs.sh calls make on the generated kernel config from
>>>     the defconfig + fragments to fill in any missing symbols. make
>>>     can fail and this can lead to nasty errors further on in the
>>>     build like generating an unbootable kernel image.
>>>
>>>     Check the make return code and fail loudly if non-zero.
>>>
>>>
>>> We don't want merge config to fail in a scenario like this. It is up to
>>> whatever
>>> calls merge_config to add that sort of logic. Which is what I do with
>>> the kernel
>>> audit phase of linux-yocto.
>>
>> I saw the other patch after replying here. So this is causing some sort
>> of non Kconfig related error (i.e. host contamination) ? If so, that is
>> a different scenario than I was thinking of when I wrote this.
>
> Yes, exactly.
>
>>
>> Either way, like I said in my other email, I'd like to understand why
>> this is popping up now, since I'm not seeing anything like it in my
>> builds .. with my recent changes, all that I've essentially done is
>> expose merge_config to the actual tasks, so if this is showing an error
>> I jiggled something else, or it was always around.
>
> It was always around, even before the cleanup you did in this area .
> Remember I sent you a year ago patches for this issue when you were on
> vacation and you told me you didn't need that patch?

Let me spin up a couple more builds.

I'm about to push v4.8 support, and I'd like to see if I can trigger
the same issue in my clean builds.

If I can't make it happen, my answer will still be the same :D But
If I do see this, I'll queue the patch with my series and let you
know.

Bruce

>
> These patches are a rebase on top of the current master of those from
> a year ago. This issue is around since the sysroot poisoning commit back
> in 2014.
>
>>
>> Bruce
>>
>>>
>>> If you do want to try and make it fail in a scenario like this, the
>>> patch needs to
>>> go to the linux kernel mailing list.
>>>
>>> Cheers,
>>>
>>> Bruce
>>>
>>>
>>>
>>>     Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com
>>>     <mailto:adrian.ratiu@ni.com>>
>>>     ---
>>>      tools/merge_config.sh | 5 ++++-
>>>      1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>>     diff --git a/tools/merge_config.sh b/tools/merge_config.sh
>>>     index 67d1314..5212f37 100755
>>>     --- a/tools/merge_config.sh
>>>     +++ b/tools/merge_config.sh
>>>     @@ -152,7 +152,10 @@ fi
>>>      # alldefconfig: Fills in any missing symbols with Kconfig default
>>>      # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>>>      make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
>>>     -
>>>     +if [ "$?" -ne 0 ]; then
>>>     +    echo "Make failed to fill missing config symbols. Exit." >&2
>>>     +    exit 1
>>>     +fi
>>>
>>>
>>>      # Check all specified config values took (might have
>>>     missed-dependency issues)
>>>      for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
>>>     --
>>>     2.9.3
>>>
>>>
>>>
>>>
>>> --
>>> "Thou shalt not follow the NULL pointer, for chaos and madness await
>>> thee at its end"
>>>
>>>



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

end of thread, other threads:[~2016-08-29 13:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29  9:19 [OE-core][yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails Ioan-Adrian Ratiu
2016-08-29  9:19 ` [yocto-kernel-tools][PATCH] " Ioan-Adrian Ratiu
2016-08-29 12:07 ` [OE-core][yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 12:07   ` [yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 12:55   ` [OE-core][yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 12:55     ` [yocto] [yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 13:22     ` [OE-core][yocto-kernel-tools][PATCH] " Ioan-Adrian Ratiu
2016-08-29 13:22       ` [yocto] [yocto-kernel-tools][PATCH] " Ioan-Adrian Ratiu
2016-08-29 13:27       ` [OE-core][yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 13:27         ` [yocto] [yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 13:09   ` [OE-core][yocto-kernel-tools][PATCH] " Ioan-Adrian Ratiu
2016-08-29 13:09     ` [yocto-kernel-tools][PATCH] " Ioan-Adrian Ratiu

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.