Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920242 - Test coverage: handling new dependency classes
Summary: Test coverage: handling new dependency classes
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 920241
  Show dependency tree
 
Reported: 2023-12-18 05:09 UTC by Sam James
Modified: 2023-12-18 05:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-18 05:09:34 UTC
This came up in bug 870295:

```
commit 996babb5aa005edef4abb86de1dc585d630ac21d
Author: Sam James <sam@gentoo.org>
Date:   Sat Feb 18 13:26:47 2023 +0000

    tests: resolver: add basic BDEPEND + IDEPEND tests

    These aren't very interesting but they at least check that
    BDEPEND/IDEPEND affect dependency resolution.

    I started to look at testing --with-bdeps but got into
    the weeds.

    Signed-off-by: Sam James <sam@gentoo.org>

commit 22406d51ccaa743da4fd4c45e0fbaca09ffb1eba
Author: Sam James <sam@gentoo.org>
Date:   Sat Feb 18 12:42:09 2023 +0000

    tests: dbapi: add basic metadata test (IDEPEND)

    In f9f55b42f1602e79a5541afcace6b2a30af394e8, I fixed the generation of IDEPEND
    metadata. It turns out we don't have suitable test coverage here.

    Add a basic test to make sure that:
    - IDEPEND survives cache generation and appears in the resultant cache;
    - IDEPEND accumulates across inherits (which is what the actual bug was, in a sense).

    This test fails with the fix for the bug (f9f55b42f1602e79a5541afcace6b2a30af394e8) reverted.

    We need to be testing various bits of newer EAPIs more (not least to ensure
    we don't forget to update one of the various parts of Portage when adding a new one)
    but this is a start.

    Bug: https://bugs.gentoo.org/870295
    See: f9f55b42f1602e79a5541afcace6b2a30af394e8
    Signed-off-by: Sam James <sam@gentoo.org>
```

It turned out we were missing some checks to make sure we consistently cater for new *DEPEND classes.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-18 05:22:48 UTC
We could extend the test in 22406d51ccaa743da4fd4c45e0fbaca09ffb1eba at least to import a list of known dependency classes and make sure they all survive metadata regeneration