On 22.03.19 05:10, [email protected] wrote:
hardware check: Catch errors opening /dev/mem during MMIO check
Catch error, print, and continue, instead of exiting test.
Signed-off-by: Michael Hinton <[email protected]>
diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check
index 51dea82d..517175c5 100755
--- a/tools/jailhouse-hardware-check
+++ b/tools/jailhouse-hardware-check
@@ -102,15 +102,17 @@ class MSR:
class MMIO:
def __init__(self, base, size):
- f = os.open('/dev/mem', os.O_RDONLY | os.O_SYNC)
self.mmap = None
try:
+ f = os.open('/dev/mem', os.O_RDONLY | os.O_SYNC)
self.mmap = mmap.mmap(f, size, mmap.MAP_SHARED, mmap.PROT_READ,
offset=base)
except PermissionError:
pass
except mmap.error:
pass
+ except OSError as e:
+ print(' ERROR: %s' % e)
Now we have the same error reported twice: once here, and once for the access
that fails because we couldn't initialize self.mmap. I'll drop this one while
merging.
Thanks,
Jan
def read64(self, offset):
if self.mmap is None:
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.