[PATCH lkp-tests] lib/job.rb: donot add nil value to pp

if program_name is nil, then donot add it to pp Signed-off-by: Wei Jihui <weijihuiall@163.com> --- lib/job.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/job.rb b/lib/job.rb index f91686b5..8a6d68a5 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -574,6 +574,8 @@ class Job end options_hash = @referenced_programs[p_n] program_name = hash_key_re_string(h, p_n, @job['pp'].keys) + next if program_name.nil? + @job["pp"][program_name] = Hash.new() options_array = options_hash.keys options_array.each do |option| -- 2.23.0

"donot" is not a valid word. => don't or "do not" Thanks, Fengguang On Thu, Oct 15, 2020 at 02:41:37PM +0800, Wei Jihui wrote:
if program_name is nil, then donot add it to pp
Signed-off-by: Wei Jihui <weijihuiall@163.com> --- lib/job.rb | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/lib/job.rb b/lib/job.rb index f91686b5..8a6d68a5 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -574,6 +574,8 @@ class Job end options_hash = @referenced_programs[p_n] program_name = hash_key_re_string(h, p_n, @job['pp'].keys) + next if program_name.nil? + @job["pp"][program_name] = Hash.new() options_array = options_hash.keys options_array.each do |option| -- 2.23.0

Fixed and applied. On Thu, Oct 15, 2020 at 03:08:49PM +0800, Wu Fengguang wrote:
"donot" is not a valid word. => don't or "do not"
Thanks, Fengguang
On Thu, Oct 15, 2020 at 02:41:37PM +0800, Wei Jihui wrote:
if program_name is nil, then donot add it to pp
Signed-off-by: Wei Jihui <weijihuiall@163.com> --- lib/job.rb | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/lib/job.rb b/lib/job.rb index f91686b5..8a6d68a5 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -574,6 +574,8 @@ class Job end options_hash = @referenced_programs[p_n] program_name = hash_key_re_string(h, p_n, @job['pp'].keys) + next if program_name.nil? + @job["pp"][program_name] = Hash.new() options_array = options_hash.keys options_array.each do |option| -- 2.23.0
participants (2)
-
Wei Jihui
-
Wu Fengguang