Compare commits
1 commit
main
...
scripts-sm
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
796bab9b45 |
17 changed files with 3 additions and 341 deletions
|
|
@ -1,13 +0,0 @@
|
|||
summary: Test that valgrind does not do overlap checks for memmove
|
||||
contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
|
||||
component:
|
||||
- valgrind
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- valgrind
|
||||
- gcc
|
||||
duration: 5m
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2214375
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2214374
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
volatile char *s;
|
||||
|
||||
char *
|
||||
__memcpy_chk(char *d, const char *s, size_t n, size_t dn);
|
||||
|
||||
char *
|
||||
__memmove_chk(char *d, const char *s, size_t n, size_t dn);
|
||||
|
||||
int main(int argc,const char *argv[])
|
||||
{
|
||||
char buffer[100];
|
||||
__memcpy_chk(buffer, &buffer[20], 9, 100);
|
||||
__memmove_chk(buffer, &buffer[1], 99, 100);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
||||
rlRun "cp reproducer.c $tmp"
|
||||
rlRun "pushd $tmp"
|
||||
rlRun "set -o pipefail"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "gcc -Wno-builtin-declaration-mismatch -g -o reproducer reproducer.c"
|
||||
|
||||
rlRun "valgrind ./reproducer 2> output.log" 0 "Running reproducer"
|
||||
rlAssertNotGrep "overlap in memcpy_chk" output.log
|
||||
rlAssertGrep "ERROR SUMMARY: 0 errors from 0 contexts " output.log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $tmp" 0 "Remove tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
#include <nss.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern int NSS_NoDB_Init(void*);
|
||||
|
||||
int main()
|
||||
{
|
||||
NSS_NoDB_Init(NULL);
|
||||
|
|
|
|||
|
|
@ -45,10 +45,6 @@ adjust:
|
|||
- enabled: false
|
||||
when: arch != x86_64
|
||||
|
||||
# No i686 in RHEL-10+
|
||||
- enabled: false
|
||||
when: distro >= rhel-10
|
||||
|
||||
# Testing farm does not support installing i686 packages in bodhi update testing,
|
||||
# so we disable this test there until that capacity is implemented.
|
||||
- enabled: false
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
summary: Test ioctl(KVM_CREATE_VM) in s390x
|
||||
description: >
|
||||
KVM guests on s390x need PGSTE enabled to be created. If valgrind runs a
|
||||
binary that creates a guest, it also need PGSTE enabled or the VM creation
|
||||
would fail.
|
||||
contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
|
||||
component:
|
||||
- valgrind
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- valgrind
|
||||
- gcc
|
||||
duration: 5m
|
||||
link:
|
||||
- relates: https://bugs.kde.org/show_bug.cgi?id=470978
|
||||
|
||||
adjust:
|
||||
- because: "Test applicable to s390x only"
|
||||
enabled: false
|
||||
when: arch != s390x
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/kvm.h>
|
||||
|
||||
int main(){
|
||||
int result = 0;
|
||||
|
||||
int kvm_fd = open("/dev/kvm", O_RDWR);
|
||||
if (kvm_fd < 0) {
|
||||
perror("open /dev/kvm failed");
|
||||
result = -1;
|
||||
}
|
||||
|
||||
int vm_fd;
|
||||
do {
|
||||
vm_fd = ioctl(kvm_fd, KVM_CREATE_VM, 0);
|
||||
} while( vm_fd == -1 && errno == EINTR);
|
||||
|
||||
if( vm_fd < 0){
|
||||
perror ("ioctl KVM_CREATE_VM failed");
|
||||
result = -1;
|
||||
}
|
||||
|
||||
if (kvm_fd >= 0) close(kvm_fd);
|
||||
if (vm_fd >=0) close(vm_fd);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
||||
rlRun "cp reproducer.c $tmp"
|
||||
rlRun "pushd $tmp"
|
||||
rlRun "set -o pipefail"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "gcc -g -o reproducer reproducer.c -Wl,--s390-pgste"
|
||||
|
||||
rlRun "./reproducer 2> output.log" 0 "Running reproducer"
|
||||
rlAssertNotGrep "ioctl KVM_CREATE_VM failed" output.log
|
||||
|
||||
rlRun "valgrind ./reproducer 2> output.log" 0 "Running with valgrind"
|
||||
rlAssertNotGrep "ioctl KVM_CREATE_VM failed" output.log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $tmp" 0 "Remove tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
__attribute__((section(".rodatac")))
|
||||
const char * const constchars = "abcde";
|
||||
__attribute__((section(".rodatan")))
|
||||
const char * const constnums = "123";
|
||||
|
||||
int main () {
|
||||
const char * const constmain = "mainmainmain";
|
||||
char *leak = (char*) malloc(16);
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
summary: Test contiguous rodata sections are processed correctly
|
||||
description: |
|
||||
"Valgrind should process contiguous rodata segments as different sections
|
||||
instead of merging them together"
|
||||
contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
|
||||
test: ./test.sh
|
||||
framework: beakerlib
|
||||
duration: 5m
|
||||
require:
|
||||
- valgrind
|
||||
- elfutils
|
||||
- gcc
|
||||
tier: 1
|
||||
link:
|
||||
- verifies: https://issues.redhat.com/browse/RHEL-18086
|
||||
- relates: https://bugs.kde.org/show_bug.cgi?id=476548
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
||||
rlRun "cp hello.c $tmp"
|
||||
rlRun "pushd $tmp"
|
||||
rlRun "set -o pipefail"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "gcc -g -o test hello.c"
|
||||
rlRun "eu-strip -o t.exec -f t.debug test"
|
||||
rlRun "valgrind --log-file=valgrind.output ./t.exec"
|
||||
rlAssertNotGrep "Assertion 'di->rodata_size == a_shdr.sh_size' failed" valgrind.output
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $tmp" 0 "Remove tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
|
|
@ -26,10 +26,6 @@ adjust:
|
|||
- enabled: false
|
||||
when: arch != x86_64
|
||||
|
||||
# No i686 in RHEL-10+
|
||||
- enabled: false
|
||||
when: distro >= rhel-10
|
||||
|
||||
# Testing farm does not support installing i686 packages in bodhi update testing,
|
||||
# so we disable this test there until that capacity is implemented.
|
||||
- enabled: false
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
summary: Make sure dnf installs weak dep packages (such as valgrind + valgrind-scripts)
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- rpm-build
|
||||
- createrepo
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
#!/bin/bash
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
DNFSWITCHES="--disablerepo=\* --enablerepo=mytestingrepo"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "dnf -y remove trivial-empty\* ||:"
|
||||
rlRun "rm /etc/yum.repos.d/mytestingrepo.repo ||:"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "rpmbuild -ba trivial-empty-v1.spec"
|
||||
rlRun "rpmbuild -ba trivial-empty-v2.spec"
|
||||
rlRun "a=$(rpm -E '%_arch')"
|
||||
rlRun "pushd $HOME/rpmbuild/RPMS/$a"
|
||||
rlRun "createrepo ."
|
||||
rlRun "popd"
|
||||
rlRun "rpm -Uvh --nosignature $HOME/rpmbuild/RPMS/$a/trivial-empty-1.0-1*"
|
||||
rlRun "rpm -qa | grep -F trivial-empty-sub" 1
|
||||
rlRun "rpm -qa | grep -F trivial-empty-1.0-1"
|
||||
rlRun "rpm -qa | grep -F trivial-empty-1.0-2" 1
|
||||
cat > /etc/yum.repos.d/mytestingrepo.repo <<EOF
|
||||
[mytestingrepo]
|
||||
name=mytestingrepo
|
||||
baseurl=file:///$HOME/rpmbuild/RPMS/$a
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
EOF
|
||||
rlRun "cat /etc/yum.repos.d/mytestingrepo.repo"
|
||||
rlRun "dnf $DNFSWITCHES clean all"
|
||||
rlRun "dnf $DNFSWITCHES -y update trivial-empty"
|
||||
rlRun "rpm -qa | grep -F trivial-empty-1.0-1" 1
|
||||
rlRun "rpm -qa | grep -F trivial-empty-1.0-2"
|
||||
# The gist of this test is to make sure the following
|
||||
# trivial-empty-sub-1.0-2 is now installed as a weak dep
|
||||
rlRun "rpm -qa | grep -F trivial-empty-sub-1.0-2"
|
||||
# Since it's a weak dep, it should be possible to remove
|
||||
# trivial-empty-sub now, and the trivial-empty should still
|
||||
# be installed
|
||||
rlRun "dnf $DNFSWITCHES remove -y trivial-empty-sub"
|
||||
rlRun "rpm -qa | grep -F trivial-empty-1.0-2"
|
||||
rlRun "rpm -qa | grep -F trivial-empty-sub-1.0-2" 1
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "dnf -y remove trivial-empty\*"
|
||||
rlRun "rm /etc/yum.repos.d/mytestingrepo.repo"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
Name: trivial-empty
|
||||
Version: 1.0
|
||||
Release: 1%{?dist}
|
||||
Epoch: 1
|
||||
Summary: A trivial RPM package with an empty payload
|
||||
|
||||
License: MIT
|
||||
BuildArch: %_arch
|
||||
|
||||
# Description of the package
|
||||
%description
|
||||
This is a trivial RPM package with no payload. It serves as an example
|
||||
of how to create an RPM specfile with minimal content.
|
||||
|
||||
# Prep stage: nothing to prepare
|
||||
%prep
|
||||
# Empty section
|
||||
|
||||
# Build stage: nothing to build
|
||||
%build
|
||||
# Empty section
|
||||
|
||||
# Install stage: nothing to install
|
||||
%install
|
||||
# Empty section
|
||||
|
||||
# Files: no files to include
|
||||
%files
|
||||
# Empty section
|
||||
|
||||
# Changelog for the RPM package
|
||||
%changelog
|
||||
* Thu Jan 16 2025 Example Maintainer <example@example.com> - 1.0-1
|
||||
- Initial creation of a trivial RPM with no payload
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
Name: trivial-empty
|
||||
Version: 1.0
|
||||
Release: 2%{?dist}
|
||||
Epoch: 1
|
||||
Summary: A trivial RPM package with an empty payload
|
||||
|
||||
License: MIT
|
||||
BuildArch: %_arch
|
||||
|
||||
# Set weak dependency on trivial-empty-sub which is a new subpackage
|
||||
# introduced within this update
|
||||
Recommends: trivial-empty-sub = %{epoch}:%{version}-%{release}
|
||||
# Requires: trivial-empty-sub = %{epoch}:%{version}-%{release}
|
||||
|
||||
# Description of the package
|
||||
%description
|
||||
This is a trivial RPM package with no payload. It serves as an example
|
||||
of how to create an RPM specfile with minimal content.
|
||||
|
||||
%package sub
|
||||
Summary: A trivial RPM subpackage with an empty payload
|
||||
# Description for the subpackage
|
||||
%description sub
|
||||
This is a subpackage of trivial-empty, with an empty payload.
|
||||
|
||||
# Prep stage: nothing to prepare
|
||||
%prep
|
||||
# Empty section
|
||||
|
||||
# Build stage: nothing to build
|
||||
%build
|
||||
# Empty section
|
||||
|
||||
# Install stage: nothing to install
|
||||
%install
|
||||
# Empty section
|
||||
|
||||
# Files: no files to include
|
||||
%files
|
||||
# Empty section
|
||||
|
||||
# Subpackage files: no files to include
|
||||
%files sub
|
||||
# Empty section
|
||||
|
||||
# Changelog for the RPM package
|
||||
%changelog
|
||||
* Thu Jan 16 2025 Example Maintainer <example@example.com> - 1.0-2
|
||||
- Initial creation of the trivial RPM with no payload
|
||||
|
||||
* Thu Jan 16 2025 Example Maintainer <example@example.com> - 1.0-1
|
||||
- Initial creation of a trivial RPM with no payload
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
VERSION=$(rpm -q --queryformat="%{version}" valgrind.$(uname -m))
|
||||
VERSION=$(rpm -q --queryformat="%{version}" valgrind)
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
||||
|
|
@ -13,12 +13,12 @@ rlJournalStart
|
|||
rlPhaseStartTest
|
||||
for prog in $(rpm -ql valgrind | grep ^/usr/bin); do
|
||||
if file $prog | grep -q ELF; then
|
||||
rlLogDebug "Skipping ELF executable ${prog}"
|
||||
rlLogDebug "Skipping ELF executable"
|
||||
continue
|
||||
fi
|
||||
|
||||
LOGFILE="$(basename $prog).log"
|
||||
if ${prog} --version &> $LOGFILE; then
|
||||
if $prog --version &> $LOGFILE; then
|
||||
rlPass "[ok] $prog"
|
||||
continue
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue