I noticed Host.check_diskpace() in server/hosts/base_classes.py does this:

        logging.info('Checking for >= %s GB of space under %s on machine
%s',
                     gb, path, self.hostname)
        df = self.run('df -mP %s | tail -1' % path).stdout.split()
        free_space_gb = int(df[3])/1000.0
        if free_space_gb < gb:
            raise error.AutoservDiskFullHostError(path, gb, free_space_gb)
        else:
            logging.info('Found %s GB >= %s GB of space under %s on machine
%s',
                free_space_gb, gb, path, self.hostname)

I just want to confirm before I change it, but isn't that supposed to be
1024 instead of 1000?  The difference between those two values might not be
much, but it could overinflate the free space by several gigabytes.

Thanks,
-Jongki
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to