[why] it has a warn when submit job: WARN -- skip non-executable */lkp-tests/monitors/plain/wait
[how] lkp-tests/monitors/plain/wait is link to bin/event/wakeup but bin/event/wakeup does not exist. so we will do not check link file when it real file is not exist.
Signed-off-by: Wei Jihui weijihuiall@163.com --- lib/job.rb | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/lib/job.rb b/lib/job.rb index 8d1f7469..f9e244a9 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -115,6 +115,11 @@ def __create_programs_hash(glob, lkp_src) next if path =~ /.[0-9]+$/
unless File.executable?(path) + if File.symlink?(path) + real_path = File.readlink(path) + real_path = File.join(File.dirname(path), real_path) if real_path =~ /^..|^\w/ + next unless File.exist?(real_path) + end log_warn "skip non-executable #{path}" unless path =~ /.cr$/ next end