Skip to content
Snippets Groups Projects
Commit f95e16b1 authored by Rocky Automation's avatar Rocky Automation :tv:
Browse files

import accel-config-4.1.6-2.el10

parent 7166c22e
No related merge requests found
From 3b1faa506dbc47c1f2aeb376ffe92a41eab961b3 Mon Sep 17 00:00:00 2001
From: Jerry Snitselaar <jsnitsel@redhat.com>
Date: Wed, 3 Apr 2024 13:06:20 -0700
Subject: [PATCH 1/3] accel-config/test: Don't attempt to disable non-existent
devices
'Content-type: text/plain'
Check whether any devices exist before attempting to iterate
over them.
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
---
test/common | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/test/common b/test/common
index a5a53ec27b08..fd9a3eebdc6b 100755
--- a/test/common
+++ b/test/common
@@ -122,13 +122,18 @@ check_prereq()
disable_all() {
for device_type in 'dsa' 'iax'; do
# Kernel before 5.13 has dsa and iax bus. Because of ABI change, iax
- # bus is removed. All devices are in /sys/bus/das/devices.
+ # bus is removed. All devices are in /sys/bus/dsa/devices.
if [ -d /sys/bus/iax ] && [ $device_type == 'iax' ]; then
DSA_DEVICE_PATH="/sys/bus/iax/devices"
else
DSA_DEVICE_PATH="/sys/bus/dsa/devices"
fi
- # Get available devices
+
+ if ! ls "${DSA_DEVICE_PATH}/" | grep -qE "${device_type}[0-9]*"; then
+ continue
+ fi
+
+ # Get available devices
for device_path in ${DSA_DEVICE_PATH}/${device_type}* ; do
[[ $(echo "$device_path" | grep -c '!') -eq 0 ]] && {
# Get wqs and disable it if the status is enabled
--
2.44.0
This diff is collapsed.
From 6c37d05e3387c0cd9109587fb5065f1ececec22a Mon Sep 17 00:00:00 2001
From: Jerry Snitselaar <jsnitsel@redhat.com>
Date: Sat, 13 Apr 2024 01:38:38 -0700
Subject: [PATCH 3/3] accel-config/test: Clean up typo
'Content-type: text/plain'
Replace "shoudl" with "should" in dsa_conf_test_runner.sh
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
---
test/dsa_config_test_runner.sh | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/test/dsa_config_test_runner.sh b/test/dsa_config_test_runner.sh
index 740648a91d94..103f1ee25530 100755
--- a/test/dsa_config_test_runner.sh
+++ b/test/dsa_config_test_runner.sh
@@ -185,9 +185,9 @@ wq_config_test()
fi
"$ACCFG" enable-device $DSA
"$ACCFG" enable-wq $DSA/$WQ0
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 "${VERBOSE}" && echo "shoudl fail, but pass" && exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 "${VERBOSE}" && echo "should fail, but pass" && exit 1
"$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x4 -c 2 "${VERBOSE}" &&
- echo "shoudl fail, but pass" && exit 1
+ echo "should fail, but pass" && exit 1
"$ACCFG" disable-device $DSA
"$ACCFG" config-wq $DSA/$WQ0 -g 0 -m dedicated -y user -n app1 -d user -p 10 -o 8
@@ -198,10 +198,10 @@ wq_config_test()
fi
"$ACCFG" enable-device $DSA
"$ACCFG" enable-wq $DSA/$WQ0
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 "${VERBOSE}" || echo "shoudl pass, but fail" || exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x5 "${VERBOSE}" && echo "shoudl fail, but pass" && exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 "${VERBOSE}" || echo "should pass, but fail" || exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x5 "${VERBOSE}" && echo "should fail, but pass" && exit 1
"$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x3 -c 2 "${VERBOSE}" &&
- echo "shoudl fail, but pass" && exit 1
+ echo "should fail, but pass" && exit 1
"$ACCFG" disable-device $DSA
"$ACCFG" config-wq $DSA/$WQ0 -g 0 -m dedicated -y user -n app1 -d user -p 10 -o 272
@@ -212,19 +212,19 @@ wq_config_test()
fi
"$ACCFG" enable-device $DSA
"$ACCFG" enable-wq $DSA/$WQ0
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x0 "${VERBOSE}" && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x2 "${VERBOSE}" && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 "${VERBOSE}" && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x7 "${VERBOSE}" && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x8 "${VERBOSE}" && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x4 "${VERBOSE}" || echo "shoudl pass, but fail" || exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x5 "${VERBOSE}" || echo "shoudl pass, but fail" || exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x6 "${VERBOSE}" || echo "shoudl pass, but fail" || exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x9 "${VERBOSE}" || echo "shoudl fail, but pass" || exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x0 "${VERBOSE}" && echo "should fail, but pass" && exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x2 "${VERBOSE}" && echo "should fail, but pass" && exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 "${VERBOSE}" && echo "should fail, but pass" && exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x7 "${VERBOSE}" && echo "should fail, but pass" && exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x8 "${VERBOSE}" && echo "should fail, but pass" && exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x4 "${VERBOSE}" || echo "should pass, but fail" || exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x5 "${VERBOSE}" || echo "should pass, but fail" || exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x6 "${VERBOSE}" || echo "should pass, but fail" || exit 1
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x9 "${VERBOSE}" || echo "should fail, but pass" || exit 1
"$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x5 -c 2 "${VERBOSE}" ||
- echo "shoudl pass, but fail" || exit 1
+ echo "should pass, but fail" || exit 1
"$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x9 -c 2 "${VERBOSE}" ||
- echo "shoudl pass, but fail" || exit 1
+ echo "should pass, but fail" || exit 1
"$ACCFG" disable-device $DSA
fi
}
--
2.44.0
......@@ -2,12 +2,16 @@
Name: accel-config
Version: 4.1.6
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Configure accelerator subsystem devices
License: GPL-2.0-only
URL: https://github.com/intel/%{project_name}
Source0: %{URL}/archive/%{name}-v%{version}.tar.gz
# submitted upstream: https://github.com/intel/idxd-config/pull/62
Patch0: 0001-accel-config-test-Don-t-attempt-to-disable-non-exist.patch
# submitted upstream: https://github.com/intel/idxd-config/pull/63
Patch1: 0002-accel-config-test-Make-verbose-logging-optional.patch
Patch2: 0003-accel-config-test-Clean-up-typo.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: gcc
BuildRequires: autoconf
......@@ -59,7 +63,7 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Tests for accel-config command.
%prep
%autosetup -n %{project_name}-%{name}-v%{version}
%autosetup -p1 -n %{project_name}-%{name}-v%{version}
%build
echo %{version} > version
......@@ -99,6 +103,10 @@ make check
%{_libexecdir}/accel-config/test/*
%changelog
* Wed Apr 10 2024 Jerry Snitselaar <jsnitsel@redhat.com> - 4.1.6-2
- Fix issue with dsa_user_test_runner device clean up.
Resolves: RHEL-32469
* Sun Mar 24 2024 Jerry Snitselaar <jsnitsel@redhat.com> - 4.1.6-1
- Rebase to 4.1.6 release
Resolves: RHEL-29909
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment