Skip to content

Commit 3c737f2

Browse files
committed
Claude review: Fix issues in test_header_info that claude uncovered.
1 parent 57989ca commit 3c737f2

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

test_header_info

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ print_general_header_info()
5353
printf "# Number cpus: " >> $out_file
5454
lscpu | grep "CPU(s):" | grep -v NUMA | cut -d':' -f2 | awk '{$1=$1;print}' >> $out_file
5555
printf "# Memory: " >> $out_file
56-
cat /proc/meminfo | grep MemTotal: | awk '{print $2 $3}' >> $out_file
56+
grep MemTotal: /proc/meminfo | awk '{print $2 $3}' >> $out_file
5757
echo "# Test general meta end" >> $out_file
5858
}
5959
#
@@ -62,10 +62,8 @@ print_general_header_info()
6262
print_test_meta()
6363
{
6464
out_file=$1
65-
tdir=$2
66-
fields="$3"
67-
op=$4
68-
size=$5
65+
tdir=""
66+
fields=""
6967

7068
echo "# Test meta data start" >> $out_file
7169
#
@@ -75,7 +73,7 @@ print_test_meta()
7573
printf "$passed_meta" >> $out_file
7674
fi
7775
#
78-
# Only if the dir nameis provided.
76+
# Only if the dir name is provided.
7977
#
8078
if [[ $info_in_dir_name != "" ]]; then
8179
tdir=`echo "$info_in_dir_name" | cut -d' ' -f1`
@@ -91,12 +89,12 @@ print_test_meta()
9189
usage()
9290
{
9391
echo "Usage: $0"
94-
echo "--field_separ <char>: the field separator character in the directgory used"
92+
echo "--field_separ <char>: the field separator character in the directory used"
9593
echo " by --info_in_dir_name. Default is '_'"
9694
echo "--front_matter: Place system info in the results file"
9795
echo "--info_in_dir_name \"<dir> <fields>\": If directory contains info on test"
9896
echo " parameters, then we want to pull that info from the directory. Expected"
99-
echo " field seperator is '_'. Example"
97+
echo " field separator is '_'. Example"
10098
echo " dir=fio_ndisks_1_disksize_1.95_TiB_njobs_1_ioengine_libaio_iodepth_1_2024.08.23T11.38.53"
10199
echo " --info_in_dir_name \"\$dir 2,3 4,5,6 7,8 9,10\""
102100
echo "--meta_output <output>: String to place in meta section"
@@ -131,7 +129,7 @@ opts=$(getopt \
131129
-- "$@"
132130
)
133131

134-
eval set --$opts
132+
eval set -- "$opts"
135133
separ=""
136134

137135
while [[ $# -gt 0 ]]; do

0 commit comments

Comments
 (0)