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

import accel-config-4.1.6-2.el9

parent 56a444a5
No related merge requests found
4b3939555ec0da9be1a77a89aef294d379ddba221338d94a5c9eabb30586cc13
99295884a485cdcf1a938afb50fce4bfad5805d80b52e8893194add88ecce1b3
1202a495cbb630264cabcb6e35801c4070f1f5b5c8cc1e3a16976a35c5950980 SOURCES/accel-config-v3.5.3.tar.gz
6c66c7f05ac0a622fb98a55519340d83238e2c0155c1cb2aa5ea0ed278275c6e SOURCES/accel-config-v4.1.6.tar.gz
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
%global project_name idxd-config
Name: accel-config
Version: 3.5.3
Version: 4.1.6
Release: 2%{?dist}
Summary: Configure accelerator subsystem devices
# The entire source code is under GPLv2 except for accel-config
# library which is mostly LGPLv2.1, ccan/list which is BSD-MIT and
# the rest of ccan which is CC0.
License: GPLv2 and LGPLv2+ and MIT and CC0
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
......@@ -18,6 +20,7 @@ BuildRequires: asciidoc
BuildRequires: xmlto
BuildRequires: automake
BuildRequires: libtool
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libkmod)
BuildRequires: pkgconfig(uuid)
......@@ -36,7 +39,7 @@ Utility library for configuring the accelerator subsystem.
%package devel
Summary: Development files for libaccfg
License: LGPLv2+
License: LGPL-2.1-only
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
......@@ -46,18 +49,16 @@ developing applications that use %{name}.
%package libs
Summary: Configuration library for accelerator subsystem devices
# All source code of configuration library is LGPLv2.1, except
# ccan/list which is BSD-MIT and the rest of ccan/ which is CC0.
License: LGPLv2+ and MIT and CC0
License: LGPL-2.1-only
Requires: %{name}%{?_isa} = %{version}-%{release}
%description libs
Libraries for %{name}.
%package test
Summary: Tests for accel-config
License: GPLv2
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Summary: Tests for accel-config
License: GPL-2.0-only
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description test
Tests for accel-config command.
......@@ -103,6 +104,24 @@ make check
%{_libexecdir}/accel-config/test/*
%changelog
* Wed May 01 2024 Jerry Snitselaar <jsnitsel@redhat.com> - 4.1.6-2
- Fix faulty logic in dsa_user_test_runner device clean up.
- Adds a couple of test clean ups as well.
Resolves: RHEL-32451
* Fri Mar 22 2024 Jerry Snitselaar <jsnitsel@redhat.com> - 4.1.6-1
- Rebase to 4.1.6 release
Resolves: RHEL-29910
* Wed Jan 17 2024 Jerry Snitselaar <jsnitsel@redhat.com> - 4.1.3-2
- Fix SPDX tags
Resolves: RHEL-15610
* Fri Dec 01 2023 Jerry Snitselaar <jsnitsel@redhat.com> - 4.1.3-1
- Rebase to 4.1.3 release
- Update License tags to SPDX identifiers
Resolves: RHEL-15610
* Tue Apr 18 2023 Jerry Snitselaar <jsnitsel@redhat.com> - 3.5.3-2
- Remove spec file variable that blocked debuginfo build
Resolves: rhz#2153899
......
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