diff options
author | Omar Sandoval <osandov@fb.com> | 2018-01-18 13:15:32 -0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-03-06 11:28:36 +0100 |
commit | f676a8ad118ecba7fbf4edc77b91f788c6fa7e7c (patch) | |
tree | 53734d782f62cdb026106a79cc203dead1878a79 /libbtrfsutil/python/tests/test_qgroup.py | |
parent | 92d4035074dd5234f1c3fd263947dde1f9bb288e (diff) |
libbtrfsutil: add btrfs_util_create_subvolume()
Doing the ioctl() directly isn't too bad, but passing in a full path is
more convenient than opening the parent and passing the path component.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'libbtrfsutil/python/tests/test_qgroup.py')
-rw-r--r-- | libbtrfsutil/python/tests/test_qgroup.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libbtrfsutil/python/tests/test_qgroup.py b/libbtrfsutil/python/tests/test_qgroup.py index a590464b..19e6b05a 100644 --- a/libbtrfsutil/python/tests/test_qgroup.py +++ b/libbtrfsutil/python/tests/test_qgroup.py @@ -19,6 +19,17 @@ import os import unittest import btrfsutil +from tests import BtrfsTestCase + + +class TestQgroup(BtrfsTestCase): + def test_subvolume_inherit(self): + subvol = os.path.join(self.mountpoint, 'subvol') + + inherit = btrfsutil.QgroupInherit() + inherit.add_group(5) + + btrfsutil.create_subvolume(subvol, qgroup_inherit=inherit) class TestQgroupInherit(unittest.TestCase): |