`os.O_DIRECT` is only defined on platforms that support direct I/O. On
Macs, which don't support direct I/O in this way, `os.O_DIRECT` will
raise an `AttributeError`.
We can still test the code-path, however, by just stubbing out the
value on platforms where it's not supported.
Reviewed: https:/ /review. openstack. org/86094 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=63b0accd89f 2894a199e4a6042 8bb2c5cd20facd
Committed: https:/
Submitter: Jenkins
Branch: master
commit 63b0accd89f2894 a199e4a60428bb2 c5cd20facd
Author: Rick Harris <email address hidden>
Date: Tue Apr 8 12:01:35 2014 -0500
libvirt: Stub O_DIRECT in test if not supported
`os.O_DIRECT` is only defined on platforms that support direct I/O. On
Macs, which don't support direct I/O in this way, `os.O_DIRECT` will
raise an `AttributeError`.
We can still test the code-path, however, by just stubbing out the
value on platforms where it's not supported.
Closes-Bug: 1286958
Change-Id: I8f10d6dfc4a63b 6a961006b029b82 8e703870e46