Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-582 test: fix bug in get_ost_param in sanity.sh
[fs/lustre-release.git]
/
lustre
/
tests
/
create.pl
diff --git
a/lustre/tests/create.pl
b/lustre/tests/create.pl
index
c5f3f12
..
848b4cc
100644
(file)
--- a/
lustre/tests/create.pl
+++ b/
lustre/tests/create.pl
@@
-12,11
+12,14
@@
use Getopt::Long;
use vars qw(
$MAX_THREADS
use vars qw(
$MAX_THREADS
+ $SCRIPT_NAME
);
# Don't try to run more than this many threads concurrently.
$MAX_THREADS = 16;
);
# Don't try to run more than this many threads concurrently.
$MAX_THREADS = 16;
+$SCRIPT_NAME = "create.pl";
+
# Initialize variables
my $silent = 0;
my $use_mcreate = 1; # should we use mcreate or open?
# Initialize variables
my $silent = 0;
my $use_mcreate = 1; # should we use mcreate or open?
@@
-113,15
+116,15
@@
sub fork_and_create ($) {
}
$d = int(rand() * $num_files);
my $path = "${mountpt}${which}/thread${thread_num}.${d}";
}
$d = int(rand() * $num_files);
my $path = "${mountpt}${which}/thread${thread_num}.${d}";
- print "Thread $thread_num: Unlink $path start [" . $$."]...\n" if !$silent;
+ print "
$SCRIPT_NAME -
Thread $thread_num: Unlink $path start [" . $$."]...\n" if !$silent;
if (unlink($path)) {
if (unlink($path)) {
- print "Thread $thread_num: Unlink done [$$] $path: Success\n" if !$silent;
+ print "
$SCRIPT_NAME -
Thread $thread_num: Unlink done [$$] $path: Success\n" if !$silent;
} else {
} else {
- print "Thread $thread_num: Unlink done [$$] $path: $!\n"if !$silent;
+ print "
$SCRIPT_NAME -
Thread $thread_num: Unlink done [$$] $path: $!\n"if !$silent;
}
}
if (($current_iteration) % 100 == 0) {
}
}
if (($current_iteration) % 100 == 0) {
- print
STDERR "
Thread $thread_num: " . $current_iteration . " operations [" . $$ . "]\n";
+ print
"$SCRIPT_NAME -
Thread $thread_num: " . $current_iteration . " operations [" . $$ . "]\n";
}
$current_iteration++;
}
}
$current_iteration++;
}
@@
-135,7
+138,7
@@
sub fork_and_create ($) {
unlink("$path") if (-e $path);
}
unlink("$path") if (-e $path);
}
- print "Thread $thread_num: Done.\n";
+ print "
$SCRIPT_NAME -
Thread $thread_num: Done.\n";
exit 0;
exit 0;
@@
-159,16
+162,16
@@
sub do_open ($) {
if ($use_mcreate) {
my $tmp = `./mcreate $path`;
if ($tmp) {
if ($use_mcreate) {
my $tmp = `./mcreate $path`;
if ($tmp) {
- print "Creating $path [" . $$."]...\n" if !$silent;
+ print "
$SCRIPT_NAME -
Creating $path [" . $$."]...\n" if !$silent;
$tmp =~ /.*error: (.*)\n/;
$tmp =~ /.*error: (.*)\n/;
- print "Create done [$$] $path: $!\n" if !$silent;
+ print "
$SCRIPT_NAME -
Create done [$$] $path: $!\n" if !$silent;
} else {
} else {
- print "Create done [$$] $path: Success\n"if !$silent;
+ print "
$SCRIPT_NAME -
Create done [$$] $path: Success\n"if !$silent;
}
} else {
}
} else {
- print "Opening $path [" . $$."]...\n"if !$silent;
+ print "
$SCRIPT_NAME -
Opening $path [" . $$."]...\n"if !$silent;
open(FH, ">$path") || die "open($path: $!";
open(FH, ">$path") || die "open($path: $!";
- print "Open done [$$] $path: Success\n"if !$silent;
+ print "
$SCRIPT_NAME -
Open done [$$] $path: Success\n"if !$silent;
close(FH) || die;
}
}
close(FH) || die;
}
}