Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
autotest
disktest_freespace.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File disktest_freespace.patch of Package autotest
--- tests/disktest/disktest.py +++ tests/disktest/disktest.py @@ -1,7 +1,10 @@ -import os, sys, subprocess +import os, sys, subprocess, statfs from autotest_lib.client.bin import test, autotest_utils from autotest_lib.client.common_lib import utils, error +def freespace(path): + s = os.statvfs(path) + return s[statvfs.F_BAVAIL] * long(s[statvfs.F_BSIZE]) class disktest(test.test): version = 1 @@ -27,6 +30,9 @@ def execute(self, disks = ["/abuild", gigabytes = 10, chunk_mb = autotest_utils.memtotal() / 1024): os.chdir(self.srcdir) + + gigabytes=freespace("/") / 1024 / 1024 / 1024 + print "resizing to %s GB" % gigabytes if not disks: disks = [self.tmpdir]
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor