[blivet:master 07/11] Make DevicelibsTestCase devices configurable.

Brian C. Lane bcl at redhat.com
Wed Jun 18 00:39:40 UTC 2014


On Tue, Jun 17, 2014 at 11:07:58AM -0400, mulhern wrote:
> -    _LOOP_DEVICES = ["/tmp/test-virtdev0", "/tmp/test-virtdev1"]
> +    DEFAULT_STORE_SIZE = 102400
> +    _DEFAULT_DEVICE_SPEC = [DEFAULT_STORE_SIZE, DEFAULT_STORE_SIZE]
> +    _STORE_FILE_BASE_NAME = 'test-virtdev'
> +    _STORE_FILE_PATH = '/tmp'

This should be /var/tmp -- /tmp/ may be on tmpfs so the space available
will vary.

> +        for index, size in enumerate(self._deviceSpec):
> +            store = os.path.join(self._STORE_FILE_PATH, (self._STORE_FILE_BASE_NAME + "%d") % index)

You could add the %d to the constant and call it STORE_FILE_TEMPLATE

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list