Skip to content

Commit

Permalink
Add Thomas' tests for btrfs/lvm create options
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerim Gueney authored and Thomas Lange committed Jun 12, 2015
1 parent 69d9ce0 commit d6e0f44
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lib/setup-storage/Commands.pm
Expand Up @@ -1456,6 +1456,29 @@ sub restore_partition_table {
die "setup-storage failed, but the partition tables have been restored\n";
}

################################################################################
#
# @brief test whether --force option is available for btrfs
#
################################################################################
sub btrfs_options {
# check if --force is available for mkfs.btrfs
my $opt = `mkfs.btrfs 2>&1`;
my $btrfsopt = $opt =~ '--force' ? '-f' : '';
return $btrfsopt;
}

################################################################################
#
# @brief test whether --yes option is available for lvcreate
#
################################################################################
# Closes: #750212
sub lvm_options {
my $opt = `lvcreate --yes 2>&1`;
my $lvmopt = $opt =~ 'unrecognized option' ? '' : '--yes';
}

################################################################################
#
# @brief Try to order the queued commands to satisfy all dependencies
Expand Down

0 comments on commit d6e0f44

Please sign in to comment.