All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: yocto-patches@lists.yoctoproject.org
Subject: Re: [yocto-patches] [wic][PATCH v2 0/4] oe/path: three fixes plus unit coverage
Date: Thu, 30 Jul 2026 07:55:17 -0400	[thread overview]
Message-ID: <ams7pWxsG4ZjkuyN@localhost.localdomain> (raw)
In-Reply-To: <243b9b065b08ae79eb0c2f7dd2ac9b8d18ba54f8.camel@pbarker.dev>

On Fri 2026-07-24 @ 04:04:55 PM, Paul Barker via lists.yoctoproject.org wrote:
> On Fri, 2026-07-24 at 07:50 -0400, Trevor Woerner via
> lists.yoctoproject.org wrote:
> > This series continues the standalone unit-test work, this time over
> > oe/path.py. It follows the same shape the suite settled on: each
> > source fix is its own standalone commit, and the green test module
> > lands last, so the suite passes at every commit.
> > 
> > Three fixes come first, each independent of the others:
> > 
> >   - __realpath's isdir guard assigns a bare `false`, which is not a
> >     Python name; when os.path.isdir() raises, the handler meant to
> >     absorb the error raises NameError instead. Use the builtin False.
> >   - symlink(force=True) cleared the destination through remove(), which
> >     globs its argument; a destination containing glob metacharacters
> >     could fail to match itself or match unrelated files. Remove the
> >     literal destination instead.
> >   - canonicalize('') and canonicalize(None) returned the current
> >     working directory, because os.path.realpath('') does; a stray
> >     separator injected a spurious cwd entry too. Skip empty tokens.
> > 
> > The final commit adds tests/unit/test_oe_path.py, covering oe/path's
> > own logic (join, is_path_parent, symlink, make_relative_symlink,
> > canonicalize, which_wild, realpath) and locking in the three fixes.
> > Backing any fix out turns the matching test red. The suite is green
> > and ruff-clean, and the series passes oe-core's wic oe-selftest with
> > no regressions.
> > 
> > These same three fixes and their equivalent selftest coverage have now
> > landed in OE-core (meta/lib/oe/path.py and oeqa/selftest/liboe.py),
> > where oe/path.py originates. wic vendors a copy of that module; this
> > series keeps the vendored copy from diverging by carrying the identical
> > fixes, with the coverage expressed as wic's own pytest suite.
> > 
> > Trevor Woerner (4):
> >   oe/path: fix bare `false` NameError in __realpath's isdir guard
> >   oe/path: don't glob-expand the destination in symlink(force=True)
> >   oe/path: canonicalize('') should return '' rather than the cwd
> >   tests/unit/test_oe_path: cover oe/path's own path logic
> 
> LGTM, assuming these are direct copies of what was added to OE-core.

Almost. The 3 "fix" patches are identical, but the unit test patch is
different because wic uses pytest and oe-core uses unittest. The test
coverage and what is tested are the same between them, just expressed
differently depending on the test framework.

> Best regards,
> 
> -- 
> Paul Barker
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#4537): https://lists.yoctoproject.org/g/yocto-patches/message/4537
> Mute This Topic: https://lists.yoctoproject.org/mt/120424183/900817
> Group Owner: yocto-patches+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13168745/900817/63955952/xyzzy [twoerner@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 
> 




  reply	other threads:[~2026-07-30 11:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24 11:50 [wic][PATCH v2 0/4] oe/path: three fixes plus unit coverage Trevor Woerner
2026-07-24 11:50 ` [wic][PATCH v2 1/4] oe/path: fix bare `false` NameError in __realpath's isdir guard Trevor Woerner
2026-07-24 11:50 ` [wic][PATCH v2 2/4] oe/path: don't glob-expand the destination in symlink(force=True) Trevor Woerner
2026-07-24 11:50 ` [wic][PATCH v2 3/4] oe/path: canonicalize('') should return '' rather than the cwd Trevor Woerner
2026-07-24 11:50 ` [wic][PATCH v2 4/4] tests/unit/test_oe_path: cover oe/path's own path logic Trevor Woerner
2026-07-24 15:04 ` [yocto-patches] [wic][PATCH v2 0/4] oe/path: three fixes plus unit coverage Paul Barker
2026-07-30 11:55   ` Trevor Woerner [this message]
2026-07-30 12:04     ` Paul Barker
2026-07-30 15:57       ` Trevor Woerner

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=ams7pWxsG4ZjkuyN@localhost.localdomain \
    --to=twoerner@gmail.com \
    --cc=yocto-patches@lists.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.