re-import sources as agreed with the maintainer

This commit is contained in:
Adam Samalik 2023-06-29 17:08:40 +02:00
parent efcc2a7f7b
commit 00d8f3785e
8 changed files with 82 additions and 23 deletions

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/memkind-1.10.1.tar.gz
/memkind-1.10.1.tar.gz
*.tar.gz
/configure.ac.patch

View File

@ -1,21 +0,0 @@
diff --git a/configure.ac b/configure.ac
index 7c332d7..fa5a487 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,16 +159,6 @@ fi
],
[enable_secure="1"]
)
-if test "x$enable_secure" = "x1" ; then
- CFLAGS="$CFLAGS -fstack-protector"
- LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
-
- if test "$CFLAGS" != "${CFLAGS%-O0*}" ; then # if CFLAGS contains -O0
- echo "WARNING: Could not apply FORTIFY_SOURCE=2 due to lack of optimization (-O0)"
- else
- CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" #FORTITFY_SOURCE does not work with -O0 (ex. if enable_debug=1 or enable_gcov=1)
- fi
-fi
AC_SUBST([enable_secure])

View File

@ -1 +1,2 @@
SHA512 (configure.ac.patch) = 83fb5b18bee2e3179786e3440bb8648110547a8b2ebcdf7f38b5264eb9f26e2421e3095f3b7070f8b64af160264a333f9ac848d0c4ecdc38670916019d4e18b9
SHA512 (memkind-1.10.1.tar.gz) = 9fa2eed4e07d0316ee97fcdb594df4fe2e5cf44a509f658a78986aad9b4f56a9c8fbe281073b93ba3c2870734167ad29b8643d69757733fdce25e45e6f0015a0

1
tests/.fmf/version Normal file
View File

@ -0,0 +1 @@
1

9
tests/memkind-prepsource.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash -x
WORKDIR="${1}"
rpmbuild -bp $WORKDIR/*.spec --nodeps --define "_sourcedir $WORKDIR" --define "_builddir $WORKDIR/source"
mkdir $WORKDIR/temp
mv $WORKDIR/source/*/* $WORKDIR/temp/
rm -rf $WORKDIR/source/*
mv $WORKDIR/temp/* $WORKDIR/source/

26
tests/memkind-test.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
RETCODE=0
TMPTESTSFILE=/tmp/memkind-tests.log
TMPBUILDFILE=/tmp/memkind-build.log
# re-play the build
pushd source
./build.sh &> $TMPBUILDFILE
RETCODE=$?
if [ $RETCODE != 0 ]; then
cat $TMPBUILDFILE
exit $RETCODE
fi
pushd test
# run all tests filtering out those that are not meant
# to pass on a small VM
./all_tests --gtest_filter=-BATest.test_TC_MEMKIND_hbwmalloc_Pref_CheckAvailable:DlopenTest.*:HbwVerifyFunctionTest.*:NegativeTestHuge.test_TC_MEMKIND_hbwmalloc_memalign_psize_Interleave_Policy_PAGE_SIZE_2MB:HBW*.*:BATest.test_TC_MEMKIND_free_ext_MEMKIND_GBTLB_4096_bytes &> $TMPTESTSFILE
RETCODE=$?
if [ $RETCODE != 0 ]; then
cat $TMPTESTSFILE
fi
exit $RETCODE

5
tests/provision.fmf Normal file
View File

@ -0,0 +1,5 @@
---
standard-inventory-qcow2:
qemu:
m: 4G

38
tests/tests.yml Normal file
View File

@ -0,0 +1,38 @@
---
- hosts: localhost
tags:
- classic
vars:
# standard-test-basic directory for tests are relative to {{ tenv_workdir }}
tenv_workdir: /var/str
pre_tasks:
- import_role:
name: standard-test-source
vars:
fetch_only: True
- name: Copy files including source to test environment
synchronize:
src: "{{ playbook_dir }}/.."
dest: "{{ tenv_workdir }}"
mode: push
ssh_args: "-o UserKnownHostsFile=/dev/null"
roles:
- role: standard-test-basic
required_packages:
- automake
- libtool
- numactl-devel
- systemd
- gcc
- gcc-c++
- make
- gawk
- python3
- rpm-build
tests:
- prepare-source:
dir: ./
run: ./memkind-prepsource.sh "{{tenv_workdir}}"
- memkind_test:
dir: ./
run: ./memkind-test.sh