Skip to content

Commit

Permalink
fix multipath -l parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ilmanzo committed Aug 11, 2022
1 parent 69aa514 commit 0ab6b52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/console/validate_zfcp_multipath.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ sub verify_plain_scsi_block_devices {
# Verify that the multipath device with WWID 36005076307ffd3b30000000000000132 corresponds to the 200G disk and the multipath device with WWID 36005076307ffd3b30000000000000150 to the 40G disk
# Verify that there are 4 block devices listed for each virtual multipath device, and those corresponds to the right LUN (1077035009 and 1079001089)
sub verify_multipath_block_devices {
my ($wwid, $size, $lun) = @_;
my $mpath = script_output "multipath -l";
my @mpath = split /\n/, $mpath;
# check for 200GB disk (multiline match)
assert_matches qr/^36005076307ffd3b30000000000000132.+\n^size=200G/m, $mpath, "Cannot find 200GB disk on WWID *132";
# must see the LUN 1077035009 over 4 paths
my $large_disks = scalar grep { /1077035009/ } $mpath;
my $large_disks = scalar grep { /1077035009/ } @mpath;
assert_equals 4, $large_disks, "200GB block device does not have 4 paths";
# check for 40GB disk (multiline match)
assert_matches qr/^36005076307ffd3b30000000000000150.+\n^size=40G/m, $mpath, "Cannot find 40GB disk on WWID *150";
# must see the LUN 1079001089 over 4 paths
my $small_disks = scalar grep { /1079001089/ } $mpath;
my $small_disks = scalar grep { /1079001089/ } @mpath;
assert_equals 4, $small_disks, "40GB block device does not have 4 paths";
}

Expand Down

0 comments on commit 0ab6b52

Please sign in to comment.