Skip to content

Commit

Permalink
lib/result.rb: remove deprecated build-* jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Li <philip.li@intel.com>
  • Loading branch information
rli9 committed Jul 29, 2024
1 parent caea1b1 commit 191f794
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 256 deletions.
1 change: 0 additions & 1 deletion etc/failure
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dmesg.*
kmemleak\..+unreferenced_object\..+
kmsg.*
last_state.*
lkp-bug.*
locktoture\..+lock_hotplug
rcutoture\..+rcu_hotplug
stderr.*
Expand Down
5 changes: 0 additions & 5 deletions etc/stat-denylist
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ Spectre_v2_mitigation
^boot-slabinfo\.
^boot-time\.
^buddyinfo\.
^build-.+\.dmesg\.
^build-.+\.kmsg\.
^build-.+\.stderr\.
^build-.+\.time\.
^build-0day-crosstools\.
^cpuidle\.
^diskstats\.
^dmesg\.(E|R)IP:acpi_safe_halt
Expand Down
15 changes: 0 additions & 15 deletions jobs/build-ceph.yaml

This file was deleted.

11 changes: 1 addition & 10 deletions lib/result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,9 @@ class ResultPath < Hash
'default' => %w[path_params tbox_group rootfs kconfig compiler commit run],
'kvm:default' => %w[path_params tbox_group rootfs kconfig compiler commit run],
'health-stats' => %w[path_params run],
'lkp-bug' => %w[path_params run],
'hwinfo' => %w[tbox_group run],
'build-dpdk' => %w[rootfs dpdk_config commit dpdk_compiler dpdk_commit run],
'build-qemu' => %w[rootfs qemu_config qemu_commit run],
'build-llvm_project' => %w[rootfs llvm_project_commit run],
'deploy-clang' => %w[rootfs llvm_project_commit run],
'build-nvml' => %w[rootfs nvml_commit run],
'build-ltp' => %w[rootfs ltp_commit run],
'build-acpica' => %w[acpica_commit test run],
'build-ceph' => %w[ceph_commit run],
'kvm-kernel-boot-test' => %w[tbox_group kconfig commit qemu_config qemu_commit linux_commit run],
'build-perf_test' => %w[perf_test_commit run]
'kvm-kernel-boot-test' => %w[tbox_group kconfig commit qemu_config qemu_commit linux_commit run]
}.freeze

def path_scheme
Expand Down
10 changes: 5 additions & 5 deletions lib/stats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ class LinuxTestcasesTableSet
leaking-addresses locktorture ltp mce-test otc_ddt piglit pm-qa nvml
qemu rcuscale rcutorture suspend suspend-stress trinity ndctl nfs-test hwsim
idle-inject mdadm-selftests nvml test-bpf mce-log perf-sanity-tests
build-perf_test update-ucode reboot cat libhugetlbfs-test ocfs2test
update-ucode reboot cat libhugetlbfs-test ocfs2test
perf-test fxmark kvm-kernel-boot-test bkc_ddt rdma-pyverbs
xfstests packetdrill avocado v4l2 vmem perf-stat-tests cgroup2-test].freeze
OTHER_TESTCASES =
%w[build-dpdk build-nvml build-qemu convert-lkpdoc-to-html convert-lkpdoc-to-html-css rsync-rootfs
%w[convert-lkpdoc-to-html convert-lkpdoc-to-html-css rsync-rootfs
health-stats hwinfo ipmi-setup debug
lkp-bug lkp-install-run lkp-services lkp-src pack lkp-qemu
pack-deps makepkg makepkg-deps borrow dpdk-dts mbtest build-acpica build-ltp
bust-shm-exit build-llvm_project upgrade-trinity build-0day-crosstools deploy-clang kmemleak-test kunit].freeze
lkp-install-run lkp-services lkp-src pack lkp-qemu
pack-deps makepkg makepkg-deps borrow dpdk-dts mbtest
bust-shm-exit upgrade-trinity deploy-clang kmemleak-test kunit].freeze
end

def functional_test?(testcase)
Expand Down
221 changes: 1 addition & 220 deletions spec/result_path_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,55 +31,6 @@
end
end

context 'handles build-qemu path' do
context 'when valid result root' do
it 'succesds' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-qemu/clear-x86_64-ota-25590-20181018.cgz/x86_64-softmmu/a58047f7fbb055677e45c9a7d65ba40fbfad4b92/2")).to be true
expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-qemu/debian-x86_64-20180403.cgz/x86_64-softmmu/a58047f7fbb055677e45c9a7d65ba40fbfad4b92/")).to be true
expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-qemu/debian-x86_64-20180403.cgz/x86_64-softmmu/a58047f7fbb055677e45c9a7d65ba40fbfad4b92")).to be true
expect(result_path['testcase']).to eq 'build-qemu'
expect(result_path['rootfs']).to eq 'debian-x86_64-20180403.cgz'
expect(result_path['qemu_config']).to eq 'x86_64-softmmu'
expect(result_path['qemu_commit']).to eq 'a58047f7fbb055677e45c9a7d65ba40fbfad4b92'
end
end
context 'when invalid result root' do
it 'fails' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-qemu/a58047f7fbb055677e45c9a7d65ba40fbfad4b92/")).to be false
end
end
end

context 'handles build-dpdk path' do
context 'when valid result root' do
it 'succesds' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-dpdk/dpdk-rootfs/x86_64-native-linuxapp-gcc/0f57d86787d8b1076ea8f9cbdddda2a46d534a27/gcc-4.9/60c5c5692107abf4157d48493aa2dec01f6b97cc/0")).to be true
expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-dpdk/dpdk-rootfs/x86_64-native-linuxapp-gcc/0f57d86787d8b1076ea8f9cbdddda2a46d534a27/gcc-4.9/60c5c5692107abf4157d48493aa2dec01f6b97cc/")).to be true
expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-dpdk/dpdk-rootfs/x86_64-native-linuxapp-gcc/0f57d86787d8b1076ea8f9cbdddda2a46d534a27/gcc-4.9/60c5c5692107abf4157d48493aa2dec01f6b97cc")).to be true
expect(result_path['testcase']).to eq 'build-dpdk'
expect(result_path['rootfs']).to eq 'dpdk-rootfs'
expect(result_path['dpdk_config']).to eq 'x86_64-native-linuxapp-gcc'
expect(result_path['dpdk_compiler']).to eq 'gcc-4.9'
expect(result_path['dpdk_commit']).to eq '60c5c5692107abf4157d48493aa2dec01f6b97cc'
end
end
context 'when invalid result root' do
it 'fails' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-dpdk/0f57d86787d8b1076ea8f9cbdddda2a46d534a27/x86_64-native-linuxapp-gcc/gcc-4.9/60c5c5692107abf4157d48493aa2dec01f6b97cc")).to be false
expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-dpdk/x86_64-native-linuxapp-gcc/gcc/60c5c5692107abf4157d48493aa2dec01f6b97cc")).to be false
expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-dpdk/x86_64-native-linuxapp-gcc/gcc/60c5c5692107abf4157d48493aa2dec01f6b97cc/0")).to be false
end
end
end

context 'handles kvm:default path' do
context 'when valid result root' do
it 'succesds' do
Expand All @@ -95,6 +46,7 @@
expect(result_path['commit']).to eq '7472c4028e2357202949f99ad94c5a5a34f95666'
end
end

context 'when invalid result root' do
it 'fails' do
result_path = described_class.new
Expand Down Expand Up @@ -124,26 +76,6 @@
end
end

context 'handles build-llvm_project path' do
context 'when valid result root' do
it 'succesds' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-llvm_project/debian-x86_64-20191114.cgz/073dbaae39724ea860b5957fe47ecc1c2a84b197/0")).to be true
expect(result_path['testcase']).to eq 'build-llvm_project'
expect(result_path['rootfs']).to eq 'debian-x86_64-20191114.cgz'
expect(result_path['llvm_project_commit']).to eq '073dbaae39724ea860b5957fe47ecc1c2a84b197'
end
end
context 'when invalid result root' do
it 'fails' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-llvm_project/debian-x86_64-20191114.cgz")).to be false
end
end
end

context 'handles deploy-clang path' do
context 'when valid result root' do
it 'succesds' do
Expand All @@ -164,85 +96,6 @@
end
end

context 'handles build-nvml path' do
context 'when valid result root' do
it 'succesds' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-nvml/debian-x86_64-20180403.cgz/28070d6f6c3e8465f2b0fbceccd5f72f12cdd866")).to be true
expect(result_path['testcase']).to eq 'build-nvml'
expect(result_path['rootfs']).to eq 'debian-x86_64-20180403.cgz'
expect(result_path['nvml_commit']).to eq '28070d6f6c3e8465f2b0fbceccd5f72f12cdd866'
end
end
context 'when invalid result root' do
it 'fails' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-nvml/debian-x86_64-20190319.cgz/")).to be false
end
end
end

context 'handles build-ltp path' do
context 'when valid result root' do
it 'succesds' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-ltp/debian-x86_64-20191114.cgz/6c0870b78354d3511ae42882c25353b53956e185")).to be true
expect(result_path['testcase']).to eq 'build-ltp'
expect(result_path['rootfs']).to eq 'debian-x86_64-20191114.cgz'
expect(result_path['ltp_commit']).to eq '6c0870b78354d3511ae42882c25353b53956e185'
end
end
context 'when invalid result root' do
it 'fails' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-ltp/debian-x86_64-20191114.cgz/")).to be false
end
end
end

context 'handles build-acpica path' do
context 'when valid result root' do
it 'succesds' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-acpica/3d047ea358a224d44352f9498ab140cb8c8973a1/unix")).to be true
expect(result_path['testcase']).to eq 'build-acpica'
expect(result_path['acpica_commit']).to eq '3d047ea358a224d44352f9498ab140cb8c8973a1'
expect(result_path['test']).to eq 'unix'
end
end
context 'when invalid result root' do
it 'fails' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-acpica/unix")).to be false
end
end
end

context 'handles build-ceph path' do
context 'when valid result root' do
it 'succesds' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-ceph/3d047ea358a224d44352f9498ab140c")).to be true
expect(result_path['testcase']).to eq 'build-ceph'
expect(result_path['ceph_commit']).to eq '3d047ea358a224d44352f9498ab140c'
end
end
context 'when invalid result root' do
it 'fails' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-ceph")).to be false
end
end
end

context 'handles kvm-kernel-boot-test path' do
context 'when valid result root' do
it 'succesds' do
Expand All @@ -267,25 +120,6 @@
end
end

context 'handles build-perf_test path' do
context 'when valid result root' do
it 'succesds' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-perf_test/6367bd5b7304e6a309a5ef3387d44aa6f49cfc71")).to be true
expect(result_path['testcase']).to eq 'build-perf_test'
expect(result_path['perf_test_commit']).to eq '6367bd5b7304e6a309a5ef3387d44aa6f49cfc71'
end
end
context 'when invalid result root' do
it 'fails' do
result_path = described_class.new

expect(result_path.parse_result_root("#{RESULT_ROOT_DIR}/build-perf_test/")).to be false
end
end
end

context 'handles health-stats path' do
context 'when valid result root' do
it 'succesds' do
Expand Down Expand Up @@ -342,22 +176,8 @@
expect(test_desc['tbox_group']).to eq 'vm-snb'
expect(test_desc['commit']).to eq 'e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd'
end

it 'handles test desc with dim=dpdk_compiler' do
result_path = described_class.new
result_path['testcase'] = 'build-dpdk'

test_desc = result_path.parse_test_desc('build-dpdk/x86_64-native-linuxapp-gcc/0f57d86787d8b1076ea8f9cbdddda2a46d534a27/60c5c5692107abf4157d48493aa2dec01f6b97cc', dim: 'dpdk_compiler')
expect(test_desc['dpdk_config']).to eq 'x86_64-native-linuxapp-gcc'
expect(test_desc['commit']).to eq '0f57d86787d8b1076ea8f9cbdddda2a46d534a27'
expect(test_desc['dpdk_compiler']).to eq nil
expect(test_desc['dpdk_commit']).to eq '60c5c5692107abf4157d48493aa2dec01f6b97cc'
end
end

valid_dpdk_result_root = "#{RESULT_ROOT_DIR}/build-dpdk/dpdk-rootfs/x86_64-native-linuxapp-gcc/0f57d86787d8b1076ea8f9cbdddda2a46d534a27/gcc-4.9/60c5c5692107abf4157d48493aa2dec01f6b97cc/0"
valid_qemu_result_root = "#{RESULT_ROOT_DIR}/build-qemu/x86_64-softmmu/a58047f7fbb055677e45c9a7d65ba40fbfad4b92/2"

describe '#each_commit' do
it 'handles default path' do
result_path = described_class.new
Expand All @@ -369,44 +189,5 @@
expect(commit_axis).to eq 'commit'
end
end

it 'handles dpdk path' do
result_path = described_class.new

result_path.parse_result_root valid_dpdk_result_root

project_mappings = Hash[result_path.each_commit.map { |project, commit_axis| [project, commit_axis] }]
expect(project_mappings.size).to eq 2
expect(project_mappings['linux']).to eq 'commit'
expect(project_mappings['dpdk']).to eq 'dpdk_commit'
end

it 'handles qemu path' do
result_path = described_class.new

result_path.parse_result_root valid_qemu_result_root

project_mappings = Hash[result_path.each_commit.map { |project, commit_axis| [project, commit_axis] }]
expect(project_mappings.size).to eq 1
expect(project_mappings['linux']).to eq nil
expect(project_mappings['qemu']).to eq 'qemu_commit'
end

it 'returns enumerator' do
result_path = described_class.new
result_path.parse_result_root valid_dpdk_result_root

expect(result_path.each_commit.any? { |project| project == 'dpdk' }).to be true
end
end

describe '.maxis_keys' do
it 'handles dpdk path' do
expect(described_class.maxis_keys('build-dpdk').size).to eq 5
end

it 'handles qemu path' do
expect(described_class.maxis_keys('build-qemu').size).to eq 3
end
end
end

0 comments on commit 191f794

Please sign in to comment.