U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Simon Glass <sjg@chromium.org>
Cc: Svyatoslav Ryhel <clamor95@gmail.com>,
	Lukasz Majewski <lukma@denx.de>, Marek Vasut <marex@denx.de>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Ramon Fried <rfried.dev@gmail.com>, Bin Meng <bmeng@tinylab.org>,
	Ion Agorria <ion@agorria.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Harald Seiler <hws@denx.de>,
	Sean Anderson <sean.anderson@seco.com>,
	Heiko Schocher <hs@denx.de>,
	Dmitrii Merkurev <dimorinny@google.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
	u-boot@lists.denx.de
Subject: Re: [PATCH v6 4/6] common: console: record console from the beginning
Date: Wed, 03 Jan 2024 13:41:41 +0100	[thread overview]
Message-ID: <87le964mii.fsf@baylibre.com> (raw)
In-Reply-To: <CAFLszTjmvpbxGguK+FuXZLO=kpYR4pVr4E27BGn1u0B-6uB2eQ@mail.gmail.com>

Hi Simon,

On Tue, Jan 02, 2024 at 07:06, Simon Glass <sjg@chromium.org> wrote:

> Hi Mattijs,
>
> On Tue, Jan 2, 2024 at 2:52 AM Mattijs Korpershoek
> <mkorpershoek@baylibre.com> wrote:
>>
>> Hi Simon, Svyatoslav,
>>
>> On Thu, Dec 28, 2023 at 21:52, Svyatoslav Ryhel <clamor95@gmail.com> wrote:
>>
>> > чт, 28 груд. 2023 р. о 21:48 Simon Glass <sjg@chromium.org> пише:
>> >>
>> >> On Thu, Dec 28, 2023 at 6:02 PM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
>> >> >
>> >> > From: Ion Agorria <ion@agorria.com>
>> >> >
>> >> > Set flag to enable console record on console_record_init
>> >> > and not only on console_record_reset_enable. This fixes
>> >> > missing start of U-Boot log for fastboot oem console
>> >> > command.
>> >> >
>> >> > Signed-off-by: Ion Agorria <ion@agorria.com>
>> >> > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
>> >> > Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
>> >> > ---
>> >> >  common/console.c | 3 +++
>> >> >  1 file changed, 3 insertions(+)
>> >>
>> >> Reviewed-by: Simon Glass <sjg@chromium.org>
>> >>
>> >> OK, I can see the use of this...but I wonder if we can now get rid of
>> >> the same line of code from console_record_reset_enable() ?
>> >>
>> >
>> > Interesting question but let's leave it to a dedicated patch :)
>>
>> I've looked a little more into to this, and I'm not so sure we can get
>> rid of the gd->flags |= GD_FLG_RECORD; in console_record_reset_enable().
>>
>> Removing the flag seems to break quite some tests in
>> test/py/tests/test_ut.py.
>>
>> The breakage can be explained that various unit tests clear the
>> GD_FLG_RECORD with:
>>
>>         gd->flags &= ~GD_FLG_RECORD;
>>
>> Therefore, I would suggest we keep the flag in
>> console_record_reset_enable().
>
> From my look all of those are not needed in tests, i.e. are bugs. If
> you are able to do a patch to remove those lines, it would avoid the
> confusion.

With gd->flags |= GD_FLG_RECORD removed from
console_record_reset_enable(),

When I run:
$ ./test/py/test.py --bd sandbox --build -k ut

It produces this list of the the tests that fail:
https://paste.debian.net/1302906/

I can also reproduce individually with a bootflow test, for example:
$ ./test/py/test.py --bd sandbox --build -k ut_bootstd_bootflow_cmd_boot

Produces:
https://paste.debian.net/1302907/

I did not investigate more on detail but it seems not trivial to me.

I can continue the investigation in the coming weeks but I would like
to apply this series this week.

>
> Also, by setting UT_TESTF_CONSOLE_REC for a test, console recording is
> set up automatically, so the console_record_reset_enable() is not
> needed at the start of the test.

I was not aware of that, thank you.

>
> Regards,
> Simon

  reply	other threads:[~2024-01-03 12:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 18:01 [PATCH v6 0/6] Implement fastboot multiresponce Svyatoslav Ryhel
2023-12-28 18:01 ` [PATCH v6 1/6] fastboot: multiresponse support Svyatoslav Ryhel
2023-12-28 18:01 ` [PATCH v6 2/6] fastboot: implement "getvar all" Svyatoslav Ryhel
2023-12-28 18:01 ` [PATCH v6 3/6] common: console: introduce console_record_isempty helper Svyatoslav Ryhel
2023-12-28 19:48   ` Simon Glass
2023-12-28 18:01 ` [PATCH v6 4/6] common: console: record console from the beginning Svyatoslav Ryhel
2023-12-28 19:48   ` Simon Glass
2023-12-28 19:52     ` Svyatoslav Ryhel
2024-01-02  9:52       ` Mattijs Korpershoek
2024-01-02 14:06         ` Simon Glass
2024-01-03 12:41           ` Mattijs Korpershoek [this message]
2024-01-04  1:38             ` Simon Glass
2024-01-04 15:06               ` Mattijs Korpershoek
2023-12-28 18:01 ` [PATCH v6 5/6] lib: membuff: fix readline not returning line in case of overflow Svyatoslav Ryhel
2023-12-28 18:01 ` [PATCH v6 6/6] fastboot: add oem console command support Svyatoslav Ryhel
2024-01-04 15:00 ` [PATCH v6 0/6] Implement fastboot multiresponce Mattijs Korpershoek
2024-01-04 16:14   ` Svyatoslav Ryhel
2024-01-04 16:44     ` Ion Agorria
2024-01-09 13:46       ` Mattijs Korpershoek

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=87le964mii.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=bmeng@tinylab.org \
    --cc=clamor95@gmail.com \
    --cc=dimorinny@google.com \
    --cc=hs@denx.de \
    --cc=hws@denx.de \
    --cc=ion@agorria.com \
    --cc=joe.hershberger@ni.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=matthias.schiffer@ew.tq-group.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=rfried.dev@gmail.com \
    --cc=sean.anderson@seco.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox