summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2009-08-03 20:29:24 +0100
committerMatthew Booth <mbooth@redhat.com>2009-08-05 17:08:03 +0100
commit8eb7f1a58f424ad0f210fe638574b5067d2ac97b (patch)
tree00717bc9b23d2b05b3f764bc46a9e1e014c3789d
parent634c033df2e698e1fcc692585fa445d019f0b6e6 (diff)
downloadlibguestfs-8eb7f1a58f424ad0f210fe638574b5067d2ac97b.tar.gz
libguestfs-8eb7f1a58f424ad0f210fe638574b5067d2ac97b.tar.xz
libguestfs-8eb7f1a58f424ad0f210fe638574b5067d2ac97b.zip
Fix swapon_label test
The swapon label test has a side-effect, in that it creates a new partition. This causes the later failure of the list_partitions test. This change causes the swapon_label test to zero /dev/sdb after the test, and then re-read the partition table.
-rwxr-xr-xsrc/generator.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/generator.ml b/src/generator.ml
index c9b33156..94dc268e 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -3254,7 +3254,9 @@ This command disables the libguestfs appliance swap on file.");
[["sfdiskM"; "/dev/sdb"; ","];
["mkswap_L"; "swapit"; "/dev/sdb1"];
["swapon_label"; "swapit"];
- ["swapoff_label"; "swapit"]])],
+ ["swapoff_label"; "swapit"];
+ ["zero"; "/dev/sdb"];
+ ["blockdev_rereadpt"; "/dev/sdb"]])],
"enable swap on labelled swap partition",
"\
This command enables swap to a labelled swap partition.