Compare commits

...
Sign in to create a new pull request.

21 commits

Author SHA1 Message Date
Martin Cermak
d071621a56 Drop vim modeline, add rpm --nosignature to override new (and unrelated) default. 2026-04-15 09:07:57 +02:00
Martin Cermak
064b95ec27 Sanity/install-weak-deps: Additional check for weak deps 2025-01-17 13:24:25 +01:00
Martin Cermak
36937a99b2 New test: /Sanity/install-weak-deps 2025-01-17 12:25:03 +01:00
Jesus Checa Hidalgo
bc3f003633 Update relevancies for rhel 10 2024-06-26 17:31:27 +02:00
Jesus Checa Hidalgo
89d13e8a13 bz580078-valgrind-aborts-with-vex-x86...: Fix gcc 14 warnings 2024-05-02 16:07:53 +02:00
Jesus Checa Hidalgo
c09b147011 kde476548-contiguous-rodata-sections: Fix missing = sign in valgrind command 2023-12-11 15:14:42 +01:00
Jesus Checa Hidalgo
3fff9515b7 kde476548-contiguous-rodata-sections: no newline at end of file 2023-12-11 14:56:51 +01:00
Jesus Checa Hidalgo
1305cb443f kde476548-contiguous-rodata-sections: create test 2023-12-11 14:51:45 +01:00
Jesus Checa Hidalgo
159dc40294 Regression/bz2214375-memmove_chk-seen-as-memcpy_chk: create test 2023-06-26 21:01:03 +02:00
Jesus Checa Hidalgo
7e9a23a156 Sanity/valgrind-scripts-smoke: Fix bug in version string when multilib pkgs are installed. 2023-06-26 20:20:13 +02:00
Jesus Checa Hidalgo
c11e6cd3ac Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste: create test 2023-06-23 17:13:54 +02:00
Jesus Checa Hidalgo
6b6fc44452 Sanity/valgrind-scripts-smoke: Sanity test to check that the script are usable 2023-06-14 16:30:00 +02:00
Jesus Checa Hidalgo
a734e52212 Disable bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes
and 32bit-on-64bit-os in Bodhi gating test as testing farm cannot
install the 32-bit packages needed.
2023-04-24 16:46:26 +02:00
Jesus Checa Hidalgo
1156673114 Sanity/does-Image-Magick-works-under-valgrind/runtest.sh:
Remove radial-blur option from test. In some versions is replaced
with rotational-blur and this can make the test unstable.
2023-04-24 14:33:19 +02:00
Jesus Checa Hidalgo
69141adef6 Regression/bz2081583-missing-strncmp-intercept-for-ld-so: Update nitrate metadata 2022-05-27 13:20:44 +02:00
Jesus Checa Hidalgo
fb10ef9633 Regression/bz2081583-missing-strncmp-intercept-for-ld-so: Add test 2022-05-24 16:27:55 +02:00
Jesus Checa Hidalgo
9b54e0088a Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns: Update nitrate metadata 2022-04-27 12:13:36 +02:00
Jesus Checa Hidalgo
7b31ff21db Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns: Update nitrate metadata 2022-04-27 11:35:31 +02:00
Jesus Checa Hidalgo
a0cf0f365e Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns: Add test 2022-04-27 11:21:39 +02:00
Jesus Checa Hidalgo
893f69f5fa Sanity/does-Image-Magick-works-under-valgrind: ImageMagick is not distributed in RHEL8 and newer. Update relevancy 2022-04-26 11:44:13 +02:00
Jesus Checa Hidalgo
77b4c23e49 Update contact mail in all tests 2022-04-13 17:40:00 +02:00
35 changed files with 546 additions and 14 deletions

View file

@ -2,7 +2,7 @@ summary: Test for BZ#1024162 (valgrind causes crashes in signal handlers on)
description: | description: |
Bug summary: valgrind causes crashes in signal handlers on x86_64 Bug summary: valgrind causes crashes in signal handlers on x86_64
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1024162 Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1024162
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh

View file

@ -2,7 +2,7 @@ summary: Test for BZ#1305962 (Valgrind reports uninitialised byte(s) in futex)
description: | description: |
Bug summary: Valgrind reports uninitialised byte(s) in futex Bug summary: Valgrind reports uninitialised byte(s) in futex
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1305962 Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1305962
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh

View file

@ -2,7 +2,7 @@ summary: Test for BZ#1584654 (valgrind utimensat should ignore timespec tv_sec)
description: | description: |
valgrind utimensat should ignore timespec tv_sec when tv_nsec valgrind utimensat should ignore timespec tv_sec when tv_nsec
is UTIME_NOW or UTIME_OMIT is UTIME_NOW or UTIME_OMIT
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh

View file

@ -0,0 +1,27 @@
summary: ppc64le vpermq insn vex temp storage exhausted
description: Test that ppc64le vector instructions don't exhaust vex temp storage
contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component:
- valgrind
test: ./runtest.sh
framework: beakerlib
require:
- gcc
link:
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2067187
duration: 5m
tier: 1
tag:
- CI-Tier-1
adjust:
- enabled: false
when: arch != ppc64le
continue: false
- test: scl enable $COLLECTIONS -- ./runtest.sh
when: collection is defined
- require+:
- valgrind
when: collection is not defined
extra-nitrate: TC#0613214
extra-summary: /tools/valgrind/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns
extra-task: /tools/valgrind/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns

View file

@ -0,0 +1,27 @@
#!/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 vbpermq_test.c $tmp"
rlRun "pushd $tmp"
rlRun "set -o pipefail"
rlPhaseEnd
rlPhaseStartTest
rlRun "gcc vbpermq_test.c -o vbpermq_test" 0 "Building reproducer"
rlRun "valgrind --log-file=valgrind.out ./vbpermq_test"
rlLog "$(cat valgrind.out)"
rlAssertNotGrep "VEX temporary storage exhausted." valgrind.out
rlAssertNotGrep "impossible' happened" valgrind.out
# Ensure valgrind finished clean
rlAssertGrep "ERROR SUMMARY: 0 errors from 0 contexts" valgrind.out
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd

View file

@ -0,0 +1,8 @@
int main(){
asm("vbpermq 6,6,10");
asm("vbpermq 7,7,10");
asm("vbpermq 8,8,10");
asm("vbpermq 9,9,10");
asm("vbpermq 10,10,10");
return 0;
}

View file

@ -0,0 +1,8 @@
#include <iconv.h>
int main(void)
{
iconv_t fd = iconv_open("UTF-8", "EUC-JP");
iconv_close(fd);
return 0;
}

View file

@ -0,0 +1,27 @@
summary: Test strncmp intercept for ld.so
contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component:
- valgrind
test: ./runtest.sh
framework: beakerlib
require:
- gcc
link:
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2086540
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2081583
duration: 5m
tier: 1
tag:
- CI-Tier-1
adjust:
- enabled: false
when: distro < rhel-9
continue: false
- test: scl enable $COLLECTIONS -- ./runtest.sh
when: collection is defined
- require+:
- valgrind
when: collection is not defined
extra-nitrate: TC#0613680
extra-summary: /tools/valgrind/Regression/bz2081583-missing-strncmp-intercept-for-ld-so
extra-task: /tools/valgrind/Regression/bz2081583-missing-strncmp-intercept-for-ld-so

View file

@ -0,0 +1,29 @@
#!/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 iconv_test.c $tmp/"
rlRun "pushd $tmp"
rlRun "set -o pipefail"
rlPhaseEnd
rlPhaseStartTest
rlRun "gcc -o iconv_test iconv_test.c"
rlRun "valgrind --log-file=valgrind.out ./iconv_test"
rlAssertNotGrep "Invalid read of size" valgrind.out
rlAssertNotGrep "strncmp" valgrind.out
# Ensure valgrind finished clean
if ! rlAssertGrep "ERROR SUMMARY: 0 errors from 0 contexts" valgrind.out;
then
rlLog "`cat valgrind.out`"
fi
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd

View file

@ -0,0 +1,13 @@
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

View file

@ -0,0 +1,18 @@
#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;
}

View file

@ -0,0 +1,25 @@
#!/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

View file

@ -1,6 +1,6 @@
summary: Test adjtimex syscall support summary: Test adjtimex syscall support
description: Ensure adjtimex wrapper works in readonly adjtime mode description: Ensure adjtimex wrapper works in readonly adjtime mode
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh

View file

@ -1,6 +1,8 @@
#include <nss.h> #include <nss.h>
#include <stdlib.h> #include <stdlib.h>
extern int NSS_NoDB_Init(void*);
int main() int main()
{ {
NSS_NoDB_Init(NULL); NSS_NoDB_Init(NULL);

View file

@ -1,6 +1,6 @@
summary: makes sure valgrind does not abort with unhandled instruction bytes summary: makes sure valgrind does not abort with unhandled instruction bytes
description: '' description: ''
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh
@ -45,6 +45,15 @@ adjust:
- enabled: false - enabled: false
when: arch != x86_64 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
when: distro == fedora and trigger == build
extra-nitrate: TC#0063646 extra-nitrate: TC#0063646
extra-summary: /tools/valgrind/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes extra-summary: /tools/valgrind/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes
extra-task: /tools/valgrind/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes extra-task: /tools/valgrind/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes

View file

@ -1,6 +1,6 @@
summary: tests missing config.h header summary: tests missing config.h header
description: '' description: ''
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh

View file

@ -0,0 +1,21 @@
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

View file

@ -0,0 +1,31 @@
#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;
}

View file

@ -0,0 +1,27 @@
#!/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

View file

@ -0,0 +1,11 @@
#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);
}

View file

@ -0,0 +1,16 @@
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

View file

@ -0,0 +1,24 @@
#!/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

View file

@ -1,5 +1,5 @@
summary: Try to run 32bit binary under valgrind on 64bit arch summary: Try to run 32bit binary under valgrind on 64bit arch
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh
@ -26,6 +26,15 @@ adjust:
- enabled: false - enabled: false
when: arch != x86_64 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
when: distro == fedora and trigger == build
# system-version/collection adjustments # system-version/collection adjustments
- require+: - require+:
- valgrind - valgrind

View file

@ -2,7 +2,7 @@ summary: Valgrind/gdb integration sanity test.
description: | description: |
This is small sanity test to make sure gdb works with valgrind gdb server. This is small sanity test to make sure gdb works with valgrind gdb server.
Also tests dwz if dwz is available. Also tests dwz if dwz is available.
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh

View file

@ -4,7 +4,7 @@ description: Testing sanity of valgrind by comparing outputs of ImageMagick util
https://en.wikipedia.org/wiki/File:Frauenkirche_and_Neues_Rathaus_Munich_March_2013.JPG. https://en.wikipedia.org/wiki/File:Frauenkirche_and_Neues_Rathaus_Munich_March_2013.JPG.
munich.jpg file is distributed under the Creative Commons munich.jpg file is distributed under the Creative Commons
Attribution-Share Alike 3.0 Unported license Attribution-Share Alike 3.0 Unported license
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh
@ -23,7 +23,8 @@ tag:
- tools-tip-on - tools-tip-on
adjust: adjust:
- enabled: false - enabled: false
when: distro < rhel-6 # ImageMagick is not distributed with RHEL from RHEL8 onwards
when: distro < rhel-6 or distro >= rhel-8
continue: false continue: false
# system-version/collection adjustments # system-version/collection adjustments

View file

@ -31,7 +31,6 @@ Options=(-flop
-equalize -equalize
-motion-blur\ 20x5 -motion-blur\ 20x5
-paint\ 3x3 -paint\ 3x3
-radial-blur\ 5
-posterize\ 10 -posterize\ 10
) )

View file

@ -2,7 +2,7 @@ summary: Sanity test using hunspell.
description: | description: |
The test runs hunspell with and without valgrind and checks that the outputs The test runs hunspell with and without valgrind and checks that the outputs
do not differ. do not differ.
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh

View file

@ -0,0 +1,6 @@
summary: Make sure dnf installs weak dep packages (such as valgrind + valgrind-scripts)
test: ./runtest.sh
framework: beakerlib
require:
- rpm-build
- createrepo

View file

@ -0,0 +1,50 @@
#!/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

View file

@ -0,0 +1,34 @@
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

View file

@ -0,0 +1,52 @@
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

View file

@ -1,6 +1,6 @@
summary: Basic smoke test. summary: Basic smoke test.
description: Very fast check that valgrind is working. description: Very fast check that valgrind is working.
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component: component:
- valgrind - valgrind
test: ./runtest.sh test: ./runtest.sh

View file

@ -0,0 +1,10 @@
summary: Smoke test for valgrind scripts
contact: Jesus Checa Hidalgo <jchecahi@redhat.com>
component:
- valgrind
test: ./runtest.sh
framework: beakerlib
require:
- valgrind
tier: 1
duration: 5m

View file

@ -0,0 +1,48 @@
#!/bin/bash
# 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))
rlJournalStart
rlPhaseStartSetup
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "pushd $tmp"
rlRun "set -o pipefail"
rlPhaseEnd
rlPhaseStartTest
for prog in $(rpm -ql valgrind | grep ^/usr/bin); do
if file $prog | grep -q ELF; then
rlLogDebug "Skipping ELF executable ${prog}"
continue
fi
LOGFILE="$(basename $prog).log"
if ${prog} --version &> $LOGFILE; then
rlPass "[ok] $prog"
continue
fi
# Perl scripts might return other than 0 but still be correct.
# This is because some of them print the version/help message with
# die() instead doing a print() and exit. die() always set the
# return code to 255. Hence we rely on grepping the version string,
# and make sure that the log contains only one line.
if grep -q "$(basename $prog)-${VERSION}" $LOGFILE \
&& [[ $(wc -l < $LOGFILE) -eq "1" ]];
then
rlPass "[ok] $prog"
continue
fi
# Anything else is a failure
rlFail "[fail] $prog"
rlLog "$(cat $LOGFILE)"
done
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd

View file

@ -1,2 +1,2 @@
# QE owner # QE owner
contact: Jesus Checa Hidalgo <jcheca@redhat.com> contact: Jesus Checa Hidalgo <jchecahi@redhat.com>