[parted-devel] [PATCH] New test for probing of disk labels

Debarshi 'Rishi' Ray debarshi.ray at gmail.com
Fri Apr 20 17:50:13 UTC 2007


Please find attached a patch introducing a new test for ped_disk_probe.

+                probed = ped_disk_probe (dev);
+                fail_if (!probed,
+                         "Failed to probe the just created label of type: %s",
+                         type->name);
+                fail_if (strcmp (probed->name, type->name) != 0,
+                         "Probe returned label of type: %s as type: %s",
+                         type->name, probed->name);

I have added the second fail_if to make sure that ped_disk_probe
actually detects the correct disk label type. A failure would indicate
a mismatch in ped_disk_new_fresh and ped_disk_probe.

What do you think?

Happy hacking,
Debarshi
-- 
GPG key ID: 63D4A5A7
Key server: pgp.mit.edu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tests-probe.diff
Type: text/x-patch
Size: 2308 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20070420/52fefcb9/tests-probe-0001.bin


More information about the parted-devel mailing list