Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.347: test suite is failing #6

Open
kloczek opened this issue May 3, 2021 · 4 comments
Open

0.347: test suite is failing #6

kloczek opened this issue May 3, 2021 · 4 comments

Comments

@kloczek
Copy link

kloczek commented May 3, 2021

Looks like something has been changed in 0.347 test suite and it started failing.

[tkloczko@barrel hwdata-0.347]$ make check
fatal: not a git repository (or any parent up to mount point /home/tkloczko)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
OK: /sbin/lspci -i pci.ids
OK: ./check-pci-ids.py
Listing usb devices:
sudo: podman: command not found
cat: /tmp/tmp.9gRim197YD/err.out: No such file or directory
Expected: pci.ids: UTF-8 Unicode text
 Got instead: pci.ids: ASCII text
@kloczek
Copy link
Author

kloczek commented May 3, 2021

Hmm .. perl podlators module provides not podman but pod2man

@kloczek
Copy link
Author

kloczek commented May 3, 2021

After change s/podman/pod2man/

[tkloczko@barrel hwdata-0.347]$ make check
fatal: not a git repository (or any parent up to mount point /home/tkloczko)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
OK: /sbin/lspci -i pci.ids
OK: ./check-pci-ids.py
Listing usb devices:
Unknown option: t
Unknown option: privileged
Unknown option: rm
cat: /tmp/tmp.4SJLEy0OSV/err.out: No such file or directory
Expected: pci.ids: UTF-8 Unicode text
 Got instead: pci.ids: ASCII text
make: *** [Makefile:61: check] Error 1

@vcrhonek
Copy link
Owner

vcrhonek commented May 4, 2021

Hi @kloczek ,
There's only one commit after 0.346 and no change to the test suite was done. See changed files:

$ git show --stat HEAD
commit ae89c73d89bb9f416b25ad9e850e9606e66a573e (HEAD -> master, tag: v0.347, origin/master, origin/HEAD)
Author: Vitezslav Crhonek <[email protected]>
Date:   Mon May 3 14:53:05 2021 +0200

    Update pci and vendor ids
    
    Signed-off-by: Vitezslav Crhonek <[email protected]>

 hwdata.spec |    5 +-
 iab.txt     |   12 +-
 oui.txt     | 2409 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------
 pci.ids     |  141 +++++++++++++++---
 4 files changed, 1847 insertions(+), 720 deletions(-)

Also the test suite works fine for me.

$ make check
OK: /sbin/lspci -i pci.ids
OK: ./check-pci-ids.py
Listing usb devices:
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:0316 Realtek Semiconductor Corp. Card Reader
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04f2:b604 Chicony Electronics Co., Ltd Integrated Camera (1280x720@30)
Bus 001 Device 002: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Vendor: Compaq Computer Corporation
Device: NC3120 Fast Ethernet NIC
Vendor: HP, Inc
Device: OfficeJet Pro K5300
OK: pci.ids: UTF-8 Unicode text
OK: oui.txt: UTF-8 Unicode text
OK: iab.txt: UTF-8 Unicode text
OK: pnp.ids: UTF-8 Unicode text
CHECK date of pci.ids: 2021-04-26
CHECK date of usb.ids: 2021-03-31

@kloczek
Copy link
Author

kloczek commented May 4, 2021

Sorry I was wrong about podman vs. pod2man.
podman has nothong to do with generating man pages from pod files😋

I've look closer on check-usb-ids.sh and:

  • currently test suite uses elevated priledges (gained over sudo).
  • I think that it would be better tu just LD_PRELOAD small wrapper to open() to map ./usb.ids:/usr/share/hwdata/usb.ids or use fakechroot to do that. With that test suite could use path on which usb.ids would be used and that test can be performed without elevated priviledges.
  • test suite as well uses bash when that command executed over bash has nothing bash specyfic. It should be used /bin/sh (FHS +20 guarantes that this path must be present on minimal system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants