Re: [libosinfo PATCH v2 0/8] Use "all" arch as a fallback for media/tree detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/28/19 5:26 PM, Fabiano Fidêncio wrote:
> This series has been written considering:
> - https://www.redhat.com/archives/libosinfo/2019-February/msg00247.html
> 
> Let's assume that trees and medias set with architecture "all" will be
> treated as fallback, always.
> 
> https://gitlab.com/libosinfo/libosinfo/issues/20
> 
> Fabiano Fidêncio (8):
>   db: Rename tree to treeinfo in guess_os_from_tree()
>   db: Rename os_* to os_treeinfo_* in guess_os_from_tree()
>   db: Consider the tree arch when guessing an OS from tree
>   db: Deal with "all" tree architectures
>   test-db: Add test for guessing tree from OS
>   db: Consider the media arch when guess an OS from media
>   db: Deal with "all" media architecture
>   test-db: Add test to cover identifying a media with "unknown" arch
> 
>  osinfo/osinfo_db.c                            | 184 ++++++++++++------
>  .../dbdata/os/libosinfo.org/test-db-media.xml |  14 ++
>  .../dbdata/os/libosinfo.org/test-db-tree.xml  |  25 +++
>  tests/test-db.c                               |  78 ++++++++
>  4 files changed, 237 insertions(+), 64 deletions(-)
>  create mode 100644 tests/dbdata/os/libosinfo.org/test-db-tree.xml
> 

Reviewed-by: Cole Robinson <crobinso@xxxxxxxxxx>

I tested with my rhel5 arch='unknown' patchset switched to arch='all'
and things seemed to work too.


Separate from this patchset I've been thinking about tree testing in
general and I think before the next release we need:

- A functional test to run every <tree><url> with <treeinfo> through
libosinfo code to ensure that our logic actually detects the correct
short-id and tree arch.

- Populate the osinfo-db test suite with treeinfo files similar to what
we do with isoinfo output and do unit testing that way.

It scares me a little that an overly liberal regex added to osinfo-db
could cause tree detection regressions by matching the newly added db
entry. Partly it makes me think that we should actually attempt to match
against every <treeinfo> or <media> in osinfo-db and return the one with
the most matching fields. This would let us make fedora-unknown just
have a <treeinfo><family>*Fedora*<... value and not need to worry about
it also matching other Fedora versions since those will have more than
one field. It will also reduce the chance of accidental collision with
newly added <os>. Just some ideas...

Thanks,
Cole

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux