[input] fs: ext4
[error] this fs will parse error by lkp-tests/params/fs fs: fs: &1 fs: ext4
[why] job.rb will parse fs twice by lkp-test/params/fs: /(.*)/{ fs: $1} this will create two fs.
[how] only parse all parameters once, that is only exec expand_params once. not at the first time is for job should split array params at the first time.
Signed-off-by: Wei Jihui weijihuiall@163.com --- lib/job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/job.rb b/lib/job.rb index eacb7ec9..7fc7cb5b 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -447,7 +447,7 @@ class Job job = deepcopy(@job) job['___'] = nil @jobx = job - if @job.include?(:expand_params) + if @job.include?(:expand_params) && !first_time expand_params @job = deepcopy(@jobx) @job.delete('___')
Jihui,
job相关操作的spec测试可以继续扩充。 lib/job.rb 的修改,只有较好的测试覆盖才会让人安心。
Thanks, Fengguang
On Sat, Feb 20, 2021 at 08:26:03PM +0800, Wei Jihui wrote:
[input] fs: ext4
[error] this fs will parse error by lkp-tests/params/fs fs: fs: &1 fs: ext4
[why] job.rb will parse fs twice by lkp-test/params/fs: /(.*)/{ fs: $1} this will create two fs.
[how] only parse all parameters once, that is only exec expand_params once. not at the first time is for job should split array params at the first time.
Signed-off-by: Wei Jihui weijihuiall@163.com
lib/job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/job.rb b/lib/job.rb index eacb7ec9..7fc7cb5b 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -447,7 +447,7 @@ class Job job = deepcopy(@job) job['___'] = nil @jobx = job
- if @job.include?(:expand_params)
- if @job.include?(:expand_params) && !first_time expand_params @job = deepcopy(@jobx) @job.delete('___')
-- 2.23.0