[PATCH 1/4] test/py: Shorten u_boot_console
Simon Glass
sjg at chromium.org
Mon Feb 10 01:29:23 AEDT 2025
Hi Love,
On Sun, 2 Feb 2025 at 23:05, Love Kumar <love.kumar at amd.com> wrote:
>
> Hi Simon,
>
> On 26/01/25 4:28 am, Simon Glass wrote:
> > Hi Tom,
> >
> > On Sat, 25 Jan 2025 at 15:55, Tom Rini <trini at konsulko.com> wrote:
> >>
> >> On Sat, Jan 25, 2025 at 03:42:00PM -0700, Simon Glass wrote:
> >>> Hi Tom,
> >>>
> >>> On Sat, 25 Jan 2025 at 14:51, Tom Rini <trini at konsulko.com> wrote:
> >>>>
> >>>> On Sat, Jan 25, 2025 at 02:31:36PM -0700, Simon Glass wrote:
> >>>>
> >>>>> This fixture name is quite long and results in lots of verbose code.
> >>>>> We know this is U-Boot so the 'u_boot_' part is not necessary.
> >>>>>
> >>>>> But it is also a bit of a misnomer, since it provides access to all the
> >>>>> information available to tests. It is not just the console.
> >>>>>
> >>>>> It would be too confusing to use con as it would be confused with
> >>>>> config and it is probably too short.
> >>>>>
> >>>>> So shorten it to 'ubpy'.
> >>>>>
> >>>>> Signed-off-by: Simon Glass <sjg at chromium.org>
> >>>> [snip]
> >>>>> 102 files changed, 2591 insertions(+), 2591 deletions(-)
> >>>>
> >>>> First, I'm not sure I like "ubpy". I believe "u_boot_console" is because
> >>>> it's how we interact with the stdin/stdout of the running U-Boot. And
> >>>> indeed it provides more than that. But ubpy is too abstract and unclear,
> >>>> and looking at the diffstat, I don't know that big global rename is
> >>>> justified to save text space.
> >>>
> >>> I actually get quite confused hunting around in the fixtures so I
> >>> suspect others do too. I would like to settle on some better names.
> >>>
> >>> Yes, I don't like ubpy much, either. Your favourite AI suggests
> >>> 'fixture' or 'test_env', both I which I prefer. The only challenge is
> >>> that 'env' has various other meanings in U-Boot.
> >>
> >> Yes, until someone has a better suggestion than "ubpy", we should leave
> >> things alone. "fixture" has its own meaning within pytest and so that
> >> would also be confusing.
> >
> > Yes, ideas welcome. Arguably it is confusing that this one fixture
> > provides a gateway to all the others.
>
> I have a couple of names to suggest:
> 1) "ubintf"/"ub_interface" - As it interacts with U-Boot during testing
> and acts as the primary interface.
> 2) "ubman"/"ub_manager" - As it manages multiple things in tests, not
> only limited to console.
Thanks for the ideas. Both of those seem good to me. I'll give it a
try with the second one since it is easier to say.
Regards,
Simon
More information about the Linux-erofs
mailing list