Compare commits

...

No commits in common. "c8" and "c9s" have entirely different histories.
c8 ... c9s

11 changed files with 801 additions and 165 deletions

View File

@ -1 +1 @@
c2571f89e855e1054a078a4dfee1d7d6feefb7e5 SOURCES/accel-config-v3.5.0.tar.gz
bf299ec1d866972992d4868e4a74357bfd996357 accel-config-v4.1.6.tar.gz

11
.gitignore vendored
View File

@ -1 +1,10 @@
SOURCES/accel-config-v3.5.0.tar.gz
/accel-config-v3.1.tar.gz
/accel-config-v3.2.tar.gz
/accel-config-v3.4.2.tar.gz
/accel-config-v3.4.6.2.tar.gz
/accel-config-v3.4.6.3.tar.gz
/accel-config-v3.4.8.tar.gz
/accel-config-v3.5.0.tar.gz
/accel-config-v3.5.3.tar.gz
/accel-config-v4.1.3.tar.gz
/accel-config-v4.1.6.tar.gz

View File

@ -0,0 +1,43 @@
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

View File

@ -0,0 +1,484 @@
From 089912b1c8f1dab156a699e70e461076df28de97 Mon Sep 17 00:00:00 2001
From: Jerry Snitselaar <jsnitsel@redhat.com>
Date: Sat, 13 Apr 2024 00:02:28 -0700
Subject: [PATCH 2/3] accel-config/test: Make verbose logging optional
'Content-type: text/plain'
Add option to test scripts to turn on verbose logging using
the option --verbose, and default to bash shopt +x, and
not passing -v to the test executable.
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
---
test/dsa_config_test_runner.sh | 41 +++++-----
test/dsa_user_test_runner.sh | 53 +++++++------
test/iaa_user_test_runner.sh | 134 +++++++++++++++++----------------
3 files changed, 125 insertions(+), 103 deletions(-)
diff --git a/test/dsa_config_test_runner.sh b/test/dsa_config_test_runner.sh
index aa02864a3d74..740648a91d94 100755
--- a/test/dsa_config_test_runner.sh
+++ b/test/dsa_config_test_runner.sh
@@ -1,9 +1,16 @@
-#!/bin/bash -Ex
+#!/bin/bash -E
# SPDX-License-Identifier: GPL-2.0
# Copyright(c) 2019-2020 Intel Corporation. All rights reserved.
. "$(dirname "$0")/common"
+if [[ $* =~ "--verbose" ]]; then
+ set -x
+ VERBOSE="-v"
+else
+ VERBOSE=""
+fi
+
DSA=dsa0
WQ0=wq0.0
GRP0=group0.0
@@ -178,8 +185,8 @@ wq_config_test()
fi
"$ACCFG" enable-device $DSA
"$ACCFG" enable-wq $DSA/$WQ0
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 -v && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x4 -c 2 &&
+ "$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 0x1 -b 0x4 -c 2 "${VERBOSE}" &&
echo "shoudl fail, but pass" && exit 1
"$ACCFG" disable-device $DSA
@@ -191,9 +198,9 @@ wq_config_test()
fi
"$ACCFG" enable-device $DSA
"$ACCFG" enable-wq $DSA/$WQ0
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 || echo "shoudl pass, but fail" || exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x5 && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x3 -c 2 &&
+ "$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 0x1 -b 0x3 -c 2 "${VERBOSE}" &&
echo "shoudl fail, but pass" && exit 1
"$ACCFG" disable-device $DSA
@@ -205,18 +212,18 @@ wq_config_test()
fi
"$ACCFG" enable-device $DSA
"$ACCFG" enable-wq $DSA/$WQ0
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x0 && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x2 && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x7 && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x8 && echo "shoudl fail, but pass" && exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x4 || echo "shoudl pass, but fail" || exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x5 || echo "shoudl pass, but fail" || exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x6 || echo "shoudl pass, but fail" || exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x9 || echo "shoudl fail, but pass" || exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x5 -c 2 ||
+ "$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 0x1 -b 0x5 -c 2 "${VERBOSE}" ||
echo "shoudl pass, but fail" || exit 1
- "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x9 -c 2 ||
+ "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x9 -c 2 "${VERBOSE}" ||
echo "shoudl pass, but fail" || exit 1
"$ACCFG" disable-device $DSA
fi
diff --git a/test/dsa_user_test_runner.sh b/test/dsa_user_test_runner.sh
index 1e6d3a602a49..2848feda68bb 100755
--- a/test/dsa_user_test_runner.sh
+++ b/test/dsa_user_test_runner.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -Ex
+#!/bin/bash -E
# SPDX-License-Identifier: GPL-2.0
# Copyright(c) 2019-2020 Intel Corporation. All rights reserved.
@@ -6,15 +6,22 @@
rc="$EXIT_SKIP"
-input1=$1
-if [ "$input1" == "--skip-config" ]; then
-DEV=`ls /dev/dsa/ | sed -ne 's|wq\([^.]\+\)\(.*\)|dsa\1/wq\1\2|p'`
-DSA=`echo $DEV | cut -f1 -d/`
-echo "$DEV"
-echo "$DSA"
+if [[ $* =~ "--verbose" ]]; then
+ VERBOSE="-v"
+ set -x
else
-DSA=dsa0
-echo "$DSA"
+ VERBOSE=""
+fi
+
+if [[ $* =~ "--skip-config" ]]; then
+ SKIPCONFIG="true"
+ DEV=`ls /dev/dsa/ | sed -ne 's|wq\([^.]\+\)\(.*\)|dsa\1/wq\1\2|p'`
+ DSA=`echo $DEV | cut -f1 -d/`
+ echo "$DEV"
+ echo "$DSA"
+else
+ DSA=dsa0
+ echo "$DSA"
fi
WQ0=wq0.0
WQ1=wq0.1
@@ -78,12 +85,12 @@ test_op()
echo "Performing $wq_mode_name WQ $op_name testing"
for xfer_size in $SIZE_1 $SIZE_4K $SIZE_64K $SIZE_1M $SIZE_2M; do
echo "Testing $xfer_size bytes"
- if [ "$input1" == "--skip-config" ]; then
+ if ! test -z "${SKIPCONFIG}"; then
"$DSATEST" -l "$xfer_size" -o "$opcode" \
- -f "$flag" t200 -v -d "$DEV"
+ -f "$flag" t200 "${VERBOSE}" -d "$DEV"
else
"$DSATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \
- -f "$flag" t200 -v
+ -f "$flag" t200 "${VERBOSE}"
fi
done
done
@@ -112,12 +119,12 @@ test_op_batch()
echo "Performing $wq_mode_name WQ batched $op_name testing"
for xfer_size in $SIZE_1 $SIZE_4K $SIZE_64K $SIZE_1M $SIZE_2M; do
echo "Testing $xfer_size bytes"
- if [ "$input1" == "--skip-config" ]; then
+ if ! test -z "${SKIPCONFIG}"; then
"$DSATEST" -l "$xfer_size" -o 0x1 -b "$opcode" \
- -c 16 -f "$flag" t2000 -v -d "$DEV"
+ -c 16 -f "$flag" t2000 "${VERBOSE}" -d "$DEV"
else
"$DSATEST" -w "$wq_mode_code" -l "$xfer_size" -o 0x1 -b "$opcode" \
- -c 16 -f "$flag" t2000 -v
+ -c 16 -f "$flag" t2000 "${VERBOSE}"
fi
done
done
@@ -142,12 +149,12 @@ test_dif_op()
echo "Performing $wq_mode_name WQ $op_name testing"
for xfer_size in $SIZE_512 $SIZE_1K $SIZE_4K; do
echo "Testing $xfer_size bytes"
- if [ "$input1" == "--skip-config" ]; then
+ if ! test -z "${SKIPCONFIG}"; then
"$DSATEST" -l "$xfer_size" -o "$opcode" \
- -f "$flag" t200 -v -d "$DEV"
+ -f "$flag" t200 "${VERBOSE}" -d "$DEV"
else
"$DSATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \
- -f "$flag" t200 -v
+ -f "$flag" t200 "${VERBOSE}"
fi
done
done
@@ -172,17 +179,17 @@ test_dif_op_batch()
echo "Performing $wq_mode_name WQ batched $op_name testing"
for xfer_size in $SIZE_512 $SIZE_1K $SIZE_4K; do
echo "Testing $xfer_size bytes"
- if [ "$input1" == "--skip-config" ]; then
+ if ! test -z "${SKIPCONFIG}"; then
"$DSATEST" -l "$xfer_size" -o 0x1 -b "$opcode" \
- -c 16 -f "$flag" t2000 -v -d "$DEV"
+ -c 16 -f "$flag" t2000 "${VERBOSE}" -d "$DEV"
else
"$DSATEST" -w "$wq_mode_code" -l "$xfer_size" -o 0x1 -b "$opcode" \
- -c 16 -f "$flag" t2000 -v
+ -c 16 -f "$flag" t2000 "${VERBOSE}"
fi
done
done
}
-if [ "$input1" != "--skip-config" ]; then
+if test -z "${SKIPCONFIG}"; then
_cleanup
start_dsa
enable_wqs
@@ -219,7 +226,7 @@ for opcode in "0x12" "0x13" "0x14" "0x15"; do
test_dif_op_batch $opcode $flag
done
-if [ "$input1" != "--skip-config" ]; then
+if ! $SKIPCONFIG; then
disable_wqs
stop_dsa
_cleanup
diff --git a/test/iaa_user_test_runner.sh b/test/iaa_user_test_runner.sh
index eb9629b4341e..f978b68505e8 100755
--- a/test/iaa_user_test_runner.sh
+++ b/test/iaa_user_test_runner.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -Ex
+#!/bin/bash -E
# SPDX-License-Identifier: GPL-2.0
# Copyright(c) 2019-2020 Intel Corporation. All rights reserved.
@@ -7,13 +7,21 @@
rc="$EXIT_SKIP"
DEV_OPT=""
-input1=$1
-if [ "$input1" == "--skip-config" ]; then
+
+if [[ $* =~ "--verbose" ]]; then
+ VERBOSE="-v"
+ set -x
+else
+ VERBOSE=""
+fi
+
+if [[ $* =~ "--skip-config" ]]; then
DEV=`ls /dev/iax/ | sed -ne 's|wq\([^.]\+\)\(.*\)|iax\1/wq\1\2|p'`
DEV=`echo $DEV | cut -f1 -d' '`
IAA=`echo $DEV | cut -f1 -d/`
DEV_OPT="-d $DEV"
echo "$DEV"
+ SKIPCONFIG="true"
else
IAA=iax1
fi
@@ -140,10 +148,10 @@ test_op()
if [ "$extra_flag" != "" ]
then
"$IAATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \
- -f "$flag" -1 "$extra_flag" -t 5000 -v $DEV_OPT
+ -f "$flag" -1 "$extra_flag" -t 5000 "${VERBOSE}" $DEV_OPT
else
"$IAATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \
- -f "$flag" -t 5000 -v $DEV_OPT
+ -f "$flag" -t 5000 "${VERBOSE}" $DEV_OPT
fi
done
done
@@ -160,133 +168,133 @@ test_op_filter()
if [ $((IAA_OPCODE_MASK_SCAN & OP_CAP2)) -ne 0 ]; then
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c \
- -3 128 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT
+ -3 128 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c \
- -3 256 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT
+ -3 256 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c \
- -3 1024 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT
+ -3 1024 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c \
- -3 16384 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT
+ -3 16384 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c \
- -3 262144 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT
+ -3 262144 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c \
- -3 524288 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT
+ -3 524288 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT
fi
if [ $((IAA_OPCODE_MASK_SET_MEMBERSHIP & OP_CAP2)) -ne 0 ]; then
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x38 \
- -3 256 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT
+ -3 256 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x38 \
- -3 512 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT
+ -3 512 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x38 \
- -3 2048 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT
+ -3 2048 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x38 \
- -3 32768 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT
+ -3 32768 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x38 \
- -3 524288 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT
+ -3 524288 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x38 \
- -3 1048576 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT
+ -3 1048576 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT
fi
if [ $((IAA_OPCODE_MASK_EXTRACT & OP_CAP2)) -ne 0 ]; then
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c \
- -3 128 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT
+ -3 128 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c \
- -3 256 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT
+ -3 256 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c \
- -3 1024 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT
+ -3 1024 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c \
- -3 16384 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT
+ -3 16384 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c \
- -3 262144 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT
+ -3 262144 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c \
- -3 524288 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT
+ -3 524288 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT
fi
if [ $((IAA_OPCODE_MASK_SELECT & OP_CAP2)) -ne 0 ]; then
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c \
- -3 128 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT
+ -3 128 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c \
- -3 256 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT
+ -3 256 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c \
- -3 1024 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT
+ -3 1024 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c \
- -3 16384 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT
+ -3 16384 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c \
- -3 262144 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT
+ -3 262144 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c \
- -3 524288 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT
+ -3 524288 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT
fi
if [ $((IAA_OPCODE_MASK_RLE_BURST & OP_CAP2)) -ne 0 ]; then
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x1c \
- -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x1c \
- -3 1024 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 1024 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x1c \
- -3 4096 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 4096 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 32768 -2 0x1c \
- -3 32768 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 32768 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x1c \
- -3 65536 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 65536 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 131072 -2 0x1c \
- -3 131072 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 131072 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 32 -2 0x3c \
- -3 16 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 16 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 64 -2 0x3c \
- -3 32 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 32 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 128 -2 0x3c \
- -3 64 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 64 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 256 -2 0x3c \
- -3 128 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 128 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x3c \
- -3 256 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 256 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x3c \
- -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 64 -2 0x7c \
- -3 16 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 16 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 128 -2 0x7c \
- -3 32 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 32 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 256 -2 0x7c \
- -3 64 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 64 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c \
- -3 128 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 128 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c \
- -3 256 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 256 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2048 -2 0x7c \
- -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT
+ -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT
fi
if [ $((IAA_OPCODE_MASK_FIND_UNIQUE & OP_CAP2)) -ne 0 ]; then
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x38 \
- -3 256 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT
+ -3 256 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x38 \
- -3 512 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT
+ -3 512 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x38 \
- -3 2048 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT
+ -3 2048 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x38 \
- -3 32768 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT
+ -3 32768 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x38 \
- -3 524288 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT
+ -3 524288 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x38 \
- -3 1048576 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT
+ -3 1048576 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT
fi
if [ $((IAA_OPCODE_MASK_EXPAND & OP_CAP2)) -ne 0 ]; then
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c \
- -3 128 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT
+ -3 128 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c \
- -3 256 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT
+ -3 256 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c \
- -3 1024 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT
+ -3 1024 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c \
- -3 16384 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT
+ -3 16384 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c \
- -3 262144 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT
+ -3 262144 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT
"$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c \
- -3 524288 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT
+ -3 524288 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT
fi
done
}
@@ -308,7 +316,7 @@ test_op_crypto()
echo "Testing $xfer_size bytes"
"$IAATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \
- -f "$flag" -a "$aecs_flag" -t 5000 -v $DEV_OPT
+ -f "$flag" -a "$aecs_flag" -t 5000 "${VERBOSE}" $DEV_OPT
done
done
}
@@ -329,12 +337,12 @@ test_op_transl_fetch()
echo "Testing $xfer_size bytes"
"$IAATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \
- -f "$flag" -t 5000 -v $DEV_OPT
+ -f "$flag" -t 5000 "${VERBOSE}" $DEV_OPT
done
done
}
-if [ "$input1" != "--skip-config" ]; then
+if test -z "${SKIPCONFIG}"; then
_cleanup
start_iaa
enable_wqs
@@ -487,7 +495,7 @@ if [ $((IAA_OPCODE_MASK_TRANSL_FETCH & OP_CAP0)) -ne 0 ]; then
test_op_transl_fetch $IAA_OPCODE_TRANSL_FETCH $flag
fi
-if [ "$input1" != "--skip-config" ]; then
+if test -z "${SKIPCONFIG}"; then
disable_wqs
stop_iaa
_cleanup
--
2.44.0

View File

@ -0,0 +1,77 @@
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

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# accel-config
The accel-config package

View File

@ -1,36 +0,0 @@
diff --color -ur idxd-config-accel-config-v3.4.8/test/dsa_user_test_runner.sh idxd-config-accel-config-v3.4.8-new/test/dsa_user_test_runner.sh
--- idxd-config-accel-config-v3.4.8/test/dsa_user_test_runner.sh 2022-09-21 14:16:06.000000000 -0700
+++ idxd-config-accel-config-v3.4.8-new/test/dsa_user_test_runner.sh 2022-10-06 16:36:02.838178412 -0700
@@ -14,7 +14,7 @@
[ ! -f "$DSATEST" ] && echo "fail: $LINENO" && exit 1
-check_min_kver "5.6" || do_skip "kernel does not support idxd"
+check_min_kver "4.18" || do_skip "kernel does not support idxd"
# skip if no pasid support as dsa_test does not support operation w/o pasid yet.
[ ! -f "/sys/bus/dsa/devices/$DSA/pasid_enabled" ] && echo "No SVM support" && exit "$EXIT_SKIP"
diff --color -ur idxd-config-accel-config-v3.4.8/test/iaa_user_test_runner.sh idxd-config-accel-config-v3.4.8-new/test/iaa_user_test_runner.sh
--- idxd-config-accel-config-v3.4.8/test/iaa_user_test_runner.sh 2022-09-21 14:16:06.000000000 -0700
+++ idxd-config-accel-config-v3.4.8-new/test/iaa_user_test_runner.sh 2022-10-06 16:35:43.989998045 -0700
@@ -14,7 +14,7 @@
[ ! -f "$IAATEST" ] && echo "fail: $LINENO" && exit 1
-check_min_kver "5.6" || do_skip "kernel does not support idxd"
+check_min_kver "4.18" || do_skip "kernel does not support idxd"
# skip if no pasid support as iaa_test does not support operation w/o pasid yet.
[ ! -f "/sys/bus/dsa/devices/$IAA/pasid_enabled" ] && echo "No SVM support" && exit "$EXIT_SKIP"
diff --color -ur idxd-config-accel-config-v3.4.8/test/libaccfg.c idxd-config-accel-config-v3.4.8-new/test/libaccfg.c
--- idxd-config-accel-config-v3.4.8/test/libaccfg.c 2022-09-21 14:16:06.000000000 -0700
+++ idxd-config-accel-config-v3.4.8-new/test/libaccfg.c 2022-10-06 16:36:31.090448787 -0700
@@ -966,7 +966,7 @@
struct accfg_device *device;
struct log_ctx log_ctx;
- if (!accfg_test_attempt(test, KERNEL_VERSION(5, 6, 0)))
+ if (!accfg_test_attempt(test, KERNEL_VERSION(4, 18, 0)))
return EXIT_SKIP;
accfg_set_log_priority(ctx, loglevel);

View File

@ -1,127 +0,0 @@
%global project_name idxd-config
Name: accel-config
Version: 3.5.0
Release: 1%{?dist}
Summary: Configure accelerator subsystem devices
# The entire source code is under GPLv2 except for accel-config
# library which is mostly LGPLv2, ccan/list which is BSD-MIT and
# the rest of ccan which is CC0.
License: GPLv2 and LGPLv2+ and MIT and CC0
URL: https://github.com/intel/%{project_name}
Source0: %{URL}/archive/%{name}-v%{version}.tar.gz
Patch0: 0001-testing-vercheck.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: gcc
BuildRequires: autoconf
BuildRequires: asciidoc
BuildRequires: xmlto
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libkmod)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(zlib)
BuildRequires: systemd
# accel-config is for configuring Intel DSA (Data-Streaming
# Accelerator) subsystem in the Linux kernel. It supports x86 only.
ExclusiveArch: %{ix86} x86_64
%description
Utility library for configuring the accelerator subsystem.
%package devel
Summary: Development files for libaccfg
License: LGPLv2+
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package libs
Summary: Configuration library for accelerator subsystem devices
# All source code of configuration library is LGPLv2, except
# ccan/list which is BSD-MIT and the rest of ccan/ which is CC0.
License: LGPLv2+ and MIT and CC0
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}
%description test
Tests for accel-config command.
%prep
%autosetup -p1 -n %{project_name}-%{name}-v%{version}
%build
echo %{version} > version
./autogen.sh
%configure --disable-static --disable-silent-rules --enable-test
%make_build
%install
%make_install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%check
make check
%files
%license Documentation/COPYING licenses/BSD-MIT licenses/CC0
%license licenses/accel-config-licenses LICENSE_GPL_2_0
%{_bindir}/%{name}
%{_mandir}/man1/%{name}*
%{_sysconfdir}/%{name}/contrib/configs/*
%files libs
%doc README.md
%license Documentation/COPYING licenses/BSD-MIT licenses/CC0
%license licenses/libaccel-config-licenses accfg/lib/LICENSE_LGPL_2_1
%{_libdir}/lib%{name}.so.*
%files devel
%license Documentation/COPYING
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/lib%{name}.pc
%files test
%license Documentation/COPYING LICENSE_GPL_2_0
#%doc test/README.md
%{_prefix}/lib/accel-config/test/*
%changelog
* Sun Oct 16 2022 Jerry Snitselaar <jsnitsel@redhat.com> - 3.5.0-1
- Rebase to the 3.5.0 release.
resolves: rhbz#2101608
* Thu Oct 06 2022 Jerry Snitselaar <jsnitsel@redhat.com> - 3.4.8-1
- Rebase to 3.4.8 release.
resolves: rhbz#2101608
* Sun Apr 03 2022 Jerry Snitselaar <jsnitsel@redhat.com> - 3.4.6.3-1
- Rebase to 3.4.6.3 release.
resolves: rhbz#2040076
* Thu Sep 09 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 3.4.2-1
- Rebase to 3.4.2 and add test subpackage.
resolves: rhbz#1971910
* Tue May 18 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 3.1-1
- Rebase to 3.1 release.
resolves: rhbz#1920762
* Fri Nov 6 2020 Yunying Sun <yunying.sun@intel.com> - 2.8-1
- Initial Packaging

176
accel-config.spec Normal file
View File

@ -0,0 +1,176 @@
%global project_name idxd-config
Name: accel-config
Version: 4.1.6
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
BuildRequires: asciidoc
BuildRequires: xmlto
BuildRequires: automake
BuildRequires: libtool
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libkmod)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(zlib)
BuildRequires: systemd
BuildRequires: make
# accel-config is for configuring Intel DSA (Data-Streaming
# Accelerator) subsystem in the Linux kernel. It supports x86_64 only.
ExclusiveArch: %{ix86} x86_64
%description
Utility library for configuring the accelerator subsystem.
%package devel
Summary: Development files for libaccfg
License: LGPL-2.1-only
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package libs
Summary: Configuration library for accelerator subsystem devices
License: LGPL-2.1-only
Requires: %{name}%{?_isa} = %{version}-%{release}
%description libs
Libraries for %{name}.
%package test
Summary: Tests for accel-config
License: GPL-2.0-only
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description test
Tests for accel-config command.
%prep
%autosetup -p1 -n %{project_name}-%{name}-v%{version}
%build
echo %{version} > version
./autogen.sh
%configure --disable-static --disable-silent-rules --enable-test
%make_build
%install
%make_install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%check
make check
%files
%license Documentation/COPYING licenses/BSD-MIT licenses/CC0
%license licenses/accel-config-licenses LICENSE_GPL_2_0
%{_bindir}/%{name}
%{_mandir}/man1/%{name}*
%{_sysconfdir}/%{name}/contrib/configs/*
%files libs
%doc README.md
%license Documentation/COPYING licenses/BSD-MIT licenses/CC0
%license licenses/accel-config-licenses accfg/lib/LICENSE_LGPL_2_1
%{_libdir}/lib%{name}.so.*
%files devel
%license Documentation/COPYING
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/lib%{name}.pc
%files test
%license Documentation/COPYING LICENSE_GPL_2_0
%doc test/README.md
%{_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
* Tue Apr 18 2023 Jerry Snitselaar <jsnitsel@redhat.com> - 3.5.3-1
- Rebase to the 3.5.3 release.
Resolves: rhbz#2153899
* Tue Oct 04 2022 Jerry Snitselaar <jsnitsel@redhat.com> - 3.5.0-1
- Rebase to 3.5.0 release.
Resolves: rhbz#2101609
* Sun Apr 03 2022 Jerry Snitselaar <jsnitsel@redhat.com> - 3.4.6.3-1
- Rebase to 3.4.6.3 release.
Resolves: rhbz#2040077
* Fri Feb 11 2022 Jerry Snitselaar <jsnitsel@redhat.com> - 3.4.2-2
- Rebuild to clear osci test failure.
Resolves: rhbz#1999934
* Tue Oct 05 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 3.4.2-1
- Rebase to 3.4.2 release and add test subpackage.
Resolves: rhbz#1999934
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.2-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jul 02 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 3.2-2
- Fix product version for gating.
Resolves: rhbz#1921368
* Mon Jun 21 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 3.2-1
- Rebase to 3.2 release. Related: rhbz#1921368
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Mar 29 2021 Yunying Sun <yunying.sun@intel.com> - 3.1-1
- Added ix86 support back as 3.1 release fixed it
- Updated to 3.1 release
* Thu Feb 18 2021 Yunying Sun <yunying.sun@intel.com> - 3.0.1-1
- Updated to 3.0.1 release
- Removed ix86 support as so far it supports x86_64 only
- Updated licenses following upstream
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Nov 6 2020 Yunying Sun <yunying.sun@intel.com> - 2.8-1
- Initial Packaging

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: manual.sst_kernel_rats.accel-config.legacy}

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (accel-config-v4.1.6.tar.gz) = 142c1a1d9e0b631023859410cdd31d6b076aed6cf01636b8f4d854854e517802572d33773c11106bd86746962d8fd6cc0e8c7106686b565980e0335fac5cac4e