-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: Add o.fd.U.Filesystem.Size property #477
core: Add o.fd.U.Filesystem.Size property #477
Conversation
I am still working on this, but this is a good preview, I think. Wdyt? |
I think you should use [libblockdev] (http://storaged.org/libblockdev/libblockdev-FS.html) here and store the info just in UDisks not in udev. |
Makes sense, thanks! |
Rewritten with libblockdev, tests added. |
Jenkins, ok to test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Looks good to me otherwise.
disk.Resize(dbus.UInt64(size // 2), self.no_options, dbus_interface=self.iface_prefix + '.Filesystem') | ||
self.assertTrue(disk.Check(self.no_options, dbus_interface=self.iface_prefix + '.Filesystem')) | ||
self.get_property(disk, '.Filesystem', 'Size').assertEqual(size // 2) | ||
|
||
def test_size(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please skip this test for unsupported filesystems and filesystems that can't be created and/or mounted (see _can_create
and _can_mount
in other tests).
Also please "skip" this test for the FailsystemTestCase
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, not yet. I forgot that we only report this for ext and xfs... that's what you meant with "unsupported", obviously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be done now. There are test failures, but I think they are unrelated, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the failures definitely look unrelated. Thanks.
This allows the client to detect filesystems that could be resized to fill more of their block device.
This allows the client to detect filesystems that could be resized to
fill more of their block device.