self.add_argument('mountpoint', type=str, help="""Mount point.""")
self.add_argument('--allow-other', action='store_true',
help="""Let other users read the mount""")
+ self.add_argument('--subtype', type=str, metavar='STRING',
+ help="""Report mounted filesystem type as "fuse.STRING", instead of just "fuse".""")
mode = self.add_mutually_exclusive_group()
if getattr(self.args, optname)]
# Increase default read/write size from 4KiB to 128KiB
opts += ["big_writes", "max_read=131072"]
+ if self.args.subtype:
+ opts += ["subtype="+self.args.subtype]
return opts
def _setup_logging(self):
--- /dev/null
+import logging
+import subprocess
+
+from .integration_test import IntegrationTest
+
+logger = logging.getLogger('arvados.arv-mount')
+
+
+class MountTypeTest(IntegrationTest):
+ @IntegrationTest.mount(argv=["--subtype=arv-mount-test"])
+ def test_mount_type(self):
+ self.pool_test(self.mnt)
+
+ @staticmethod
+ def _test_mount_type(self, mnt):
+ self.assertEqual(["fuse.arv-mount-test"], [
+ toks[4]
+ for toks in [
+ line.split(' ')
+ for line in subprocess.check_output("mount").split("\n")
+ ]
+ if len(toks) > 4 and toks[2] == mnt
+ ])