Exemplo n.º 1
0
 def test_rootdev_from_cmdline_with_root_without_dev_prefix(self):
     """Add /dev prefix to cmdline root when the path lacks the prefix."""
     self.assertEqual(
         "/dev/this", util.rootdev_from_cmdline("asdf root=this")
     )
Exemplo n.º 2
0
 def test_rootdev_from_cmdline_with_root_with_uuid(self):
     """When cmdline root contains a UUID, our root is disk/by-uuid."""
     self.assertEqual(
         '/dev/disk/by-uuid/adsfdsaf-adsf',
         util.rootdev_from_cmdline('asdf root=UUID=adsfdsaf-adsf'))
Exemplo n.º 3
0
 def test_rootdev_from_cmdline_with_root_startswith_dev(self):
     """Return the cmdline root when the path starts with /dev."""
     self.assertEqual(
         "/dev/this", util.rootdev_from_cmdline("asdf root=/dev/this")
     )
Exemplo n.º 4
0
 def test_rootdev_from_cmdline_with_root_with_label(self):
     """When cmdline root contains a LABEL, our root is disk/by-label."""
     self.assertEqual('/dev/disk/by-label/unique',
                      util.rootdev_from_cmdline('asdf root=LABEL=unique'))