Compare commits

..

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

11 changed files with 459 additions and 5 deletions

View File

@ -1 +1 @@
4c12221340bcf13cdce65267d08bd9c1413ece2c SOURCES/genwqe-user-4.0.20.tar.gz
4c12221340bcf13cdce65267d08bd9c1413ece2c genwqe-user-4.0.20.tar.gz

4
.gitignore vendored
View File

@ -1 +1,3 @@
SOURCES/genwqe-user-4.0.20.tar.gz
/v4.0.17.tar.gz
/genwqe-user-4.0.18.tar.gz
/genwqe-user-4.0.20.tar.gz

1
dead.package Normal file
View File

@ -0,0 +1 @@
genwqe-tools package is retired on c9s for CS-743

View File

@ -23,16 +23,19 @@
Summary: GenWQE userspace tools
Name: genwqe-tools
Version: 4.0.20
Release: 5%{?dist}
Release: 14%{?dist}
License: ASL 2.0
URL: https://github.com/ibm-genwqe/genwqe-user/
BuildRequires: gcc
BuildRequires: zlib-devel >= 1.2.7
BuildRequires: help2man
%ifarch %{power64}
BuildRequires: libcxl-devel
%endif
BuildRequires: make
Source0: https://github.com/ibm-genwqe/genwqe-user/archive/v%{version}.tar.gz#/genwqe-user-%{version}.tar.gz
Patch0: genwqe-user-4.0.18-install-gzFile_test.patch
Patch1: genwqe-user-4.0.20-glibc-2.30-gettid-naming-conflict.patch
Requires: genwqe-zlib = %{version}-%{release}
%description
@ -86,8 +89,7 @@ rm %{buildroot}%{_libdir}/genwqe/libz.*
mv %{buildroot}%{_libdir}/genwqe/* %{buildroot}%{_libdir}/
rmdir %{buildroot}%{_libdir}/genwqe/
%post -n genwqe-zlib -p /sbin/ldconfig
%postun -n genwqe-zlib -p /sbin/ldconfig
%ldconfig_scriptlets -n genwqe-zlib
%files -n genwqe-tools
%license LICENSE
@ -151,6 +153,34 @@ rmdir %{buildroot}%{_libdir}/genwqe/
%{_libdir}/*.a
%changelog
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 4.0.20-14
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.20-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.20-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.20-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jan 23 2020 Than Ngo <than@redhat.com> - 4.0.20-10
- renames gettid() to sys_gettid()
- adds gating tests
* Wed Oct 23 2019 Than Ngo <than@redhat.com> - 4.0.20-9
- FTBFS, do not define gettid if glibc >= 2.30
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.20-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.20-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.20-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed May 23 2018 Than Ngo <than@redhat.com> - 4.0.20-5
- add explicit package version requirement
- fix multilib regression in man pages

View File

@ -0,0 +1,293 @@
diff -up genwqe-user-4.0.20/lib/card_defs.h.me genwqe-user-4.0.20/lib/card_defs.h
--- genwqe-user-4.0.20/lib/card_defs.h.me 2020-01-22 16:19:20.402193318 +0100
+++ genwqe-user-4.0.20/lib/card_defs.h 2020-01-22 16:24:19.363948393 +0100
@@ -32,19 +32,19 @@
#include <unistd.h>
#include <sys/syscall.h> /* For SYS_xxx definitions */
-static inline pid_t gettid(void)
+static inline pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
#define pr_err(fmt, ...) \
fprintf(stderr, "%08x.%08x %s:%u: Error: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, ## __VA_ARGS__)
+ getpid(), sys_gettid(), __FILE__, __LINE__, ## __VA_ARGS__)
#define pr_warn(fmt, ...) do { \
if (_dbg_flag) \
fprintf(stderr, "%08x.%08x %s:%u: Warn: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
@@ -56,7 +56,7 @@ static inline pid_t gettid(void)
#define pr_info(fmt, ...) do { \
if (_dbg_flag) \
fprintf(stderr, "%08x.%08x %s:%u: Info: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
diff -up genwqe-user-4.0.20/lib/ddcb_capi.c.me genwqe-user-4.0.20/lib/ddcb_capi.c
--- genwqe-user-4.0.20/lib/ddcb_capi.c.me 2020-01-22 16:18:44.625864311 +0100
+++ genwqe-user-4.0.20/lib/ddcb_capi.c 2020-01-22 16:24:09.547857765 +0100
@@ -61,7 +61,7 @@ extern FILE *libddcb_fd_out;
#include <sys/syscall.h> /* For SYS_xxx definitions */
-static inline pid_t gettid(void)
+static inline pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
@@ -69,25 +69,25 @@ static inline pid_t gettid(void)
#define VERBOSE0(fmt, ...) do { \
if (libddcb_fd_out) \
fprintf(libddcb_fd_out, "%08x.%08x: " fmt, \
- getpid(), gettid(), ## __VA_ARGS__); \
+ getpid(), sys_gettid(), ## __VA_ARGS__); \
} while (0)
#define VERBOSE1(fmt, ...) do { \
if (libddcb_fd_out && (libddcb_verbose > 0)) \
fprintf(libddcb_fd_out, "%08x.%08x: " fmt, \
- getpid(), gettid(), ## __VA_ARGS__); \
+ getpid(), sys_gettid(), ## __VA_ARGS__); \
} while (0)
#define VERBOSE2(fmt, ...) do { \
if (libddcb_fd_out && (libddcb_verbose > 1)) \
fprintf(libddcb_fd_out, "%08x.%08x: " fmt, \
- getpid(), gettid(), ## __VA_ARGS__); \
+ getpid(), sys_gettid(), ## __VA_ARGS__); \
} while (0)
#define VERBOSE3(fmt, ...) do { \
if (libddcb_fd_out && (libddcb_verbose > 3)) \
fprintf(libddcb_fd_out, "%08x.%08x: " fmt, \
- getpid(), gettid(), ## __VA_ARGS__); \
+ getpid(), sys_gettid(), ## __VA_ARGS__); \
} while (0)
#define __free(ptr) free((ptr))
diff -up genwqe-user-4.0.20/lib/hw_defs.h.me genwqe-user-4.0.20/lib/hw_defs.h
--- genwqe-user-4.0.20/lib/hw_defs.h.me 2020-01-22 16:23:17.373376030 +0100
+++ genwqe-user-4.0.20/lib/hw_defs.h 2020-01-22 16:24:02.595793576 +0100
@@ -33,7 +33,7 @@
# define ABS(a) (((a) < 0) ? -(a) : (a))
#endif
-static inline pid_t gettid(void)
+static inline pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
@@ -44,14 +44,14 @@ extern FILE *zedc_log;
#define pr_err(fmt, ...) do { \
if (zedc_log) \
fprintf(zedc_log, "%08x.%08x %s:%u: Error: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
#define pr_warn(fmt, ...) do { \
if (zedc_log) \
fprintf(zedc_log, "%08x.%08x %s:%u: Warn: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
@@ -63,14 +63,14 @@ extern FILE *zedc_log;
#define pr_info(fmt, ...) do { \
if (zedc_log && zedc_dbg) \
fprintf(zedc_log, "%08x.%08x %s:%u: Info: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
#define pr_log(dbg, fmt, ...) do { \
if (zedc_log && (dbg)) \
fprintf(zedc_log, "%08x.%08x %s:%u: Info: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
diff -up genwqe-user-4.0.20/misc/zpipe_append.c.me genwqe-user-4.0.20/misc/zpipe_append.c
--- genwqe-user-4.0.20/misc/zpipe_append.c.me 2020-01-22 16:24:32.062065638 +0100
+++ genwqe-user-4.0.20/misc/zpipe_append.c 2020-01-22 16:25:35.884654925 +0100
@@ -61,7 +61,7 @@ static unsigned int CHUNK_i = 16 * 1024;
static unsigned int CHUNK_o = 16 * 1024; /* 16384; */
static int _pattern = 0;
-static inline pid_t gettid(void)
+static inline pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
diff -up genwqe-user-4.0.20/misc/zpipe_mt.c.me genwqe-user-4.0.20/misc/zpipe_mt.c
--- genwqe-user-4.0.20/misc/zpipe_mt.c.me 2020-01-22 16:25:05.510374476 +0100
+++ genwqe-user-4.0.20/misc/zpipe_mt.c 2020-01-22 16:27:10.566529136 +0100
@@ -126,7 +126,7 @@ static int pin_to_cpu(int run_cpu)
return run_cpu;
}
-static pid_t gettid(void)
+static pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
@@ -178,7 +178,7 @@ static int check_for_pattern(const unsig
"it=%d: %d or more times \"%02x\" "
"at %016lx!\n",
(unsigned long)getpid(),
- (unsigned long)gettid(),
+ (unsigned long)sys_gettid(),
(unsigned long)in,
(unsigned long)out,
it, zeros, pattern,
@@ -253,11 +253,11 @@ static int def(struct thread_data *d, FI
strm.next_out = out;
memset(strm.next_out, 0xF0, chunk_o);
if (chunk_o >= 8)
- *((uint32_t *)&out[4]) = gettid();
+ *((uint32_t *)&out[4]) = sys_gettid();
pr_dbg(3, "%08lx.%08lx 1) %02x%02x%02x%02x%02x ...\n",
(unsigned long)getpid(),
- (unsigned long)gettid(),
+ (unsigned long)sys_gettid(),
out[0], out[1], out[2], out[3], out[4]);
ret = deflate(&strm, flush); /* no bad ret value */
@@ -267,7 +267,7 @@ static int def(struct thread_data *d, FI
pr_dbg(3, "%08lx.%08lx 2) %02x%02x%02x%02x%02x ...\n",
(unsigned long)getpid(),
- (unsigned long)gettid(),
+ (unsigned long)sys_gettid(),
out[0], out[1], out[2], out[3], out[4]);
if (check_for_pattern(out, have, nr, in, out, 0x00) ||
@@ -488,16 +488,16 @@ static void *libz_thread(void *data)
char i_fname[64], o_fname[64], n_fname[64];
char diff_cmd[128];
- d->tid = gettid();
+ d->tid = sys_gettid();
d->cpu = sched_getcpu();
for (i = 0; (i < (unsigned int)count) && (exit_on_err == 0); i++) {
unsigned int j;
int new_cpu;
- sprintf(i_fname, "i_%08x_%08x_%d.bin", getpid(), gettid(), i);
- sprintf(o_fname, "o_%08x_%08x_%d.bin", getpid(), gettid(), i);
- sprintf(n_fname, "n_%08x_%08x_%d.bin", getpid(), gettid(), i);
+ sprintf(i_fname, "i_%08x_%08x_%d.bin", getpid(), sys_gettid(), i);
+ sprintf(o_fname, "o_%08x_%08x_%d.bin", getpid(), sys_gettid(), i);
+ sprintf(n_fname, "n_%08x_%08x_%d.bin", getpid(), sys_gettid(), i);
i_fp = fopen(i_fname, "w+");
for (j = 0, len = 0; len < data_size; j++) {
@@ -534,7 +534,7 @@ static void *libz_thread(void *data)
exit(EXIT_FAILURE);
pr_dbg(3, "%08x.%08x %d. compressing ...\n",
- getpid(), gettid(), i);
+ getpid(), sys_gettid(), i);
rc = def(d, i_fp, o_fp, Z_DEFAULT_COMPRESSION, i);
if (rc != Z_OK) {
@@ -549,7 +549,7 @@ static void *libz_thread(void *data)
new_cpu = sched_getcpu();
if (d->cpu != new_cpu) {
pr_dbg(1, "%08x.%08x CPU moved from %d to %d\n",
- getpid(), gettid(), d->cpu, new_cpu);
+ getpid(), sys_gettid(), d->cpu, new_cpu);
d->cpu = new_cpu;
}
@@ -558,7 +558,7 @@ static void *libz_thread(void *data)
d->compressions++;
pr_dbg(3, "%08x.%08x %d. decompressing ...\n",
- getpid(), gettid(), i);
+ getpid(), sys_gettid(), i);
o_fp = fopen(o_fname, "r"); /* original data */
if (o_fp == NULL)
@@ -573,7 +573,7 @@ static void *libz_thread(void *data)
error_trigger();
fprintf(stderr, "%08x.%08x err/inf: rc=%d %s %s %s\n",
- getpid(), gettid(), rc,
+ getpid(), sys_gettid(), rc,
i_fname, o_fname, n_fname);
zerr(rc);
@@ -582,7 +582,7 @@ static void *libz_thread(void *data)
rc = system(diff_cmd);
if (rc != 0)
fprintf(stderr, "%08x.%08x %s: %d\n",
- getpid(), gettid(),
+ getpid(), sys_gettid(),
strerror(errno), errno);
goto exit_failure;
@@ -605,7 +605,7 @@ static void *libz_thread(void *data)
error_trigger();
fprintf(stderr, "%08x.%08x In %s and Out %s differ!\n",
- getpid(), gettid(), i_fname, n_fname);
+ getpid(), sys_gettid(), i_fname, n_fname);
goto exit_failure;
}
diff -up genwqe-user-4.0.20/tools/zlib_mt_perf.c.me genwqe-user-4.0.20/tools/zlib_mt_perf.c
--- genwqe-user-4.0.20/tools/zlib_mt_perf.c.me 2020-01-22 16:27:23.608649564 +0100
+++ genwqe-user-4.0.20/tools/zlib_mt_perf.c 2020-01-22 16:28:09.166070205 +0100
@@ -162,7 +162,7 @@ static int pin_to_cpu(int run_cpu)
return run_cpu;
}
-static pid_t gettid(void)
+static pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
@@ -492,7 +492,7 @@ static void *libz_thread_defl(void *data
d->defl_total=0;
d->defl_time=0;
d->comp_calls=0;
- d->tid = gettid();
+ d->tid = sys_gettid();
d->cpu = sched_getcpu();
d->first_run = true;
d->checksum = 0;
@@ -533,7 +533,7 @@ static void *libz_thread_infl(void *data
d->infl_total = 0;
d->infl_time = 0;
d->decomp_calls = 0;
- d->tid = gettid();
+ d->tid = sys_gettid();
d->cpu = sched_getcpu();
d->first_run = true;
d->checksum = 0;
@@ -550,7 +550,7 @@ static void *libz_thread_infl(void *data
rc = infl(d, c_fp);
if (rc != Z_OK) {
fprintf(stderr, "%08x.%08x err/inf: rc=%d %s\n",
- getpid(), gettid(), rc, c_fname);
+ getpid(), sys_gettid(), rc, c_fname);
zerr(rc);
goto exit_failure;
}

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (genwqe-user-4.0.20.tar.gz) = 43ba0c03fba2d1705147d907101a10dbcfe39c78e92ec68e57a5175112c517082c0763f50ff37beb76e8db41634b73f30be7469013985006d88289ca9cf1ad74

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/genwqe-tools/Sanity-test-for-genwqe-tools
# Description: Sanity test
# Author: Brock Organ <borgan@redhat.com>
# Than Ngo <than@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/genwqe-tools/Sanity-test-for-genwqe-tools
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Than Ngo <than@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Sanity test" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 30m" >> $(METADATA)
@echo "RunFor: genwqe-tools" >> $(METADATA)
@echo "Requires: coreutils man-db" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: ASL 2.0" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,7 @@
PURPOSE of /CoreOS/genwqe-tools/Sanity-test-for-genwqe-tools
Description: smoke test, funktion test for CI gating
Author: Than Ngo <than@redhat.com>
tests following scenarios:
* smoke test
* funktion test

View File

@ -0,0 +1,44 @@
#! /bin/sh
# genwqe-tools basics
PACKAGES="genwqe-tools"
# SERVICES=""
# source the test script helpers
# requires beakerlib package
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
for p in $PACKAGES ; do
rlAssertRpm $p
done
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest "Smoke, sanity and function tests"
rlRun "genwqe_cksum --version" 0 "version check"
rlRun "genwqe_echo --version" 0 "version check"
rlRun "genwqe_ffdc --version" 0 "version check"
rlRun "genwqe_gunzip --version" 0 "version check"
rlRun "genwqe_memcopy --version" 0 "version check"
rlRun "genwqe_peek --version" 0 "version check"
rlRun "genwqe_poke --version" 0 "version check"
rlRun "genwqe_update --version" 0 "version check"
rlRun "zlib_mt_perf --version" 0 "version check"
# check man page
for m in genwqe_cksum genwqe_echo genwqe_ffdc genwqe_gunzip genwqe_gzip genwqe_memcopy genwqe_mt_perf genwqe_peek genwqe_poke genwqe_test_gz genwqe_update gzFile_test zlib_mt_perf ; do
rlRun "man -P head $m" 0 "Show the $m man page"
done
# check for sane license and readme file
rlRun "head /usr/share/licenses/genwqe-tools/LICENSE" 0 "Check for license file"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -fr $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

12
tests/tests.yml Normal file
View File

@ -0,0 +1,12 @@
---
# Run tests in all contexts
- hosts: localhost
tags:
- classic
roles:
- role: standard-test-beakerlib
tests:
- Sanity-test-for-genwqe-tools
required_packages:
- genwqe-tools
- man-db