]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Don't check if entries under /sys/fs/resctrl/(info/) are directories
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 29 Jan 2018 13:46:45 +0000 (14:46 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 29 Jan 2018 20:40:54 +0000 (21:40 +0100)
commitf2e16994f7d660a54daba1059441dc0dcf4d9cbd
tree1cb347690af0e4b2238ff170f47c6e05c1bfe767
parente28ccd2643b0c4cf35c4b53876fa46dc23007426
util: Don't check if entries under /sys/fs/resctrl/(info/) are directories

We are skipping non-directories under /sys/fs/resctrl/(info/) since those are not
interesting for us.  However in tests it can sometimes happen that ent->d_type
is 0 instead of 4 (DT_DIR) for directories.

I've seen it fail on two machines.  Different machines, different systems, I
cannot reproduce it even using the same setup.  So one of the ways how to work
around this is call stat() on it.  The other one is not checking if it is a
directory since we'll find out eventually when we want to read some files
underneath it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/util/virresctrl.c