Update to upstream release 4.24.0
Add gating tests Resolves: rhbz#2170069 Signed-off-by: Kamal Heib <kheib@redhat.com>
This commit is contained in:
parent
451bc7b4f2
commit
f85c20ff3d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
SOURCES/mstflint-4.23.0-1.tar.gz
|
||||
/mstflint-4.23.0-1.tar.gz
|
||||
/mstflint-4.24.0-1.tar.gz
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
Name: mstflint
|
||||
Summary: Mellanox firmware burning tool
|
||||
Version: 4.23.0
|
||||
Release: 2%{?dist}
|
||||
Version: 4.24.0
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+ or BSD
|
||||
Url: https://github.com/Mellanox/%{name}
|
||||
Source0: https://github.com/Mellanox/%{name}/releases/download/v%{version}-1/%{name}-%{version}-1.tar.gz
|
||||
@ -63,6 +63,11 @@ chmod +x %{buildroot}/%{_libdir}/mstflint/python_tools/*.so
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Fri Jun 02 2023 Kamal Heib <kheib@redhat.com> - 4.24.0-1
|
||||
- Update to upstream release 4.24.0
|
||||
- Add gating tests
|
||||
- Resolves: rhbz#2170069
|
||||
|
||||
* Wed Feb 08 2023 Michal Schmidt <mschmidt@redhat.com> - 4.23.0-2
|
||||
- Update to upstream release 4.23.0
|
||||
- Resolves: rhbz#2112936
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (mstflint-4.23.0-1.tar.gz) = 5a5d779a7b7635128417701a059c2e2c8d4e58ff9f71950e50d6df1c583ff594cf883af1e0412d995fb8c66390884989a6c4dab0ce95bcd3bc67312be4412f2b
|
||||
SHA512 (mstflint-4.24.0-1.tar.gz) = 143dd558e9b57e26d25459885957422b650dc2cdc5b0069b77d1cda07d3da4161a57b10b7d38fffe609c23c7905611ec04834f9c06174a7ba7462dd71085c3b5
|
||||
|
10
tests/run_tests.sh
Executable file
10
tests/run_tests.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# when running this in 1minutetip the PATH must be specified to execute
|
||||
# in the local directory.
|
||||
echo "Setting path to local directory"
|
||||
PATH=$PATH:$(pwd)
|
||||
|
||||
# simple sanity test
|
||||
sanity.sh
|
||||
exit $?
|
47
tests/sanity.sh
Executable file
47
tests/sanity.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This is a simple sanity test to satisfy the RHEL8.1 onboard gating
|
||||
# requirement.
|
||||
|
||||
ret=0
|
||||
cx2="ConnectX VPI PCIe 2.0"
|
||||
cx3="[ConnectX-3]"
|
||||
device_list=$(lspci | grep 'Mellanox' | grep -v 'Virtual' | grep -v 'DMA controller' | awk '{print $1}')
|
||||
|
||||
# Skip loop if device list is empty
|
||||
[[ -z "${dev// }" ]] || for dev in "$device_list"; do
|
||||
# View Device Info
|
||||
|
||||
lspci -vvv -s "$dev"
|
||||
dev_name=$(lspci -s "$dev")
|
||||
|
||||
# Test Mstflint Tools
|
||||
|
||||
mstflint -d "$dev" q
|
||||
let ret=$ret+$?
|
||||
|
||||
# mstconfig does not support < 4th Gen devices (e.g. ConnectX-2)
|
||||
if [[ "$dev_name" != *"$cx2"* ]]; then
|
||||
mstconfig -d "${dev}" q
|
||||
let ret=$ret+$?
|
||||
fi
|
||||
|
||||
mstvpd "$dev" 2>/dev/null
|
||||
let ret=$ret+$?
|
||||
|
||||
mstregdump "$dev" >/dev/null
|
||||
let ret=$ret+$?
|
||||
|
||||
# mstfwmanager/mstfwreset do not support ConnectX-2 or ConnectX-3
|
||||
if [[ "$dev_name" != *"$cx2"* && "$dev_name" != *"$cx3"* ]]; then
|
||||
mstfwmanager -d "$dev" --query
|
||||
let ret=$ret+$?
|
||||
|
||||
mstfwreset -d "$dev" q
|
||||
let ret=$ret+$?
|
||||
fi
|
||||
done
|
||||
|
||||
# end test - it is possible no Mellanox devices were available at all to test,
|
||||
# in which case we automatically mark the test PASS (exit 0)
|
||||
exit $ret
|
12
tests/tests.yml
Normal file
12
tests/tests.yml
Normal file
@ -0,0 +1,12 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- simple:
|
||||
dir: .
|
||||
run: ./run_tests.sh
|
||||
required_packages:
|
||||
- pciutils
|
||||
- mstflint
|
Loading…
Reference in New Issue
Block a user