Project

General

Profile

Actions

Bug #14175

closed

pcieadm show-devs can do better on missing pcidb entries

Added by Robert Mustacchi 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

If you have a device that happens not to be in the database at all you see something that isn't super helpful in pcideadm show-devs. For example:

$ pfexec /usr/lib/pci/pcieadm show-devs 5/0/0
BDF     TYPE           DRIVER         DEVICE
5/0/0   PCIe Gen 2x4   --             --

In this case it'd probably help if we just said that it was an unknown device with the device id in it. The same is true for the vendor. After this we then see:

$ pfexec ./pcieadm show-devs 5/0/0
BDF     TYPE           DRIVER         DEVICE
5/0/0   PCIe Gen 2x4   --             Unknown device: 0x10
$ pfexec ./pcieadm show-devs -o bdf,vendor,device 5/0/0
BDF     VENDOR                        DEVICE
5/0/0   Unknown vendor: 0x1d1c        Unknown device: 0x10

This at least gives someone a bit more of a chance of understanding what's going on at this view.

Actions #1

Updated by Electric Monk 7 months ago

  • Gerrit CR set to 1765
Actions #2

Updated by Robert Mustacchi 7 months ago

In addition, regression tested with the test suite:

rm@iliad:/ws/rm$ pfexec /opt/util-tests/bin/utiltest 
Test: /opt/util-tests/tests/allowed-ips (run as root)             [00:01] [PASS]
Test: /opt/util-tests/tests/chown_test (run as root)              [00:01] [PASS]
Test: /opt/util-tests/tests/date_test (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/find/findtest (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/grep_test (run as root)               [00:03] [PASS]
Test: /opt/util-tests/tests/head/head_test (run as root)          [00:00] [PASS]
Test: /opt/util-tests/tests/libjedec_test (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/libsff/libsff (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/make_test (run as root)               [00:01] [PASS]
Test: /opt/util-tests/tests/mdb/mdbtest (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/mergeq/mqt (run as root)              [00:01] [PASS]
Test: /opt/util-tests/tests/mergeq/wqt (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/pcidbtest (run as root)               [00:02] [PASS]
Test: /opt/util-tests/tests/pcieadm-priv (run as root)            [00:02] [PASS]
Test: /opt/util-tests/tests/pcieadmtest (run as root)             [00:05] [PASS]
Test: /opt/util-tests/tests/printf_test (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/set-linkprop (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/sleep/sleeptest (run as root)         [00:44] [PASS]
Test: /opt/util-tests/tests/smbios (run as root)                  [00:00] [PASS]
Test: /opt/util-tests/tests/svr4pkg_test (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/xargs_test (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/awk/runtests.sh (run as nobody)       [02:33] [PASS]
Test: /opt/util-tests/tests/ctf/precheck (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/ctf/ctftest (run as root)             [00:10] [PASS]
Test: /opt/util-tests/tests/demangle/afl-fast (run as root)       [00:01] [PASS]
Test: /opt/util-tests/tests/demangle/gcc-libstdc++ (run as root)  [00:00] [PASS]
Test: /opt/util-tests/tests/demangle/llvm-stdcxxabi (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libcustr/custr_remove (run as root)   [00:00] [PASS]
Test: /opt/util-tests/tests/libcustr/custr_trunc (run as root)    [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_00_blank (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_01_boolean (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_02_numbers (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_03_empty_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_04_number_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_05_strings (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_06_nested (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_07_nested_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/sed/sed_addr (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/sed/multi_test (run as root)          [00:01] [PASS]

Results Summary
PASS      39

Running Time:   00:03:54
Percent passed: 100.0%
Log directory:  /var/tmp/test_results/20211027T084400
Actions #3

Updated by Electric Monk 7 months ago

  • Status changed from New to Closed
  • % Done changed from 50 to 100

git commit bc729d490568bb6599aac50d559e64c366738e85

commit  bc729d490568bb6599aac50d559e64c366738e85
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2021-10-28T21:30:51.000Z

    14174 pcieadm needs to handle v1 pcie cap better
    14175 pcieadm show-devs can do better on missing pcidb entries
    14176 pcieadm aer cap compares wrong field
    Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF