The assignment to result.st_rdev can raise AttributeError as well as
TypeError (on systems where it's not defined at all, it raises
AttributeError; when it's defined, assignment to it raises TypeError).
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index bec3b90..6adf109 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -111,7 +111,7 @@
         try:
             result.st_rdev = 1
             self.fail("No exception thrown")
-        except TypeError:
+        except (AttributeError, TypeError):
             pass
 
         try: