Skip to content

Commit

Permalink
stats/kernel_selftests: the output format has changed
Browse files Browse the repository at this point in the history
---------------
rongc@inn➜  grep mount /result/kernel_selftests/kselftests-02/vm-lkp-nex04-4G/debian-x86_64-2018-04-03.cgz/x86_64-rhel-7.2/gcc-7/ce397d215ccd07b8ae3f71db689aedb85d56ab40/3/kernel_selftests.json

  "kernel_selftests.mount.run_tests.sh.pass": [
---------------

Signed-off-by: Chen Rong <[email protected]>

Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
xilabao authored and rli9 committed Jun 20, 2018
1 parent 50c0517 commit b982735
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions stats/kernel_selftests
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ end

def memory_hotplug_stat(line, memory_hotplug, stats)
case line
when /^\.\/(.+\.sh).+selftests: memory-hotplug/
when /selftests: memory-hotplug: (.+\.sh)/
memory_hotplug['subtest'] = $1
when /^*selftests: memory-hotplug \[FAIL\]/
stats << "memory-hotplug.#{memory_hotplug['subtest']}.fail: 1"
Expand All @@ -43,26 +43,11 @@ def memory_hotplug_stat(line, memory_hotplug, stats)
end
end

def mount_stat(line, mount, stats)
case line
when %r{if .* then ./(.*) ; else echo}
mount['subtest'] = $1
when /^WARN\: No \/proc\/self\/uid_map exist, test skipped/
stats << "mount.#{mount['subtest']}.skip: 1"
mount['subtest'] = nil
when /(^(MS.+|Default.+) malfunctions$)|(^Mount flags unexpectedly changed after remount$)/
stats << "mount.#{mount['subtest']}.fail: 1"
mount['subtest'] = nil
when %r{make: Leaving directory .*/(.*)'}
stats << "mount.#{mount['subtest']}.pass: 1" if mount['subtest']
end
end

def x86_stat(line, _x86, stats)
case line
when /can not run MPX tests/
@pmx = 'skip'
when /^*selftests: (.*) .*(PASS|FAIL)/
when /^*selftests: x86: (.*) .*(PASS|FAIL)/
test_name = $1.strip
result = $2
if test_name =~ /mpx-mini-test/ && @pmx
Expand Down Expand Up @@ -93,13 +78,11 @@ while (line = STDIN.gets)
when %r{make: Leaving directory .*/(.*)'}
if testname == 'memory-hotplug'
memory_hotplug_stat(line, tests_stats['memory-hotplug'], stats)
elsif testname == 'mount'
mount_stat(line, tests_stats['mount'], stats)
else
# rli9 FIXME: consider the input has messed text like Entering doesn't match with Leaving
testname = nil
end
when /^*selftests: (.*) .*(\[|\[ )(PASS|FAIL)/
when /^*selftests: .*: (.*) .*(\[|\[ )(PASS|FAIL)/
if testname == 'futex'
futex_stat(line, tests_stats['futex'], stats)
elsif testname == 'memory-hotplug'
Expand Down Expand Up @@ -128,8 +111,6 @@ while (line = STDIN.gets)
futex_stat(line, tests_stats['futex'], stats)
elsif testname == 'memory-hotplug'
memory_hotplug_stat(line, tests_stats['memory-hotplug'], stats)
elsif testname == 'mount'
mount_stat(line, tests_stats['mount'], stats)
elsif testname == 'x86'
x86_stat(line, tests_stats['x86'], stats)
elsif testname == 'vm'
Expand Down

0 comments on commit b982735

Please sign in to comment.