diff options
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 10c54d6afa..5c9d2b24a3 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -359,13 +359,16 @@ class QemuRunner: | |||
359 | mapdir = "/proc/" + str(self.qemupid) + "/map_files/" | 359 | mapdir = "/proc/" + str(self.qemupid) + "/map_files/" |
360 | try: | 360 | try: |
361 | for f in os.listdir(mapdir): | 361 | for f in os.listdir(mapdir): |
362 | linktarget = os.readlink(os.path.join(mapdir, f)) | 362 | try: |
363 | if not linktarget.startswith("/") or linktarget.startswith("/dev") or "deleted" in linktarget: | 363 | linktarget = os.readlink(os.path.join(mapdir, f)) |
364 | if not linktarget.startswith("/") or linktarget.startswith("/dev") or "deleted" in linktarget: | ||
365 | continue | ||
366 | with open(linktarget, "rb") as readf: | ||
367 | data = True | ||
368 | while data: | ||
369 | data = readf.read(4096) | ||
370 | except FileNotFoundError: | ||
364 | continue | 371 | continue |
365 | with open(linktarget, "rb") as readf: | ||
366 | data = True | ||
367 | while data: | ||
368 | data = readf.read(4096) | ||
369 | # Centos7 doesn't allow us to read /map_files/ | 372 | # Centos7 doesn't allow us to read /map_files/ |
370 | except PermissionError: | 373 | except PermissionError: |
371 | pass | 374 | pass |