intermediate_layer.py: ctags issue at Open CI
The TF-A Open CI is currently implementing code coverage per build and we are observing that some reports cannot be generated due to the issue shown below (full log attached). For a full list of test configurations tested, see #2600.
In order to reproduce the issue, one can use the zip attached, containing configuration file and binaries (elfs).archive.zip tf-a-build-ctag-issue.log
18:55:44 # ./branch_coverage.sh:134: main() - [4,0,0] python3 intermediate_layer.py --config-json /home/buildslave/workspace/lsandov1-tf-a-builder/config_file.json --local-workspace /home/buildslave/workspace/lsandov1-tf-a-builder/trusted-firmware-a
18:55:44 Generating intermediate json layer 'output_file.json'...
18:56:01 Warning:Function 'dead' not found in function list!!!
18:56:01 Warning:Function 'dead' not found in function list!!!
18:56:01 Warning:Function 'dcsw_loop_table' not found in function list!!!
18:56:01 Warning:Function 'loop3_isw' not found in function list!!!
18:56:01 Warning:Function 'loop2_cisw' not found in function list!!!
18:56:01 Warning:Function 'loop3_cisw' not found in function list!!!
18:56:01 Warning:Function 'loop2_csw' not found in function list!!!
18:56:01 Warning:Function 'loop3_csw' not found in function list!!!
18:56:01 Warning:Function 'exp_from_EL3' not found in function list!!!
18:56:01 Warning:Function 'interrupt_exit_irq_aarch64' not found in function list!!!
18:56:01 Warning:Function 'interrupt_exit_fiq_aarch64' not found in function list!!!
18:56:01 Warning:Function 'interrupt_exit_irq_aarch32' not found in function list!!!
18:56:01 Warning:Function 'interrupt_exit_fiq_aarch32' not found in function list!!!
18:56:01 Warning:Function 'stub_sel1_sctlr' not found in function list!!!
18:56:01 Warning:Function 'aarch32_stub' not found in function list!!!
18:56:01 Warning:Function 'workaround_not_sync' not found in function list!!!
18:56:01 Warning:Function 'bpiall_ret_fiq' not found in function list!!!
18:56:01 Warning:Function 'bpiall_ret_serror' not found in function list!!!
18:56:01 Warning:Function 'do_smc' not found in function list!!!
18:56:01 Warning:Function 'handle_sys_trap' not found in function list!!!
18:56:01 Warning:Function 'dead' not found in function list!!!
18:56:01 Warning:Function 'dcsw_loop_table' not found in function list!!!
18:56:01 Warning:Function 'loop3_isw' not found in function list!!!
18:56:01 Warning:Function 'loop2_cisw' not found in function list!!!
18:56:01 Warning:Function 'loop3_cisw' not found in function list!!!
18:56:01 Warning:Function 'loop2_csw' not found in function list!!!
18:56:01 Warning:Function 'loop3_csw' not found in function list!!!
18:56:01 Warning:Function 'dead' not found in function list!!!
18:56:01 Warning:Function 'unexpected_sync_exception' not found in function list!!!
18:56:01 Warning:Function 'smc_handler' not found in function list!!!
18:56:01 Traceback (most recent call last):
18:56:01 File "intermediate_layer.py", line 56, in os_command
18:56:01 command, stderr=subprocess.STDOUT, shell=True)
18:56:01 File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
18:56:01 **kwargs).stdout
18:56:01 File "/usr/lib/python3.6/subprocess.py", line 438, in run
18:56:01 output=stdout, stderr=stderr)
18:56:01 subprocess.CalledProcessError: Command 'ctags -x --c-kinds=f /* copy 16 bytes at a time */
18:56:01 m_loop16:
18:56:01 cmp x2, #16
18:56:01 3cec: f100405f cmp x2, #0x10
18:56:01 /home/buildslave/workspace/lsandov1-tf-a-builder/trusted-firmware-a/lib/aarch64/misc_helpers.S' returned non-zero exit status 126.
18:56:01
18:56:01 During handling of the above exception, another exception occurred:
18:56:01
18:56:01 Traceback (most recent call last):
18:56:01 File "intermediate_layer.py", line 648, in <module>
18:56:01 main()
18:56:01 File "intermediate_layer.py", line 639, in main
18:56:01 pp.process()
18:56:01 File "intermediate_layer.py", line 348, in process
18:56:01 self.dump_sources(elf_name, functions_list, prefix)
18:56:01 File "intermediate_layer.py", line 462, in dump_sources
18:56:01 statements_function_name)
18:56:01 File "intermediate_layer.py", line 286, in get_line_number
18:56:01 self.filenames[filename] = get_function_line_numbers(newp)
18:56:01 File "intermediate_layer.py", line 258, in get_function_line_numbers
18:56:01 "ctags -x --c-kinds=f {}".format(source_file)).split("\n")
18:56:01 File "intermediate_layer.py", line 60, in os_command
18:56:01 command, ex.output, ex.returncode))
18:56:01 Exception: Exception running command 'ctags -x --c-kinds=f /* copy 16 bytes at a time */
18:56:01 m_loop16:
18:56:01 cmp x2, #16
18:56:01 3cec: f100405f cmp x2, #0x10
18:56:01 /home/buildslave/workspace/lsandov1-tf-a-builder/trusted-firmware-a/lib/aarch64/misc_helpers.S': b'ctags: Warning: cannot open source file "copy" : No such file or directory\nctags: Warning: cannot open source file "16" : No such file or directory\nctags: Warning: cannot open source file "bytes" : No such file or directory\nctags: Warning: cannot open source file "at" : No such file or directory\nctags: Warning: cannot open source file "a" : No such file or directory\nctags: Warning: cannot open source file "time" : No such file or directory\nctags: Warning: cannot open source file "*/" : No such file or directory\n/bin/sh: 2: m_loop16:: not found\ncmp: x2,: No such file or directory\n/bin/sh: 4: 3cec:: not found\n/bin/sh: 5: /home/buildslave/workspace/lsandov1-tf-a-builder/trusted-firmware-a/lib/aarch64/misc_helpers.S: Permission denied\n'(126)
18:56:01 LAVA JOB RESULT: 1