OSDN Git Service

tests: clean up partition-table-testing code
authorJim Meyering <meyering@redhat.com>
Sat, 21 Mar 2009 17:44:48 +0000 (18:44 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 24 Jul 2009 13:04:43 +0000 (15:04 +0200)
* libparted/tests/common.c (_implemented_disk_label): Record here
that sun and pc98 are not yet implemented...
* libparted/tests/label.c: ...rather than in 4 places in this file.

libparted/tests/common.c
libparted/tests/label.c

index ea3df40..4095639 100644 (file)
@@ -72,6 +72,8 @@ _implemented_disk_label (const char *label)
 
         /* Not implemented yet */
         if (STREQ (label, "aix")) return 0;
+        if (STREQ (label, "pc98")) return 0;
+        if (STREQ (label, "sun")) return 0;
 
         return 1;
 }
index 270a78b..e0d63c7 100644 (file)
@@ -39,8 +39,6 @@ START_TEST (test_create_label)
         for (type = ped_disk_type_get_next (NULL); type;
              type = ped_disk_type_get_next (type)) {
           fprintf (stderr, "create label: %s\n", type->name); fflush (stderr);
-          if (strcmp (type->name, "sun") == 0) continue;
-          if (strcmp (type->name, "pc98") == 0) continue;
 
                 if (!_implemented_disk_label (type->name))
                         continue;
@@ -68,8 +66,6 @@ START_TEST (test_probe_label)
           fprintf (stderr, "PROBE label: %s\n", type->name); fflush (stderr);
                 if (!_implemented_disk_label (type->name))
                         continue;
-                if (strcmp (type->name, "pc98") == 0) continue;
-                if (strcmp (type->name, "sun") == 0) continue;
 
                 disk = _create_disk_label (dev, type);
                 ped_disk_destroy (disk);
@@ -103,8 +99,6 @@ START_TEST (test_read_label)
           fprintf (stderr, "read label: %s\n", type->name); fflush (stderr);
                 if (!_implemented_disk_label (type->name))
                         continue;
-          if (strcmp (type->name, "pc98") == 0) continue; // segfault
-          if (strcmp (type->name, "sun") == 0) continue; // failed assertion
 
                 disk = _create_disk_label (dev, type);
                 ped_disk_destroy (disk);
@@ -140,11 +134,6 @@ START_TEST (test_clone_label)
                 if (!_implemented_disk_label (type->name))
                         continue;
 
-                /* FIXME: skip this test temporarily, while we wait
-                   for someone to find the cycles to fix the bug.  */
-                if (STREQ (type->name, "pc98")) continue; // segfault
-                if (STREQ (type->name, "sun")) continue; // segfault
-
                 PedDisk* disk = _create_disk_label (dev, type);
 
                 /* Try to clone the disk label. */