@unittest.skip("doesn't work in docker")
    def test_out_of_disk_space_message(self):
        # this test can only be run as root becasue it needs to create
        # a tmpfs temporary partition to invoke the correct exception
        def executeTest(ramdiskdir):
            openFiles = Storage.OpenFiles(10)
            os.system('mount -t tmpfs -o size=1M tmpfs %s' % ramdiskdir)
            try:
                paths = [os.path.join(ramdiskdir, 'test-%s' % ix) for ix in range(10)]
                toWrite = [chr((ix + c) % 255) for c in range(1024) for ix in range(32)] * 32
                for string in toWrite:
                    path = random.choice(paths)
                    openFiles.append(path, string)
            except __HOLE__ as e:
                self.assertEqual(e.errno, errno.ENOSPC)
                openFiles.shutdown()
                raise
        if os.geteuid() == 0:
            ramdiskdir = tempfile.mkdtemp()
            self.assertRaises(OSError, lambda : executeTest(ramdiskdir))
            self.assertTrue(os.system('umount %s' %  ramdiskdir) == 0)
        else:
            logging.warn("this test must be run as a superuser!")
dataset/ETHPy150Open ufora/ufora/ufora/distributed/SharedState/Storage/FileIO_test.py/FileIOTest.test_out_of_disk_space_message