mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 21:51:21 +00:00
Fix typos in pt-summary tests from r85.
This commit is contained in:
@@ -161,7 +161,7 @@ parse_proc_cpuinfo () {
|
|||||||
name_val "Speeds" "$(group_concat "$file.unq")"
|
name_val "Speeds" "$(group_concat "$file.unq")"
|
||||||
|
|
||||||
awk -F: '/model name/{print $2}' $file \
|
awk -F: '/model name/{print $2}' $file \
|
||||||
| sort | uniq -c > "$file-2"
|
| sort | uniq -c > "$file.unq"
|
||||||
name_val "Models" "$(group_concat "$file.unq")"
|
name_val "Models" "$(group_concat "$file.unq")"
|
||||||
|
|
||||||
awk -F: '/cache size/{print $2}' $file \
|
awk -F: '/cache size/{print $2}' $file \
|
||||||
@@ -348,19 +348,19 @@ parse_filesystems () {
|
|||||||
local file=$1
|
local file=$1
|
||||||
local platform=$2
|
local platform=$2
|
||||||
|
|
||||||
local spec=$(awk '
|
local spec=$(awk "
|
||||||
BEGIN {
|
BEGIN {
|
||||||
device = 10;
|
device = 10;
|
||||||
fstype = 4;
|
fstype = 4;
|
||||||
options = 4;
|
options = 4;
|
||||||
}
|
}
|
||||||
/./ {
|
/./ {
|
||||||
f_device = $1;
|
f_device = \$1;
|
||||||
f_fstype = $10;
|
f_fstype = \$10;
|
||||||
f_options = substr($11, 2, length($11) - 2);
|
f_options = substr(\$11, 2, length(\$11) - 2);
|
||||||
if ( "$2" == "FreeBSD" ) {
|
if ( \"$2\" == \"FreeBSD\" ) {
|
||||||
f_fstype = substr($9, 2, length($9) - 2);
|
f_fstype = substr(\$9, 2, length(\$9) - 2);
|
||||||
f_options = substr($0, index($0, ",") + 2);
|
f_options = substr(\$0, index(\$0, \",\") + 2);
|
||||||
f_options = substr(f_options, 1, length(f_options) - 1);
|
f_options = substr(f_options, 1, length(f_options) - 1);
|
||||||
}
|
}
|
||||||
if ( length(f_device) > device ) {
|
if ( length(f_device) > device ) {
|
||||||
@@ -374,9 +374,9 @@ parse_filesystems () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
END{
|
END{
|
||||||
print "%-" device "s %5s %4s %-" fstype "s %-" options "s %s";
|
print \"%-\" device \"s %5s %4s %-\" fstype \"s %-\" options \"s %s\";
|
||||||
}
|
}
|
||||||
' $file)
|
" $file)
|
||||||
|
|
||||||
awk "
|
awk "
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
@@ -3,35 +3,35 @@
|
|||||||
TEST=5
|
TEST=5
|
||||||
|
|
||||||
TEST_NAME="lspci-001.txt"
|
TEST_NAME="lspci-001.txt"
|
||||||
<<EOF > $TMPDIR/expected
|
cat <<EOF > $TMPDIR/expected
|
||||||
Fusion-MPT SAS
|
Fusion-MPT SAS
|
||||||
EOF
|
EOF
|
||||||
parse_raid_controller_lspci samples/lspci-001.txt > $TMPDIR/got
|
parse_raid_controller_lspci samples/lspci-001.txt > $TMPDIR/got
|
||||||
no_diff $TMPDIR/got $TMPDIR/expected
|
no_diff $TMPDIR/got $TMPDIR/expected
|
||||||
|
|
||||||
TEST_NAME="lspci-002.txt"
|
TEST_NAME="lspci-002.txt"
|
||||||
<<EOF > $TMPDIR/expected
|
cat <<EOF > $TMPDIR/expected
|
||||||
LSI Logic Unknown
|
LSI Logic Unknown
|
||||||
EOF
|
EOF
|
||||||
parse_raid_controller_lspci samples/lspci-002.txt > $TMPDIR/got
|
parse_raid_controller_lspci samples/lspci-002.txt > $TMPDIR/got
|
||||||
no_diff $TMPDIR/got $TMPDIR/expected
|
no_diff $TMPDIR/got $TMPDIR/expected
|
||||||
|
|
||||||
TEST_NAME="lspci-003.txt"
|
TEST_NAME="lspci-003.txt"
|
||||||
<<EOF > $TMPDIR/expected
|
cat <<EOF > $TMPDIR/expected
|
||||||
AACRAID
|
AACRAID
|
||||||
EOF
|
EOF
|
||||||
parse_raid_controller_lspci samples/lspci-003.txt > $TMPDIR/got
|
parse_raid_controller_lspci samples/lspci-003.txt > $TMPDIR/got
|
||||||
no_diff $TMPDIR/got $TMPDIR/expected
|
no_diff $TMPDIR/got $TMPDIR/expected
|
||||||
|
|
||||||
TEST_NAME="lspci-004.txt"
|
TEST_NAME="lspci-004.txt"
|
||||||
<<EOF > $TMPDIR/expected
|
cat <<EOF > $TMPDIR/expected
|
||||||
LSI Logic MegaRAID SAS
|
LSI Logic MegaRAID SAS
|
||||||
EOF
|
EOF
|
||||||
parse_raid_controller_lspci samples/lspci-004.txt > $TMPDIR/got
|
parse_raid_controller_lspci samples/lspci-004.txt > $TMPDIR/got
|
||||||
no_diff $TMPDIR/got $TMPDIR/expected
|
no_diff $TMPDIR/got $TMPDIR/expected
|
||||||
|
|
||||||
TEST_NAME="lspci-006.txt"
|
TEST_NAME="lspci-006.txt"
|
||||||
<<EOF > $TMPDIR/expected
|
cat <<EOF > $TMPDIR/expected
|
||||||
HP Smart Array
|
HP Smart Array
|
||||||
EOF
|
EOF
|
||||||
parse_raid_controller_lspci samples/lspci-006.txt > $TMPDIR/got
|
parse_raid_controller_lspci samples/lspci-006.txt > $TMPDIR/got
|
||||||
|
@@ -82,7 +82,7 @@ run_test() {
|
|||||||
local t_dir=$(dirname $t)
|
local t_dir=$(dirname $t)
|
||||||
TEST_FILE=$(basename $t)
|
TEST_FILE=$(basename $t)
|
||||||
cd $t_dir
|
cd $t_dir
|
||||||
source $TEST_FILE
|
source ./$TEST_FILE
|
||||||
cd $cwd
|
cd $cwd
|
||||||
|
|
||||||
return $?
|
return $?
|
||||||
|
Reference in New Issue
Block a user