Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e7157b6
Claude cleanup: Fix eval set --$opts to be eval set -- "$opts"
dvalinrh Nov 6, 2025
f3c8e4a
Replace field_seper with field_separator and fix issue claude found.
dvalinrh Nov 6, 2025
a1e552d
Claude: found issue with rm -rf, fixed.
dvalinrh Nov 6, 2025
0c1d181
Claude issue: Pointed out 3 variable locations that should be in qoutes.
dvalinrh Nov 6, 2025
d52172e
Claude Review: finish up remaining issues found by claude.
dvalinrh Nov 6, 2025
e593504
Do not modify lines that are comments (start with #)
dvalinrh Nov 6, 2025
02abcfa
Claude bugs: Fix issues pointed out by claude.
dvalinrh Nov 6, 2025
99d4093
Update usage value.
dvalinrh Nov 6, 2025
91fc24f
Calude updates: Correct issues claude pointed out in create_filesystem
dvalinrh Nov 6, 2025
af6443e
Remove space in mount line.
dvalinrh Nov 6, 2025
80c3bfc
Claude: clear out issues pointed out by claude.
dvalinrh Nov 6, 2025
e9943ee
Claude: Fix issues uncovered when claude was asked to find bugs in
dvalinrh Nov 6, 2025
26d6a44
Claude: Fix bug claude found when asked to look for bugs.
dvalinrh Nov 6, 2025
9e4131b
Claude review: Clean up issues claude found when asked to look for bugs.
dvalinrh Nov 6, 2025
f715512
Claude review: Clean up bugs found when asked to review code.
dvalinrh Nov 6, 2025
670747c
Claude review: Fix issues that claude found when asked to look for
dvalinrh Nov 6, 2025
68081e3
Calude review: Update invoke_test with issues reported by claude.
dvalinrh Nov 7, 2025
6e82acb
Claude review udates: Make updates based on on asking claude to find
dvalinrh Nov 7, 2025
bcabe4f
Claude review: Make suggested updates from asking claude to find bugs.
dvalinrh Nov 7, 2025
9e69d4f
Claude review: Fix issues in package_tool that claude reported when
dvalinrh Nov 7, 2025
57989ca
Claude review: Updates for code issues claude found when asked to look
dvalinrh Nov 7, 2025
3c737f2
Claude review: Fix issues in test_header_info that claude uncovered.
dvalinrh Nov 7, 2025
2c5108e
Claude review: umount_filesystems, clean out bugs claude pointed to.
dvalinrh Nov 7, 2025
d0c8cba
Add back in delete code.
dvalinrh Nov 7, 2025
561d5fc
Fix misspelling of remove
dvalinrh Nov 11, 2025
6dbd9ac
Code review updates.
dvalinrh Nov 12, 2025
9cfb72a
Merge branch 'main' into claude_test_tools_wrappers
dvalinrh Nov 17, 2025
7706ba5
Remove dup line
dvalinrh Nov 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions convert_csv_to_txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@

usage()
{
echo Usage $0
echo " --field_seper <char>: character separator"
echo " --field_separator <char>: character separator, default is :"
echo " --field_size <n>: size of the fields in the output"
echo " --results_in <file>: file converting"
echo " --results_out <file>: file to output the results to."
Expand All @@ -30,7 +29,7 @@ usage()


ARGUMENT_LIST=(
"field_seper"
"field_separator"
"field_size"
"results_in"
"results_out"
Expand All @@ -53,17 +52,17 @@ if [ $? -ne 0 ]; then
exit
fi

eval set --$opts
eval set -- "$opts"

field_seper=""
field_separator=":"
field_size=""
results_in=""
results_out=""

while [[ $# -gt 0 ]]; do
case "$1" in
--field_seper)
field_seper=$2
--field_separator)
field_separator=$2
shift 2
;;
--field_size)
Expand All @@ -82,7 +81,7 @@ while [[ $# -gt 0 ]]; do
usage
;;
-h)
usage "0"
usage
shift 1
;;
--)
Expand All @@ -95,16 +94,23 @@ while [[ $# -gt 0 ]]; do
esac
done

rm -rf $results_out
if [[ $field_size == "" ]] || [[ $results_in == "" ]] || [[ $results_out == "" ]]; then
echo Error: one or more fields are not set, field_size, results_in or results_out.
exit 1
fi
if [[ $results_out -ne "" ]]; then
rm -rf $results_out
fi
while IFS= read -r line
do
if [[ $line != *":"* ]]; then
if [[ "$line" == "#"* ]] || [[ "$line" != *"${field_separator}"* ]]; then
echo $line >> $results_out
continue
fi
break_down=`echo $line | sed "s/ /_/g" | sed "s/${field_seper}/ /g"`
break_down=`echo "$line" | sed "s/ /_/g" | sed "s/${field_separator}/ /g"`
for i in $break_down; do
printf "%${field_size}s" $i >> $results_out
printf "%${field_size}s" "$i" >> $results_out
done
printf "\n" >> $results_out
done < "$results_in"
exit 0
6 changes: 3 additions & 3 deletions convert_val
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ usage()
echo "$ $1 --from_unit Mi --value 1024 --to_unit Gi"
echo "1Gi"
echo "$ $1 --from_unit Mi"
echo "1000000B"
echo "1048576B"
echo "$ $1 --time_val --from_unit s --value 10 --to_unit ms"
echo "10000ms"
echo "$ $1 --time_val --from_unit s --value 60 --to_unit m"
Expand Down Expand Up @@ -79,7 +79,7 @@ opts=$(getopt \
-- "$@"
)

eval set --$opts
eval set -- "$opts"

if [ $? -ne 0 ]; then
exit 1
Expand Down Expand Up @@ -150,7 +150,7 @@ cnvt_to_bytes()
if [[ $lunit == "B" ]] || [[ $lunit == "b" ]]; then
base_value=1
else
if [[ $lunit =~ [K,M,G,T] ]] && [[ $lunit != *"i"* ]]; then
if [[ $lunit =~ [KMGT] ]] && [[ $lunit != *"i"* ]]; then
base_value=`numfmt --from=si 1${lunit}`
if [[ $? -ne 0 ]]; then
echo Error: Invalid unit $lunit
Expand Down
12 changes: 6 additions & 6 deletions create_filesystem
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ validate_data()
echo Designated device, $device_to_use, does not exist
exit 1
fi
if [[ mount_pnt = "" ]]; then
if [[ $mount_pnt = "" ]]; then
echo You need to designate a mount point.
exit 1
fi
if [[ fs_type = "" ]]; then
if [[ $fs_type = "" ]]; then
echo You need to designate a filesys type.
exit 1
fi
Expand Down Expand Up @@ -79,7 +79,7 @@ opts=$(getopt \
if [ $? -ne 0 ]; then
exit
fi
eval set --$opts
eval set -- "$opts"

while [[ $# -gt 0 ]]; do
case "$1" in
Expand All @@ -93,7 +93,7 @@ while [[ $# -gt 0 ]]; do
;;
--mount_dir)
mount_pnt=${2}
mkdir -p $mount_pnt
mkdir -p "$mount_pnt"
shift 2
;;
--usage)
Expand Down Expand Up @@ -134,7 +134,7 @@ case $fs_type in
MKFS_OPS="-f"
;;
*)
echo Error, $1 unknown filesystem type
echo Error, $fs_type unknown filesystem type
exit 1
;;
esac
Expand All @@ -143,7 +143,7 @@ mkfs -t ${fs_type} ${MKFS_OPS} ${device_to_use}
if [ $? -ne 0 ]; then
exit 1
fi
mount ${device_to_use} ${mount_pnt}
mount ${device_to_use} "${mount_pnt}"
if [ $? -ne 0 ]; then
exit 1
fi
Expand Down
8 changes: 4 additions & 4 deletions detect_numa
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fetch_cpus() {
local node_count=`get_num_nodes`
local prefix="NUMA node"

if [ `has_numa` -eq 0 ]; then # Return all syste
if [ `has_numa` -eq 0 ]; then # Return all system CPUs.
prefix="On-line CPU\(s\) list:"
node=""
elif [ -z "$node" ]; then # Used to filter out "NUMA node(s)" line
Expand Down Expand Up @@ -112,7 +112,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

eval set --$opts
eval set -- "$opts"

while [[ $# -gt 0 ]]; do
case "$1" in
Expand All @@ -127,7 +127,7 @@ while [[ $# -gt 0 ]]; do
get_cpus=1
shift 1
;;
-n | --node-count)
--node-count)
get_nodes=1
shift 1
;;
Expand All @@ -143,7 +143,7 @@ while [[ $# -gt 0 ]]; do
break
;;
*)
echo_stderr Unknown option $1
echo Unknown option $1 >&2
exit 1
;;
esac
Expand Down
3 changes: 1 addition & 2 deletions detect_os
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ echo_stderr()
parse_os_release()
{
source $os_release_file
has_major_minor=0
if [[ $get_version -eq 1 ]]; then
if [[ "$VERSION_ID" == *"${vers_sep}"* ]]; then
major_version=$(echo $VERSION_ID | cut -d${vers_sep} -f1)
Expand Down Expand Up @@ -105,7 +104,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

eval set --$opts
eval set -- "$opts"

flag_set=0

Expand Down
2 changes: 1 addition & 1 deletion gather_data
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ echo ==============================================
echo General information
echo ==============================================
echo system name: `hostname`
echo release: `cat /etc/*release | grep PRETTY_NAME | cut -d'"' -f 2`a `uname -a | cut -d ' ' -f 3`
echo release: `grep PRETTY_NAME /etc/*release | cut -d'"' -f 2`
#
# Hardware information
#
Expand Down
7 changes: 6 additions & 1 deletion general_setup
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ gs_usage_info()

to_test_verify_file=""
to_sys_type=`hostname`
to_sys_env="local"
to_configuration=`hostname`
to_home_root=`echo $HOME | rev | cut -d'/' -f 2- | rev`
if [[ $to_home_root == "" ]]; then
Expand Down Expand Up @@ -108,6 +109,7 @@ do
--sys_type)
i=$((i + 2))
to_sys_type=$value
to_sys_env=$value
shift 2
;;
--home_parent)
Expand All @@ -126,10 +128,12 @@ do
shift 2
;;
--iteration_default)
i=$((i + 2))
iteration_default=$value
shift 2
;;
--no_pkg_install)
i=$((i + 1))
to_no_pkg_install=1
shift 1
;;
Expand Down Expand Up @@ -218,6 +222,7 @@ do
;;
esac
done
export to_sys_env
if [[ ! -d $TOOLS_BIN ]]; then
TOOLS_BIN=${to_home_root}/${to_user}/test_tools
fi
Expand All @@ -235,7 +240,7 @@ which tuned-adm >> /dev/null 2>&1
if [[ $? -ne 0 ]]; then
echo tuned-adm not available > ~/tuned_before
else
tuned-adm active | cut -d: -f 2 | sed "s/ //g" > ~/tuned_before
tuned-adm active | cut -d: -f 2 | sed "s/ //g" > ~/tuned_before
fi

if [[ $to_test_verify_file != "" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions generate_intervals
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

eval set --$opts
eval set -- "$opts"

while [[ $# -gt 0 ]]; do
case "$1" in
Expand Down Expand Up @@ -102,7 +102,7 @@ if [[ $interval -gt $max_value ]]; then
fi

#
# If only one interval requested, it is 1,$max_valuem
# If only one interval requested, it is 1,$max_value
# else calculate the intervals.
#
if [[ $interval -ne 1 ]]; then
Expand Down
15 changes: 8 additions & 7 deletions grab_disks
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ disks_passed=$1
disks=""
numb_disks=0

seper=""
separator=""

build_disks_list()
{
disk_list=`echo $1 | sed 's/,/ /g'`
for i in $disk_list; do
let "numb_disks=$numb_disks + 1"
if [[ $i == "/dev/"* ]]; then
disks=${disks}${seper}${i}
disks=${disks}${separator}${i}
else
disks=${disks}${seper}/dev/${i}
disks=${disks}${separator}/dev/${i}
fi
seper=" "
separator=" "
done
}

Expand All @@ -45,7 +45,6 @@ grab_disks()
ALLSTG=$(mktemp /tmp/allstgdsk.XXXXX)
USEDDSK=$(mktemp /tmp/useddsk.XXXXX)
ALLDSK=$(mktemp /tmp/alldsk.XXXXX)
MNTDDSK=$(mktemp /tmp/mntddsk.XXXXX)
lsblk -l > ${ALLSTG}
rootdisk=$(grep -e "part /$" -e boot$ ${ALLSTG} | awk '{print $1}')

Expand All @@ -57,20 +56,22 @@ grab_disks()
#
# Now the mounted disks
#
for i in `df | grep /dev | cut -d' ' -f1 | grep /`
for i in `df --output=source | grep /dev`
do
echo ${i##*/} >> $USEDDSK
done

grep disk ${ALLSTG} | awk '{print $1}' | sort | uniq > ${ALLDSK}
disks_temp=`echo $(grep -F -x -v -f ${USEDDSK} ${ALLDSK})`
echo "$disks_temp" | awk '{ for (i=NF; i > 1; i--) printf("%s ",$i); print $1; }' > disks
rm -f $ALLSTG $USEDDSK $ALLDSK
fi
build_disks_list "`cat disks`"
rm -f disks
}

if [[ $disks_passed == *"none"* ]]; then
if [[ $sys_type == "local" ]]; then
if [[ $to_sys_env == "local" ]]; then
echo Unable to continue. non cloud systems require a disk to be designated.
exit 1
fi
Expand Down
13 changes: 11 additions & 2 deletions invoke_test
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
#


usage()
{
echo Usage ${1}:
echo "--command <string>: Command executing."
echo "--options <strings>: Options we are to past to the command."
echo "--test_name <string>: name of test executing."
exit 0
}

ARGUMENT_LIST=(
"command"
"options"
Expand All @@ -39,7 +48,7 @@ if [ $? -ne 0 ]; then
usage $0
fi

eval set --$opts
eval set -- "$opts"

command=""
options=""
Expand Down Expand Up @@ -93,7 +102,7 @@ if [ $tuned_active -eq 1 ]; then
if [ $? -eq 0 ]; then
echo "Warning: Tuned was active now it isn't, restarting tuned" >> /tmp/${test_name}_tuned.status
systemctl enable --now tuned
tuned-adm profile $start_active
tuned-adm profile $start_active_tuned
fi
fi

Expand Down
Loading