Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Sample PR for Extended Version (#219)
Browse files Browse the repository at this point in the history
- A Sample PR to demonstrate how to extend versions in the scripts.
- Related Issue #208
  • Loading branch information
duttabhishek0 authored Apr 4, 2023
1 parent 270acbf commit 19b52a0
Show file tree
Hide file tree
Showing 20 changed files with 571 additions and 114 deletions.
64 changes: 39 additions & 25 deletions scripts/Extended Scripts/bluetooth.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ for ((i=3; i<=6; i++)); do
fi
done

ver_name="v5.1"
git checkout ${ver_name}
for string in ${myArray[@]}; do
if [ -n "$(git log --all --grep="$string")" ]; then
echo -e "\e[6;35m \n ${ver_name} \n \e[0m"
echo -e "\e[6;35m \n ${string} \n \e[0m"
git log --all --grep="$string"
else
echo -e "\e[6;35m \n ${ver_name} \n \e[0m"
echo "No such string exists in version ${ver_name} in the git log."
continue
fi
done

ver_name="v5.2-rc1"
git checkout ${ver_name}
for string in ${myArray[@]}; do
Expand All @@ -38,37 +52,37 @@ for string in ${myArray[@]}; do
echo "No such string exists in version v$i.0 in the git log."
continue
fi
done
done

cd ..

cd ~/kbd
git checkout 2.0.0
for string in ${myArray[@]}; do
if [ -n "$(git log --all --grep="$string")" ]; then
echo -e "\e[6;35m \n version 2.0.0 \n \e[0m"
echo -e "\e[6;35m \n ${string} \n \e[0m"
git log --all --grep="$string"
else
echo -e "\e[6;35m \n version 2.0.0 \n \e[0m"
echo "No such string exists in version 2.0.0 in the git log."
continue
fi
done
git checkout 2.0.0
for string in ${myArray[@]}; do
if [ -n "$(git log --all --grep="$string")" ]; then
echo -e "\e[6;35m \n version 2.0.0 \n \e[0m"
echo -e "\e[6;35m \n ${string} \n \e[0m"
git log --all --grep="$string"
else
echo -e "\e[6;35m \n version 2.0.0 \n \e[0m"
echo "No such string exists in version 2.0.0 in the git log."
continue
fi
done

cd ..

cd ~/archive

git checkout v1.0
for string in ${myArray[@]}; do
if [ -n "$(git log --all --grep="$string")" ]; then
echo -e "\e[6;35m \n v$i.0 \n \e[0m"
echo -e "\e[6;35m \n ${string} \n \e[0m"
git log --all --grep="$string"
else
echo -e "\e[6;35m \n v$i.0 \n \e[0m"
echo "No such string exists in version v$i.0 in the git log."
fi
done
git checkout v1.0

for string in ${myArray[@]}; do
if [ -n "$(git log --all --grep="$string")" ]; then
echo -e "\e[6;35m \n v$i.0 \n \e[0m"
echo -e "\e[6;35m \n ${string} \n \e[0m"
git log --all --grep="$string"
else
echo -e "\e[6;35m \n v$i.0 \n \e[0m"
echo "No such string exists in version v$i.0 in the git log."
fi
done
13 changes: 13 additions & 0 deletions scripts/Extended Scripts/buffer.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ for ((i=3; i<=6; i++)); do
done
done

# Extended Version
ver_name="v5.16-rc1"
git checkout ${ver_name}

Expand All @@ -76,4 +77,16 @@ for keyword in ${search_terms[@]}; do
else
echo "No such string '$keyword' exists in the git log."
fi
done

ver_name="v5.15-rc7"
git checkout ${ver_name}

for keyword in ${search_terms[@]}; do
if [ -n "$(git log --all --grep="${keyword}")" ];then
file_name="${keyword}_${ver_name}.txt"
git log --all --grep="$keyword" > ~/linux-kernel-research/linux-kernel-stats/data_dir/extended_scripts/buffer/$file_name
else
echo "No such string '$keyword' exists in the git log."
fi
done
18 changes: 15 additions & 3 deletions scripts/Extended Scripts/bus_protocols.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,23 @@ for ((i=3; i<=6; i++)); do
done
done

ver_name="v4.9-rc7"
git checkout ${ver_name}
ver_name1="v4.8-rc1"
git checkout ${ver_name1}

for term in "${search_terms[@]}"; do
filename="${ver_name}_$term.bus_protocols.txt"
filename="v${ver_name1}_$term.bus_protocols.txt"

if [ ! -f "../bp_gitlogs/$filename" ]; then
git log --all --grep="$term" > "../bp_gitlogs/$filename"
fi
#git log --all --grep="$term" > "../bp_gitlogs/v$i.0_$term.bus_protocols.txt"
done

ver_name2="v4.9-rc7"
git checkout ${ver_name2}

for term in "${search_terms[@]}"; do
filename="${ver_name2}_$term.bus_protocols.txt"

if [ ! -f "../bp_gitlogs/$filename" ]; then
git log --all --grep="$term" > "../bp_gitlogs/$filename"
Expand Down
12 changes: 9 additions & 3 deletions scripts/Extended Scripts/clock_support_configuration_git_log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,18 @@ cd $SRCDIR_3
declare -a all_versions=($(git tag -l | grep -E '.*\.0$' | sort -V))

# Version to be extended
ver_name="v4.14"
ver_name1="v4.14"
# Add the version to the array
all_versions+=("$ver_name")
all_versions+=("$ver_name1")

# Version to be extended
ver_name2="v4.16"
# Add the version to the array
all_versions+=("$ver_name2")

#total no. of versions
n=${#all_versions[@]}
n=${#all_versions[@]}


for ((i=n-1; i>=0; --i)); do
git checkout -fq ${all_versions[$i]}
Expand Down
46 changes: 41 additions & 5 deletions scripts/Extended Scripts/cpu_threshold.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,28 @@

cd ~/linux-stable/linux-stable

myArray=("idle_time" "get_cpu_idle_time_jiffy" "cpuidle" "CPUIdle" "cpuidle_state" "cpuidle_state_usage" "scaling_min_freq" "scaling_max_freq" "sched_load_balance" "*sched_load_balance" "*cfs_quota_us" "cfs_quota_us" "get_cpu_idle_time" "cpufreq" "MAX_CPUS_IN_ONE_REQ" "cpu_model" "cpufreq_sysfs_present" "alloc_cpu_set" "free__cpu_set" "create_cpu_map" "get_cpu_count" "cpu_threshhold")
myArray=(
"idle_time"
"get_cpu_idle_time_jiffy"
"cpuidle"
"CPUIdle"
"cpuidle_state"
"cpuidle_state_usage"
"scaling_min_freq"
"scaling_max_freq"
"*sched_load_balance"
"*cfs_quota_us"
"get_cpu_idle_time"
"cpufreq"
"MAX_CPUS_IN_ONE_REQ"
"cpu_model"
"cpufreq_sysfs_present"
"alloc_cpu_set"
"free__cpu_set"
"create_cpu_map"
"get_cpu_count"
"cpu_threshhold"
)

for ((i=3; i<=6; i++)); do
git checkout -fq v$i.0
Expand All @@ -26,6 +47,21 @@ for ((i=3; i<=6; i++)); do
fi
done

ver_name="v5.5-rc7"
git checkout ${ver_name}

for string in ${myArray[@]}; do
if [ -n "$(git log --all --grep="$string")" ]; then
echo -e "\e[6;35m \n ${ver_name} \n \e[0m"
echo -e "\e[6;35m \n ${string} \n \e[0m"
git log --all --grep="$string"
else
echo -e "\e[6;35m \n ${ver_name} \n \e[0m"
echo "No such string exists in version ${ver_name} in the git log."
continue
fi
done

ver_name="v5.10-rc7"
git checkout ${ver_name}

Expand All @@ -39,7 +75,7 @@ for string in ${myArray[@]}; do
echo "No such string exists in version $ver_name in the git log."
continue
fi
done
done

cd ..

Expand All @@ -65,12 +101,12 @@ cd ~/archive

for string in ${myArray[@]}; do
if [ -n "$(git log --all --grep="$string")" ]; then
echo -e "\e[6;35m \n v$i.0 \n \e[0m"
echo -e "\e[6;35m \n v1.0 \n \e[0m"
echo -e "\e[6;35m \n ${string} \n \e[0m"
git log --all --grep="$string"
else
echo -e "\e[6;35m \n v$i.0 \n \e[0m"
echo "No such string exists in version v$i.0 in the git log."
echo -e "\e[6;35m \n v1.0 \n \e[0m"
echo "No such string exists in version v1.0 in the git log."
continue
fi
done
Expand Down
55 changes: 48 additions & 7 deletions scripts/Extended Scripts/crypto.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,34 @@

cd ~/linux-stable/linux-stable

myArray=("AES" "3DES" "DES" "TDES" "SHA1" "SHA2" "MD5" "HMAC-SHA1" "SHA256" "HMAC-SHA256" "SHA224" "SHA384" "SHA512" "PAES" "ECDH" "CRC" "GHASH" "ablkcipher" "ahash" "aead" "*Triple DES*"
"*SHA1 digest algorithms*" "*SHA256 digest algorithms*" "*SHA384 digest algorithms*" "*SHA512 digest algorithms*" "GHASH digest algorithms")

myArray=(
"AES"
"3DES"
"DES"
"TDES"
"SHA1"
"SHA2"
"MD5"
"HMAC-SHA1"
"SHA256"
"HMAC-SHA256"
"SHA224"
"SHA384"
"SHA512"
"PAES"
"ECDH"
"CRC"
"GHASH"
"ablkcipher"
"ahash"
"aead"
"*Triple DES*"
"*SHA1 digest algorithms*"
"*SHA256 digest algorithms*"
"*SHA384 digest algorithms*"
"*SHA512 digest algorithms*"
"GHASH digest algorithms"
)
for ((i=3; i<=6; i++)); do
git checkout -fq v$i.0
if [[ $? -eq 0 ]]; then
Expand All @@ -27,6 +52,22 @@ for ((i=3; i<=6; i++)); do
fi
done


ver_name="v5.6-rc1"
git checkout ${ver_name}

for string in ${myArray[@]}; do
if [ -n "$(git log --all --grep="$string")" ]; then
echo -e "\e[6;35m \n ${ver_name} \n \e[0m"
echo -e "\e[6;35m \n ${string} \n \e[0m"
git log --all --grep="$string"
else
echo -e "\e[6;35m \n ${ver_name} \n \e[0m"
echo "No such string exists in version ${ver_name} in the git log."
continue
fi
done

ver_name="v5.11"
git checkout ${ver_name}

Expand All @@ -40,7 +81,7 @@ for string in ${myArray[@]}; do
echo "No such string exists in version $ver_name in the git log."
continue
fi
done
done

cd ..

Expand All @@ -65,12 +106,12 @@ cd ~/archive

for string in ${myArray[@]}; do
if [ -n "$(git log --all --grep="$string")" ]; then
echo -e "\e[6;35m \n v$i.0 \n \e[0m"
echo -e "\e[6;35m \n v1.0 \n \e[0m"
echo -e "\e[6;35m \n ${string} \n \e[0m"
git log --all --grep="$string"
else
echo -e "\e[6;35m \n v$i.0 \n \e[0m"
echo "No such string exists in version v$i.0 in the git log."
echo -e "\e[6;35m \n v1.0 \n \e[0m"
echo "No such string exists in version v1.0 in the git log."
continue
fi
done
Loading

0 comments on commit 19b52a0

Please sign in to comment.