Whamcloud - gitweb
9a2c7f0f92a894353f32e41283cd70e8c4f33a78
[fs/lustre-release.git] / lustre / tests / create.pl
1 #!/usr/bin/perl
2
3 my $mtpt = shift || die;
4 my $mount_count = shift || die;
5 my $i = shift || die;
6 my $size = 2;
7
8 while ($i--) {
9     $which = int(rand() * $mount_count) + 1;
10     $path = "$mtpt$which/";
11
12     $d = int(rand() * $size);
13     print `./mcreate $path$d`;
14
15     $which = int(rand() * $mount_count) + 1;
16     $path = "$mtpt$which/";
17
18     $d = int(rand() * $size);
19     unlink("$path$d") || print "unlink($path$d): $!\n"
20 }
21 print "Done.\n";