All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
To: Bruce Ashfield <bruce.ashfield@windriver.com>,
	Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: Yocto Project Discussion <yocto@yoctoproject.org>,
	Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [yocto] [yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
Date: Mon, 29 Aug 2016 16:22:53 +0300	[thread overview]
Message-ID: <87mvjvvhea.fsf@ni.com> (raw)
In-Reply-To: <53f27a58-40a5-7953-eb7c-9a68af4c28b8@windriver.com>

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"
>>
>>


WARNING: multiple messages have this Message-ID (diff)
From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
To: Bruce Ashfield <bruce.ashfield@windriver.com>,
	Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: Yocto Project Discussion <yocto@yoctoproject.org>,
	Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails
Date: Mon, 29 Aug 2016 16:22:53 +0300	[thread overview]
Message-ID: <87mvjvvhea.fsf@ni.com> (raw)
In-Reply-To: <53f27a58-40a5-7953-eb7c-9a68af4c28b8@windriver.com>

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"
>>
>>


  reply	other threads:[~2016-08-29 13:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29  9:19 [yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails Ioan-Adrian Ratiu
2016-08-29  9:19 ` [OE-core][yocto-kernel-tools][PATCH] " Ioan-Adrian Ratiu
2016-08-29 12:07 ` [yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 12:07   ` [OE-core][yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 12:55   ` [yocto] [yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 12:55     ` [OE-core][yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 13:22     ` Ioan-Adrian Ratiu [this message]
2016-08-29 13:22       ` Ioan-Adrian Ratiu
2016-08-29 13:27       ` [yocto] [yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 13:27         ` [OE-core][yocto-kernel-tools][PATCH] " Bruce Ashfield
2016-08-29 13:09   ` [yocto-kernel-tools][PATCH] " Ioan-Adrian Ratiu
2016-08-29 13:09     ` [OE-core][yocto-kernel-tools][PATCH] " Ioan-Adrian Ratiu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvjvvhea.fsf@ni.com \
    --to=adrian.ratiu@ni.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=bruce.ashfield@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.