diff options
author | Lakshmipathi <lakshmipathi.ganapathi@collabora.com> | 2021-01-05 18:31:05 +0530 |
---|---|---|
committer | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2022-12-12 17:57:12 +0200 |
commit | 2b1fa149006ad584098c94d4ef600512b0506858 (patch) | |
tree | 47143afb4fdd4ff02f93c20c695e76d6f1e4d94b /kernel_test.sh | |
parent | 830b3c68c1fb1e9176028d02ef86f3cf76aa2476 (diff) | |
download | linux-2b1fa149006ad584098c94d4ef600512b0506858.tar.gz |
gitlabci: Enable GitLabCI jobs
Signed-off-by: Lakshmipathi <lakshmipathi.ganapathi@collabora.com>
Diffstat (limited to 'kernel_test.sh')
-rw-r--r-- | kernel_test.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/kernel_test.sh b/kernel_test.sh new file mode 100644 index 000000000000..50d09f16ac75 --- /dev/null +++ b/kernel_test.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +start_test() { +echo -e "\t\t\t\t Starting futex Tests" +cd /mnt/ && make -C tools/testing/selftests TARGETS=futex +cd /mnt/tools/testing/selftests/futex/ && ./run.sh +echo -e "\t\t\t\t Completed futex Tests" +echo "========================================================================" +echo -e "\t\t\t\t Starting syscall_user_dispatch:sud_test Tests" +cd /mnt/ && make -C tools/testing/selftests TARGETS=syscall_user_dispatch +cd /mnt/tools/testing/selftests/syscall_user_dispatch && ./sud_test +echo -e "\t\t\t\t Completed syscall_user_dispatch:sud_test Tests" +echo "========================================================================" +echo -e "\t\t\t\t Starting syscall_user_dispatch:sud_benchmark Tests" +./sud_benchmark +echo -e "\t\t\t\t Completed syscall_user_dispatch:sud_benchmark Tests" +echo "========================================================================" +} + +start_test 2>&1 | tee -a /mnt/kernel_results.log + +# Check Interception overhead +MAX_OVERHEAD="10.00" +found_text=$(grep "Interception" /mnt/kernel_results.log) +result=$(echo $found_text | grep -Eo '[0-9]+([.][0-9]+)') +min=$(echo $result $MAX_OVERHEAD | awk '{if ($1 < $2) print "ok"; else print "not_ok"}') +if [ $min == "not_ok" ]; then +echo "Interception overhead greater than 10%" > /mnt/fail.txt +fi + +# Parse result file for fail value +grep -q "fail:[1-9]" /mnt/kernel_results.log +ret=$? +if [ $ret -ne 0 ]; +then + touch /mnt/pass.txt + sync +else + touch /mnt/fail.txt + sync +fi +poweroff |