Prevent fails of test_ds_misc.sh (bis)

This commit is contained in:
Evgeny Kolesnikov 2022-02-01 17:07:11 +01:00
parent ff2fa3dd78
commit 73a157af6d
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From 650656bdac5e8e4df30c11bb4dbc830aab8baa78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
Date: Tue, 1 Feb 2022 15:06:33 +0100
Subject: [PATCH] Prevent fails of test_ds_misc.sh
Other files from which the datastream is composed might also
affect the timestamp attributes in result document depending
on their mtime.
---
tests/DS/test_ds_misc.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/DS/test_ds_misc.sh b/tests/DS/test_ds_misc.sh
index cffbef303..1777c44f4 100755
--- a/tests/DS/test_ds_misc.sh
+++ b/tests/DS/test_ds_misc.sh
@@ -270,7 +270,9 @@ function test_source_date_epoch() {
export SOURCE_DATE_EPOCH="1583410177"
export TZ=UTC
# ensure the file mtime is always newer than the $timestamp
- touch -c "$xccdf"
+ touch -c "$srcdir/sds_multiple_oval/first-oval.xml"
+ touch -c "$srcdir/sds_multiple_oval/multiple-oval-xccdf.xml"
+ touch -c "$srcdir/sds_multiple_oval/second-oval.xml"
$OSCAP ds sds-compose "$xccdf" "$result"
assert_exists 3 '//ds:component[@timestamp="'$timestamp'"]'
rm -f "$result"

View File

@ -1,6 +1,6 @@
Name: openscap Name: openscap
Version: 1.3.6 Version: 1.3.6
Release: 2%{?dist} Release: 3%{?dist}
Epoch: 1 Epoch: 1
Summary: Set of open source libraries enabling integration of the SCAP line of standards Summary: Set of open source libraries enabling integration of the SCAP line of standards
License: LGPLv2+ License: LGPLv2+
@ -8,6 +8,7 @@ URL: http://www.open-scap.org/
Source0: https://github.com/OpenSCAP/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/OpenSCAP/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
Patch1: openscap-1.3.7-pr-1841-fix-shellcheck-warning.patch Patch1: openscap-1.3.7-pr-1841-fix-shellcheck-warning.patch
Patch2: openscap-1.3.7-pr-1843-prevent-fails-of-epoch-test.patch Patch2: openscap-1.3.7-pr-1843-prevent-fails-of-epoch-test.patch
Patch3: openscap-1.3.7-pr-1844-prevent-fails-of-epoch-test-2.patch
BuildRequires: make BuildRequires: make
BuildRequires: cmake >= 2.6 BuildRequires: cmake >= 2.6
BuildRequires: gcc BuildRequires: gcc
@ -213,6 +214,9 @@ ln -sf ../oscap-remediate.service %{buildroot}%{_unitdir}/system-update.target.w
%{_mandir}/man8/oscap-podman.8* %{_mandir}/man8/oscap-podman.8*
%changelog %changelog
* Tue Feb 1 2022 Evgenii Kolesnikov <ekolesni@redhat.com> - 1:1.3.6-3
- Prevent fails of test_ds_misc.sh (bis)
* Mon Jan 31 2022 Evgenii Kolesnikov <ekolesni@redhat.com> - 1:1.3.6-2 * Mon Jan 31 2022 Evgenii Kolesnikov <ekolesni@redhat.com> - 1:1.3.6-2
- Fix coverity issues - Fix coverity issues
- Prevent fails of test_ds_misc.sh - Prevent fails of test_ds_misc.sh