Move to tmt test
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2383084 Signed-off-by: Tony Asleson <tasleson@redhat.com>
This commit is contained in:
parent
63bde938da
commit
3dfee18d28
6 changed files with 92 additions and 26 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
23
0001_rtslib_fb_api_fix.patch
Normal file
23
0001_rtslib_fb_api_fix.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/targetd/block.py b/targetd/block.py
|
||||
index b7b03f0..edd47ec 100644
|
||||
--- a/targetd/block.py
|
||||
+++ b/targetd/block.py
|
||||
@@ -26,10 +26,17 @@ from rtslib_fb import (
|
||||
LUN,
|
||||
MappedLUN,
|
||||
RTSLibError,
|
||||
- RTSLibNotInCFS,
|
||||
NodeACLGroup,
|
||||
)
|
||||
|
||||
+# This commit https://github.com/open-iscsi/rtslib-fb/commit/fdd69b1984bac6a6c3f08890bc22267b848a26ac
|
||||
+# renamed a number of error classes which causes us to do the following
|
||||
+try:
|
||||
+ from rtslib_fb import RTSLibNotInCFS
|
||||
+except ImportError:
|
||||
+ from rtslib_fb import RTSLibNotInCFSError as RTSLibNotInCFS
|
||||
+
|
||||
+
|
||||
from targetd.backends import lvm, zfs
|
||||
from targetd.main import TargetdError
|
||||
from targetd.utils import ignored, name_check
|
||||
|
|
@ -18,7 +18,12 @@ function _chk
|
|||
fi
|
||||
}
|
||||
|
||||
SOURCE_DIR="targetd_src"
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 source directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOURCE_DIR="$1"
|
||||
BASE=$PWD
|
||||
|
||||
# TODO REMOVE THIS WHEN RAWHIDE PICKS UP
|
||||
|
|
@ -32,6 +37,10 @@ _chk ./test/test.sh setup
|
|||
# Pick up new changes from setup
|
||||
_chk systemctl restart targetd
|
||||
|
||||
# Make sure nfs stuff is ok
|
||||
_chk systemctl start rpcbind
|
||||
_chk systemctl start nfs-server
|
||||
|
||||
# Try stopping the firewall, but don't fail if this fails
|
||||
systemctl stop firewalld
|
||||
|
||||
|
|
@ -44,6 +53,6 @@ netstat -anp | grep LISTEN | grep 18700
|
|||
# Go back to start directory and run unit test.
|
||||
_chk cd $BASE
|
||||
|
||||
SRC="$BASE/$SOURCE_DIR"
|
||||
SRC="$SOURCE_DIR"
|
||||
_chk TARGETD_UT_CERTFILE=/etc/target/targetd_cert.pem PYTHONPATH=$SRC python3 $SRC/test/targetd_test.py -v
|
||||
exit 0
|
||||
50
plans/tests.fmf
Normal file
50
plans/tests.fmf
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
summary: targetd gating tests
|
||||
|
||||
provision:
|
||||
how: virtual
|
||||
image: fedora
|
||||
|
||||
prepare:
|
||||
how: install
|
||||
package:
|
||||
- targetd
|
||||
- util-linux
|
||||
- lvm2
|
||||
- procps-ng
|
||||
- coreutils
|
||||
- openssl
|
||||
- btrfs-progs
|
||||
- audit
|
||||
- python3-requests
|
||||
- net-tools-2.0
|
||||
- nfs-utils
|
||||
|
||||
discover:
|
||||
how: shell
|
||||
dist-git-source: true
|
||||
dist-git-install-builddeps: true
|
||||
tests:
|
||||
- name: upstream test suite
|
||||
test: |
|
||||
set -x
|
||||
if [ -z "$PKG_VER" ]; then
|
||||
PKG_VER=`rpmspec -q --srpm --qf "%{version}" targetd.spec`
|
||||
fi
|
||||
if [ -z "$PKG_VER" ]; then
|
||||
echo "Error: Unable to extract package version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SRC="$TMT_SOURCE_DIR/targetd-${PKG_VER}"
|
||||
echo "Source is located: $SRC"
|
||||
|
||||
echo "We are $PWD"
|
||||
ls -lh
|
||||
|
||||
echo "TMT_SOURCE_DIR is ($TMT_SOURCE_DIR)"
|
||||
|
||||
./plans/ci_test.sh "$SRC"
|
||||
|
||||
execute:
|
||||
- how: tmt
|
||||
|
||||
|
|
@ -2,10 +2,11 @@ Name: targetd
|
|||
License: GPL-3.0-only
|
||||
Summary: Service to make storage remotely configurable
|
||||
Version: 0.10.4
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
URL: https://github.com/open-iscsi/targetd
|
||||
Source: https://github.com/open-iscsi/targetd/archive/v%{version}/targetd-%{version}.tar.gz
|
||||
Source1: targetd.service
|
||||
Patch1: 0001_rtslib_fb_api_fix.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: python3-devel python3-gobject-base python3-blockdev libblockdev-lvm
|
||||
|
|
@ -19,7 +20,7 @@ administrator allocate volumes from an LVM volume group, and export
|
|||
those volumes over iSCSI.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
|
@ -60,6 +61,10 @@ install -m 644 targetd.yaml.5 %{buildroot}%{_mandir}/man5/
|
|||
%config(noreplace) %{_sysconfdir}/target/targetd.yaml
|
||||
|
||||
%changelog
|
||||
* Thu Jul 24 2025 Tony Asleson <tasleson@redhat.com> - 0.10.4-8
|
||||
- Workaround for: https://github.com/open-iscsi/rtslib-fb/issues/220
|
||||
- Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2383084
|
||||
|
||||
* Mon Jun 09 2025 Python Maint <python-maint@redhat.com> - 0.10.4-7
|
||||
- Rebuilt for Python 3.14
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- simple:
|
||||
dir: .
|
||||
run: ./ci_test.sh
|
||||
required_packages:
|
||||
- targetd
|
||||
- util-linux
|
||||
- lvm2
|
||||
- procps-ng
|
||||
- coreutils
|
||||
- openssl
|
||||
- btrfs-progs
|
||||
- audit
|
||||
- python3-requests
|
||||
repositories:
|
||||
- repo: "https://github.com/open-iscsi/targetd.git"
|
||||
dest: "targetd_src"
|
||||
Loading…
Add table
Add a link
Reference in a new issue