summaryrefslogtreecommitdiff
path: root/tools/igt_compliance_utils.c
AgeCommit message (Collapse)Author
2021-04-09tools: Fix running intel_dp_compliance if it is found in the search ↵Khaled Almahallawy
path($PATH env variable) When intel_dp_compliance binary location is part of PATH environment variable, running it from the shell without relative or full path, cause the following assertion failure because chdir: $:~# intel_dp_compliance (intel_dp_compliance:3070) CRITICAL: Test assertion failure function enter_exec_path, file ../tools/igt_compliance_utils.c:56: (intel_dp_compliance:3070) CRITICAL: Failed assertion: ret == 0 (intel_dp_compliance:3070) CRITICAL: Last errno: 2, No such file or directory (intel_dp_compliance:3070) CRITICAL: error: -1 != 0 Stack trace: #0 ../lib/igt_core.c:1726 __igt_fail_assert() #1 [enter_exec_path+0x8b] #2 ../tools/intel_dp_compliance.c:843 main() #3 ../csu/libc-start.c:342 __libc_start_main() #4 [_start+0x2e] Test (null) failed. **** DEBUG **** (intel_dp_compliance:3070) CRITICAL: Test assertion failure function enter_exec_path, file ../tools/igt_compliance_utils.c:56: (intel_dp_compliance:3070) CRITICAL: Failed assertion: ret == 0 (intel_dp_compliance:3070) CRITICAL: Last errno: 2, No such file or directory (intel_dp_compliance:3070) CRITICAL: error: -1 != 0 (intel_dp_compliance:3070) igt_core-INFO: Stack trace: (intel_dp_compliance:3070) igt_core-INFO: #0 ../lib/igt_core.c:1726 __igt_fail_assert() (intel_dp_compliance:3070) igt_core-INFO: #1 [enter_exec_path+0x8b] (intel_dp_compliance:3070) igt_core-INFO: #2 ../tools/intel_dp_compliance.c:843 main() (intel_dp_compliance:3070) igt_core-INFO: #3 ../csu/libc-start.c:342 __libc_start_main() (intel_dp_compliance:3070) igt_core-INFO: #4 [_start+0x2e] **** END **** FAIL (-1.000s) This patch fixes this issue. v2: (PATH_MAX - 1) and dirname (Petri) Signed-off-by: Khaled Almahallawy <khaled.almahallawy@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
2020-09-16tools: move terminal utility functions to a separate fileAbhinav Kumar
Move the terminal utility functions to a separate file so that other modules can use it as well. Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org> Reviewed-by: Petri Latvala <petri.latvala@intel.com>