Bug 1255191 - udev_enumerate_add_match_parent() results does not include device
udev_enumerate_add_match_parent() results does not include device
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: beta
: 7.2
Assigned To: systemd-maint
qe-baseos-daemons
:
Depends On: 1297512
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-19 18:19 EDT by mulhern
Modified: 2018-02-14 18:05 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Simple little test file (811 bytes, text/plain)
2015-08-19 18:19 EDT, mulhern
no flags Details

  None (edit)
Description mulhern 2015-08-19 18:19:37 EDT
Created attachment 1065019 [details]
Simple little test file

Description of problem:

The documentation (https://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/libudev-udev-enumerate.html#udev-enumerate-add-match-parent) specifies that the parent argument should be included in the result. But, in some cases, it is not.

Version-Release number of selected component (if applicable):

systemd (216)

How reproducible:

Always reproducible for certain devices.

Steps to Reproduce:
1. Compile and execute the attached file on my machine.
2. Examine the output, and notice that "/sys/devices/system/memory" is not
included.

-- alternatively, run python-pyudev test suite and hope to see a few failures
in tests/test_enumerate.py:test_match_parent().


Actual results:

Parent is not included.

Expected results:

Parent is included.

Additional info:

This came to light while I was running the python-pyudev test-suite, but the
bug is in libudev.
Comment 1 mulhern 2015-09-08 12:56:49 EDT
Problem also occurs in systemd (219).
Comment 2 mulhern 2015-09-08 13:01:21 EDT
Perhaps this is a documentation bug? But, at some point, the statement in the documentation was true, and now it is false.
Comment 4 mulhern 2016-01-18 16:03:45 EST
I believe that this bz is connected with bz#1297512, and is really just another expression of it. If a device has no subsystem, then it does not appear in the result of match_parent() on itself.
Comment 5 mulhern 2016-01-20 08:28:56 EST
udev_enumerate_add_match_parent() did include the device, even if subsystem missing, in systemd version 175.

Note You need to log in before you can comment on or make changes to this bug.