Ejemplo n.º 1
0
    def gpt_empty(self):
        pt = gpt()

        self.logger.info("Testing the creation of an empty guid partition table")

        testfile = "/tmp/gpt_empty.img"

        pt = gpt()
        pt.makeDisk(testfile)

        self.logger.info("Review the result with another paritioning tool to confirm the result")
Ejemplo n.º 2
0
    def gpt_badpart(self):
        pt = gpt()

        self.logger.info("Testing the creation of a guid partition table with 1 partition")

        testfile = "/tmp/gpt_1part.img"

        pt = gpt()
        self.assertRaises(InvalidPartitionNumber, pt.addPartition, 129, 512, "linux/filesystem", "a test name")
        pt.makeDisk(testfile)

        self.logger.info("Review the result with another paritioning tool to confirm the result")
Ejemplo n.º 3
0
    def gpt_nparts(self):
        pt = gpt()

        self.logger.info("Testing the creation of a guid partition table with some partitions")

        testfile = "/tmp/gpt_nparts.img"

        pt = gpt()
        for x in range(choice(range(1, 129))):
            pt.addPartition(x, 16, "linux/filesystem", "a test name")
        pt.makeDisk(testfile)

        self.logger.info("Review the result with another paritioning tool to confirm the result")