From 6834fe1fdccbf7f32093e2b90f2ad04c2119f48c Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 12 Mar 2021 18:38:19 -0800 Subject: [PATCH 1/3] .github: remove workaround for out of date package index ... on Ubuntu VMs provided by github Signed-off-by: Marc Herbert --- .github/workflows/pull_request.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2453bc43..cd239de8 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -33,10 +33,6 @@ jobs: # :-( https://github.community/t/support-for-yaml-anchors/16128 - {uses: actions/checkout@v2, with: {fetch-depth: 0}} - uses: actions/setup-python@v2 - - name: temporary python3-pil HACK because github is out of date - run: sudo apt-get -y install libimagequant0 libwebpdemux2 && - wget http://security.ubuntu.com/ubuntu/ubuntu/pool/main/p/pillow/python3-pil_7.0.0-4ubuntu0.2_amd64.deb && - sudo dpkg -i python3-pil_*.deb - name: get python libs # FIXME: apt-get succeeds but 'import numpy' still fails!? run: sudo apt-get -y install python3-numpy python3-scipy pylint From d7db7c00c664574e8f872d4315b915199358da03 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 12 Mar 2021 18:28:09 -0800 Subject: [PATCH 2/3] check-sof-logger: fix some quoting and rephrase some errors Get the number of shellcheck warnings down a bit. Signed-off-by: Marc Herbert --- test-case/check-sof-logger.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test-case/check-sof-logger.sh b/test-case/check-sof-logger.sh index 5a9addfe..ecd0460c 100755 --- a/test-case/check-sof-logger.sh +++ b/test-case/check-sof-logger.sh @@ -65,7 +65,7 @@ func_logger_exit() } # check if we get any sof-logger errors -logger_err=`grep -i "error" $error_file` +logger_err=$(grep -i 'error' "$error_file") if [[ $logger_err ]]; then dloge "No available log to export due to sof-logger errors." func_logger_exit 1 'error' @@ -73,15 +73,16 @@ fi # '\.c\:[1-9]' to filter like '.c:6' this type keyword like: # [3017136.770833] (11.302083) c0 SA src/lib/agent.c:65 ERROR validate(), ll drift detected, delta = 25549 -fw_log_err=`grep -i "error" $data_file | grep -v '\.c\:[1-9]'` +fw_log_err=$(grep -i 'error' "$data_file" | grep -v '\.c\:[1-9]') + # '[[:blank:]]TIMESTAMP.*CONTENT$' to filter the log header: # TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT -if [[ ! $(sed -n '/[[:blank:]]TIMESTAMP.*CONTENT$/p' $data_file) ]]; then - dloge "No available log to export." +if [[ ! $(sed -n '/[[:blank:]]TIMESTAMP.*CONTENT$/p' "${data_file}") ]]; then + dloge "Log header not found in ${data_file}" func_logger_exit 1 # we catch error from fw log elif [[ $fw_log_err ]]; then - dloge "Errors in firmware log:" + dloge "Error(s) found in firmware log ${data_file}" func_logger_exit 1 fi From 54c4de05e6fd81d02e8198ce6cbb78fa91042c36 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 12 Mar 2021 18:31:03 -0800 Subject: [PATCH 3/3] check-sof-logger: fail when there's only the header Found by chance while testing Zephyr. Signed-off-by: Marc Herbert --- test-case/check-sof-logger.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test-case/check-sof-logger.sh b/test-case/check-sof-logger.sh index ecd0460c..df30235d 100755 --- a/test-case/check-sof-logger.sh +++ b/test-case/check-sof-logger.sh @@ -74,12 +74,16 @@ fi # '\.c\:[1-9]' to filter like '.c:6' this type keyword like: # [3017136.770833] (11.302083) c0 SA src/lib/agent.c:65 ERROR validate(), ll drift detected, delta = 25549 fw_log_err=$(grep -i 'error' "$data_file" | grep -v '\.c\:[1-9]') +data_len=$(wc -l < "${data_file}") # '[[:blank:]]TIMESTAMP.*CONTENT$' to filter the log header: # TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT if [[ ! $(sed -n '/[[:blank:]]TIMESTAMP.*CONTENT$/p' "${data_file}") ]]; then dloge "Log header not found in ${data_file}" func_logger_exit 1 +elif [[ "${data_len}" -lt 2 ]]; then + dloge "Nothing but the header in ${data_file}" + func_logger_exit 1 # we catch error from fw log elif [[ $fw_log_err ]]; then dloge "Error(s) found in firmware log ${data_file}"