From 77b4c23e497fdfec0084a10580171b2607a683d1 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Wed, 13 Apr 2022 17:40:00 +0200 Subject: [PATCH 01/21] Update contact mail in all tests --- .../main.fmf | 2 +- .../main.fmf | 2 +- .../main.fmf | 2 +- .../main.fmf | 2 +- .../main.fmf | 2 +- Regression/bz584804-missing-config-h-header/main.fmf | 2 +- Sanity/32bit-on-64bit-os/main.fmf | 2 +- .../main.fmf | 2 +- Sanity/does-Image-Magick-works-under-valgrind/main.fmf | 2 +- Sanity/does-aspell-works-under-valgrind/main.fmf | 2 +- Sanity/quick-valgrind-sanity/main.fmf | 2 +- main.fmf | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Regression/bz1024162-valgrind-causes-crashes-in-signal-handlers-on/main.fmf b/Regression/bz1024162-valgrind-causes-crashes-in-signal-handlers-on/main.fmf index c5f747c..ffb39c1 100644 --- a/Regression/bz1024162-valgrind-causes-crashes-in-signal-handlers-on/main.fmf +++ b/Regression/bz1024162-valgrind-causes-crashes-in-signal-handlers-on/main.fmf @@ -2,7 +2,7 @@ summary: Test for BZ#1024162 (valgrind causes crashes in signal handlers on) description: | Bug summary: valgrind causes crashes in signal handlers on x86_64 Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1024162 -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/Regression/bz1305962-Valgrind-reports-uninitialised-byte-s-in-futex/main.fmf b/Regression/bz1305962-Valgrind-reports-uninitialised-byte-s-in-futex/main.fmf index 244b400..835efee 100644 --- a/Regression/bz1305962-Valgrind-reports-uninitialised-byte-s-in-futex/main.fmf +++ b/Regression/bz1305962-Valgrind-reports-uninitialised-byte-s-in-futex/main.fmf @@ -2,7 +2,7 @@ summary: Test for BZ#1305962 (Valgrind reports uninitialised byte(s) in futex) description: | Bug summary: Valgrind reports uninitialised byte(s) in futex Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1305962 -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/Regression/bz1584654-valgrind-utimensat-should-ignore-timespec-tv-sec/main.fmf b/Regression/bz1584654-valgrind-utimensat-should-ignore-timespec-tv-sec/main.fmf index d0217bc..97b4e3b 100644 --- a/Regression/bz1584654-valgrind-utimensat-should-ignore-timespec-tv-sec/main.fmf +++ b/Regression/bz1584654-valgrind-utimensat-should-ignore-timespec-tv-sec/main.fmf @@ -2,7 +2,7 @@ summary: Test for BZ#1584654 (valgrind utimensat should ignore timespec tv_sec) description: | valgrind utimensat should ignore timespec tv_sec when tv_nsec is UTIME_NOW or UTIME_OMIT -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/Regression/bz549333-valgrind-reports-errors-on-adjtimex-ADJ_OFFSET_SS_READ/main.fmf b/Regression/bz549333-valgrind-reports-errors-on-adjtimex-ADJ_OFFSET_SS_READ/main.fmf index 65a5997..8602bfb 100644 --- a/Regression/bz549333-valgrind-reports-errors-on-adjtimex-ADJ_OFFSET_SS_READ/main.fmf +++ b/Regression/bz549333-valgrind-reports-errors-on-adjtimex-ADJ_OFFSET_SS_READ/main.fmf @@ -1,6 +1,6 @@ summary: Test adjtimex syscall support description: Ensure adjtimex wrapper works in readonly adjtime mode -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf b/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf index d938426..5d49fa6 100644 --- a/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf +++ b/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf @@ -1,6 +1,6 @@ summary: makes sure valgrind does not abort with unhandled instruction bytes description: '' -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/Regression/bz584804-missing-config-h-header/main.fmf b/Regression/bz584804-missing-config-h-header/main.fmf index c52f4fa..22b7219 100644 --- a/Regression/bz584804-missing-config-h-header/main.fmf +++ b/Regression/bz584804-missing-config-h-header/main.fmf @@ -1,6 +1,6 @@ summary: tests missing config.h header description: '' -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/Sanity/32bit-on-64bit-os/main.fmf b/Sanity/32bit-on-64bit-os/main.fmf index 0f30efb..e342fc3 100644 --- a/Sanity/32bit-on-64bit-os/main.fmf +++ b/Sanity/32bit-on-64bit-os/main.fmf @@ -1,5 +1,5 @@ summary: Try to run 32bit binary under valgrind on 64bit arch -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/Sanity/bz672959-RFE-Integrate-valgrind-with-gdb-possibly-through/main.fmf b/Sanity/bz672959-RFE-Integrate-valgrind-with-gdb-possibly-through/main.fmf index 015fec7..e22435e 100644 --- a/Sanity/bz672959-RFE-Integrate-valgrind-with-gdb-possibly-through/main.fmf +++ b/Sanity/bz672959-RFE-Integrate-valgrind-with-gdb-possibly-through/main.fmf @@ -2,7 +2,7 @@ summary: Valgrind/gdb integration sanity test. description: | This is small sanity test to make sure gdb works with valgrind gdb server. Also tests dwz if dwz is available. -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/Sanity/does-Image-Magick-works-under-valgrind/main.fmf b/Sanity/does-Image-Magick-works-under-valgrind/main.fmf index 6af2ffd..937b951 100644 --- a/Sanity/does-Image-Magick-works-under-valgrind/main.fmf +++ b/Sanity/does-Image-Magick-works-under-valgrind/main.fmf @@ -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. munich.jpg file is distributed under the Creative Commons Attribution-Share Alike 3.0 Unported license -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/Sanity/does-aspell-works-under-valgrind/main.fmf b/Sanity/does-aspell-works-under-valgrind/main.fmf index 21dce7b..8e313c8 100644 --- a/Sanity/does-aspell-works-under-valgrind/main.fmf +++ b/Sanity/does-aspell-works-under-valgrind/main.fmf @@ -2,7 +2,7 @@ summary: Sanity test using hunspell. description: | The test runs hunspell with and without valgrind and checks that the outputs do not differ. -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/Sanity/quick-valgrind-sanity/main.fmf b/Sanity/quick-valgrind-sanity/main.fmf index e72e658..a194843 100644 --- a/Sanity/quick-valgrind-sanity/main.fmf +++ b/Sanity/quick-valgrind-sanity/main.fmf @@ -1,6 +1,6 @@ summary: Basic smoke test. description: Very fast check that valgrind is working. -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo component: - valgrind test: ./runtest.sh diff --git a/main.fmf b/main.fmf index 7eb3165..6f178b8 100644 --- a/main.fmf +++ b/main.fmf @@ -1,2 +1,2 @@ # QE owner -contact: Jesus Checa Hidalgo +contact: Jesus Checa Hidalgo From 893f69f5fa5b031c1a1bffd7ed3abf565ffef40e Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Tue, 26 Apr 2022 11:44:13 +0200 Subject: [PATCH 02/21] Sanity/does-Image-Magick-works-under-valgrind: ImageMagick is not distributed in RHEL8 and newer. Update relevancy --- Sanity/does-Image-Magick-works-under-valgrind/main.fmf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sanity/does-Image-Magick-works-under-valgrind/main.fmf b/Sanity/does-Image-Magick-works-under-valgrind/main.fmf index 937b951..af58865 100644 --- a/Sanity/does-Image-Magick-works-under-valgrind/main.fmf +++ b/Sanity/does-Image-Magick-works-under-valgrind/main.fmf @@ -23,7 +23,8 @@ tag: - tools-tip-on adjust: - 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 # system-version/collection adjustments From a0cf0f365ef230aeec238a3d08c4d76ef6f148f2 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Wed, 27 Apr 2022 11:21:39 +0200 Subject: [PATCH 03/21] Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns: Add test --- .../main.fmf | 29 +++++++++++++++++++ .../runtest.sh | 27 +++++++++++++++++ .../vbpermq_test.c | 8 +++++ 3 files changed, 64 insertions(+) create mode 100644 Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf create mode 100755 Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/runtest.sh create mode 100644 Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/vbpermq_test.c diff --git a/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf b/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf new file mode 100644 index 0000000..bfb9e01 --- /dev/null +++ b/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf @@ -0,0 +1,29 @@ +summary: ppc64le vpermq insn vex temp storage exhausted +description: + Test that ppc64le vector instructions don't exhaust vex temp storage +contact: Jesus Checa Hidalgo +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 +# Extra adjustments for collection/system-version valgrind +adjust: + - enabled: false + when: arch != ppc64le + continue: false + + # Enable SCL environment when collection is provided + - test: scl enable $COLLECTIONS -- ./runtest.sh + when: collection is defined + + - require+: + - valgrind + when: collection is not defined \ No newline at end of file diff --git a/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/runtest.sh b/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/runtest.sh new file mode 100755 index 0000000..e167c2b --- /dev/null +++ b/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/runtest.sh @@ -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 diff --git a/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/vbpermq_test.c b/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/vbpermq_test.c new file mode 100644 index 0000000..0e044f5 --- /dev/null +++ b/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/vbpermq_test.c @@ -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; +} From 7b31ff21dbd8cf28de5b74ecb025c74f6b775d95 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Wed, 27 Apr 2022 11:35:31 +0200 Subject: [PATCH 04/21] Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns: Update nitrate metadata --- .../main.fmf | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf b/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf index bfb9e01..95c15fa 100644 --- a/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf +++ b/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf @@ -1,6 +1,5 @@ summary: ppc64le vpermq insn vex temp storage exhausted -description: - Test that ppc64le vector instructions don't exhaust vex temp storage +description: Test that ppc64le vector instructions don't exhaust vex temp storage contact: Jesus Checa Hidalgo component: - valgrind @@ -14,16 +13,13 @@ duration: 5m tier: 1 tag: - CI-Tier-1 -# Extra adjustments for collection/system-version valgrind adjust: - enabled: false when: arch != ppc64le continue: false - - # Enable SCL environment when collection is provided - test: scl enable $COLLECTIONS -- ./runtest.sh when: collection is defined - - require+: - valgrind - when: collection is not defined \ No newline at end of file + when: collection is not defined +extra-nitrate: TC#0613214 From 9b54e0088a39b812b5a34e5424f0647864717256 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Wed, 27 Apr 2022 12:13:36 +0200 Subject: [PATCH 05/21] Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns: Update nitrate metadata --- .../main.fmf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf b/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf index 95c15fa..dd97459 100644 --- a/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf +++ b/Regression/bz2067187-vex-temporary-storage-exhausted-by-ppc64le-vector-insns/main.fmf @@ -23,3 +23,5 @@ adjust: - 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 From fb10ef96330f7451d7e243719979b50f263bd2cf Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Tue, 24 May 2022 16:27:55 +0200 Subject: [PATCH 06/21] Regression/bz2081583-missing-strncmp-intercept-for-ld-so: Add test --- .../iconv_test.c | 8 +++++ .../main.fmf | 24 +++++++++++++++ .../runtest.sh | 29 +++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 Regression/bz2081583-missing-strncmp-intercept-for-ld-so/iconv_test.c create mode 100644 Regression/bz2081583-missing-strncmp-intercept-for-ld-so/main.fmf create mode 100755 Regression/bz2081583-missing-strncmp-intercept-for-ld-so/runtest.sh diff --git a/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/iconv_test.c b/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/iconv_test.c new file mode 100644 index 0000000..20d5418 --- /dev/null +++ b/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/iconv_test.c @@ -0,0 +1,8 @@ +#include + +int main(void) +{ + iconv_t fd = iconv_open("UTF-8", "EUC-JP"); + iconv_close(fd); + return 0; +} diff --git a/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/main.fmf b/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/main.fmf new file mode 100644 index 0000000..8a4b0cb --- /dev/null +++ b/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/main.fmf @@ -0,0 +1,24 @@ +summary: Test strncmp intercept for ld.so +contact: Jesus Checa Hidalgo +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 diff --git a/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/runtest.sh b/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/runtest.sh new file mode 100755 index 0000000..9d5dedb --- /dev/null +++ b/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/runtest.sh @@ -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 From 69141adef67b6ed9ef9ea86274623a3f5f4d0637 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Fri, 27 May 2022 13:20:35 +0200 Subject: [PATCH 07/21] Regression/bz2081583-missing-strncmp-intercept-for-ld-so: Update nitrate metadata --- .../bz2081583-missing-strncmp-intercept-for-ld-so/main.fmf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/main.fmf b/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/main.fmf index 8a4b0cb..f5e1328 100644 --- a/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/main.fmf +++ b/Regression/bz2081583-missing-strncmp-intercept-for-ld-so/main.fmf @@ -22,3 +22,6 @@ adjust: - 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 From 11566731147a6af7f8099bda10b57ca6288f06b0 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 24 Apr 2023 14:33:19 +0200 Subject: [PATCH 08/21] 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. --- Sanity/does-Image-Magick-works-under-valgrind/runtest.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/Sanity/does-Image-Magick-works-under-valgrind/runtest.sh b/Sanity/does-Image-Magick-works-under-valgrind/runtest.sh index 0227f5b..a1bc424 100755 --- a/Sanity/does-Image-Magick-works-under-valgrind/runtest.sh +++ b/Sanity/does-Image-Magick-works-under-valgrind/runtest.sh @@ -31,7 +31,6 @@ Options=(-flop -equalize -motion-blur\ 20x5 -paint\ 3x3 - -radial-blur\ 5 -posterize\ 10 ) From a734e52212e3a65f92491edcc50480308c4be61c Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 24 Apr 2023 16:46:26 +0200 Subject: [PATCH 09/21] 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. --- .../main.fmf | 5 +++++ Sanity/32bit-on-64bit-os/main.fmf | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf b/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf index 5d49fa6..3844c59 100644 --- a/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf +++ b/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf @@ -45,6 +45,11 @@ adjust: - enabled: false when: arch != x86_64 + # 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-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 diff --git a/Sanity/32bit-on-64bit-os/main.fmf b/Sanity/32bit-on-64bit-os/main.fmf index e342fc3..1b41f20 100644 --- a/Sanity/32bit-on-64bit-os/main.fmf +++ b/Sanity/32bit-on-64bit-os/main.fmf @@ -26,6 +26,11 @@ adjust: - enabled: false when: arch != x86_64 + # 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 - require+: - valgrind From 6b6fc44452cb1e8b5b97a631973af86e4bd065e8 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Wed, 14 Jun 2023 11:35:55 +0200 Subject: [PATCH 10/21] Sanity/valgrind-scripts-smoke: Sanity test to check that the script are usable --- Sanity/valgrind-scripts-smoke/main.fmf | 10 +++++ Sanity/valgrind-scripts-smoke/runtest.sh | 48 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 Sanity/valgrind-scripts-smoke/main.fmf create mode 100755 Sanity/valgrind-scripts-smoke/runtest.sh diff --git a/Sanity/valgrind-scripts-smoke/main.fmf b/Sanity/valgrind-scripts-smoke/main.fmf new file mode 100644 index 0000000..9b05b94 --- /dev/null +++ b/Sanity/valgrind-scripts-smoke/main.fmf @@ -0,0 +1,10 @@ +summary: Smoke test for valgrind scripts +contact: Jesus Checa Hidalgo +component: + - valgrind +test: ./runtest.sh +framework: beakerlib +require: + - valgrind +tier: 1 +duration: 5m \ No newline at end of file diff --git a/Sanity/valgrind-scripts-smoke/runtest.sh b/Sanity/valgrind-scripts-smoke/runtest.sh new file mode 100755 index 0000000..6b10516 --- /dev/null +++ b/Sanity/valgrind-scripts-smoke/runtest.sh @@ -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) +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" + 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 From c11e6cd3acf4059af2a8ae41e6352642655ea78d Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Fri, 23 Jun 2023 17:13:54 +0200 Subject: [PATCH 11/21] Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste: create test --- .../main.fmf | 21 +++++++++++++ .../reproducer.c | 31 +++++++++++++++++++ .../runtest.sh | 27 ++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/main.fmf create mode 100644 Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/reproducer.c create mode 100755 Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/runtest.sh diff --git a/Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/main.fmf b/Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/main.fmf new file mode 100644 index 0000000..7e64471 --- /dev/null +++ b/Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/main.fmf @@ -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 +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 diff --git a/Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/reproducer.c b/Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/reproducer.c new file mode 100644 index 0000000..607a527 --- /dev/null +++ b/Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/reproducer.c @@ -0,0 +1,31 @@ +#include +#include +#include +#include +#include +#include + +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; +} diff --git a/Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/runtest.sh b/Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/runtest.sh new file mode 100755 index 0000000..8af54f6 --- /dev/null +++ b/Regression/kde470978-ioctl-kvm_create_vm-s390x-pgste/runtest.sh @@ -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 From 7e9a23a15641f915ce9d7a3aeede7504c9549a01 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 26 Jun 2023 20:20:13 +0200 Subject: [PATCH 12/21] Sanity/valgrind-scripts-smoke: Fix bug in version string when multilib pkgs are installed. --- Sanity/valgrind-scripts-smoke/runtest.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sanity/valgrind-scripts-smoke/runtest.sh b/Sanity/valgrind-scripts-smoke/runtest.sh index 6b10516..461dc56 100755 --- a/Sanity/valgrind-scripts-smoke/runtest.sh +++ b/Sanity/valgrind-scripts-smoke/runtest.sh @@ -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) +VERSION=$(rpm -q --queryformat="%{version}" valgrind.$(uname -m)) 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" + rlLogDebug "Skipping ELF executable ${prog}" continue fi LOGFILE="$(basename $prog).log" - if $prog --version &> $LOGFILE; then + if ${prog} --version &> $LOGFILE; then rlPass "[ok] $prog" continue fi From 159dc40294c003001f2f4c48191e265865642522 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 26 Jun 2023 21:01:03 +0200 Subject: [PATCH 13/21] Regression/bz2214375-memmove_chk-seen-as-memcpy_chk: create test --- .../main.fmf | 13 ++++++++++ .../reproducer.c | 18 +++++++++++++ .../runtest.sh | 25 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/main.fmf create mode 100644 Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/reproducer.c create mode 100755 Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/runtest.sh diff --git a/Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/main.fmf b/Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/main.fmf new file mode 100644 index 0000000..25833cd --- /dev/null +++ b/Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/main.fmf @@ -0,0 +1,13 @@ +summary: Test that valgrind does not do overlap checks for memmove +contact: Jesus Checa Hidalgo +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 \ No newline at end of file diff --git a/Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/reproducer.c b/Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/reproducer.c new file mode 100644 index 0000000..80d4b4c --- /dev/null +++ b/Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/reproducer.c @@ -0,0 +1,18 @@ +#include +#include + +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; +} \ No newline at end of file diff --git a/Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/runtest.sh b/Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/runtest.sh new file mode 100755 index 0000000..0b4e42b --- /dev/null +++ b/Regression/bz2214375-memmove_chk-seen-as-memcpy_chk/runtest.sh @@ -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 From 1305cb443f20b7cf0db2e019143bddf138f52135 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 11 Dec 2023 14:51:45 +0100 Subject: [PATCH 14/21] kde476548-contiguous-rodata-sections: create test --- .../hello.c | 11 +++++++++ .../main.fmf | 16 +++++++++++++ .../test.sh | 24 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 Regression/kde476548-contiguous-rodata-sections/hello.c create mode 100644 Regression/kde476548-contiguous-rodata-sections/main.fmf create mode 100755 Regression/kde476548-contiguous-rodata-sections/test.sh diff --git a/Regression/kde476548-contiguous-rodata-sections/hello.c b/Regression/kde476548-contiguous-rodata-sections/hello.c new file mode 100644 index 0000000..0fac1b5 --- /dev/null +++ b/Regression/kde476548-contiguous-rodata-sections/hello.c @@ -0,0 +1,11 @@ +#include + +__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); +} \ No newline at end of file diff --git a/Regression/kde476548-contiguous-rodata-sections/main.fmf b/Regression/kde476548-contiguous-rodata-sections/main.fmf new file mode 100644 index 0000000..9b83693 --- /dev/null +++ b/Regression/kde476548-contiguous-rodata-sections/main.fmf @@ -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 +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 diff --git a/Regression/kde476548-contiguous-rodata-sections/test.sh b/Regression/kde476548-contiguous-rodata-sections/test.sh new file mode 100755 index 0000000..694dab8 --- /dev/null +++ b/Regression/kde476548-contiguous-rodata-sections/test.sh @@ -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 From 3fff9515b7bd64763796a473843b67605866c65a Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 11 Dec 2023 14:56:51 +0100 Subject: [PATCH 15/21] kde476548-contiguous-rodata-sections: no newline at end of file --- Regression/kde476548-contiguous-rodata-sections/hello.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Regression/kde476548-contiguous-rodata-sections/hello.c b/Regression/kde476548-contiguous-rodata-sections/hello.c index 0fac1b5..eed907c 100644 --- a/Regression/kde476548-contiguous-rodata-sections/hello.c +++ b/Regression/kde476548-contiguous-rodata-sections/hello.c @@ -8,4 +8,4 @@ const char * const constnums = "123"; int main () { const char * const constmain = "mainmainmain"; char *leak = (char*) malloc(16); -} \ No newline at end of file +} From c09b1470115a5dc35d16e2509117cc143fa692b8 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 11 Dec 2023 15:14:42 +0100 Subject: [PATCH 16/21] kde476548-contiguous-rodata-sections: Fix missing = sign in valgrind command --- Regression/kde476548-contiguous-rodata-sections/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Regression/kde476548-contiguous-rodata-sections/test.sh b/Regression/kde476548-contiguous-rodata-sections/test.sh index 694dab8..a344b88 100755 --- a/Regression/kde476548-contiguous-rodata-sections/test.sh +++ b/Regression/kde476548-contiguous-rodata-sections/test.sh @@ -13,7 +13,7 @@ rlJournalStart 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" + rlRun "valgrind --log-file=valgrind.output ./t.exec" rlAssertNotGrep "Assertion 'di->rodata_size == a_shdr.sh_size' failed" valgrind.output rlPhaseEnd From 89d13e8a13642cfc56e46ed22066137026a33a2e Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Thu, 2 May 2024 16:07:53 +0200 Subject: [PATCH 17/21] bz580078-valgrind-aborts-with-vex-x86...: Fix gcc 14 warnings --- .../case1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/case1.c b/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/case1.c index 525db32..95b5e2b 100644 --- a/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/case1.c +++ b/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/case1.c @@ -1,6 +1,8 @@ #include #include +extern int NSS_NoDB_Init(void*); + int main() { NSS_NoDB_Init(NULL); From bc3f0036337ca4a3a1b1910fd480ab4611dd5bfa Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Wed, 26 Jun 2024 17:31:27 +0200 Subject: [PATCH 18/21] Update relevancies for rhel 10 --- .../main.fmf | 4 ++++ Sanity/32bit-on-64bit-os/main.fmf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf b/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf index 3844c59..e488ec0 100644 --- a/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf +++ b/Regression/bz580078-valgrind-aborts-with-vex-x86-IR-unhandled-instruction-bytes/main.fmf @@ -45,6 +45,10 @@ 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 diff --git a/Sanity/32bit-on-64bit-os/main.fmf b/Sanity/32bit-on-64bit-os/main.fmf index 1b41f20..af58f83 100644 --- a/Sanity/32bit-on-64bit-os/main.fmf +++ b/Sanity/32bit-on-64bit-os/main.fmf @@ -26,6 +26,10 @@ 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 From 36937a99b2c520041f48be0ebe23c621d278a3ee Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Fri, 17 Jan 2025 12:25:03 +0100 Subject: [PATCH 19/21] New test: /Sanity/install-weak-deps --- Sanity/install-weak-deps/main.fmf | 6 +++ Sanity/install-weak-deps/runtest.sh | 43 +++++++++++++++ .../install-weak-deps/trivial-empty-v1.spec | 34 ++++++++++++ .../install-weak-deps/trivial-empty-v2.spec | 52 +++++++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 Sanity/install-weak-deps/main.fmf create mode 100755 Sanity/install-weak-deps/runtest.sh create mode 100644 Sanity/install-weak-deps/trivial-empty-v1.spec create mode 100644 Sanity/install-weak-deps/trivial-empty-v2.spec diff --git a/Sanity/install-weak-deps/main.fmf b/Sanity/install-weak-deps/main.fmf new file mode 100644 index 0000000..9e4aa46 --- /dev/null +++ b/Sanity/install-weak-deps/main.fmf @@ -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 diff --git a/Sanity/install-weak-deps/runtest.sh b/Sanity/install-weak-deps/runtest.sh new file mode 100755 index 0000000..62899c6 --- /dev/null +++ b/Sanity/install-weak-deps/runtest.sh @@ -0,0 +1,43 @@ +#!/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 "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 $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 < - 1.0-1 +- Initial creation of a trivial RPM with no payload diff --git a/Sanity/install-weak-deps/trivial-empty-v2.spec b/Sanity/install-weak-deps/trivial-empty-v2.spec new file mode 100644 index 0000000..155b79c --- /dev/null +++ b/Sanity/install-weak-deps/trivial-empty-v2.spec @@ -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 - 1.0-2 +- Initial creation of the trivial RPM with no payload + +* Thu Jan 16 2025 Example Maintainer - 1.0-1 +- Initial creation of a trivial RPM with no payload From 064b95ec271aeca4fb08c764acdf9b4ef300ad32 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Fri, 17 Jan 2025 13:24:25 +0100 Subject: [PATCH 20/21] Sanity/install-weak-deps: Additional check for weak deps --- Sanity/install-weak-deps/runtest.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Sanity/install-weak-deps/runtest.sh b/Sanity/install-weak-deps/runtest.sh index 62899c6..40c5ba9 100755 --- a/Sanity/install-weak-deps/runtest.sh +++ b/Sanity/install-weak-deps/runtest.sh @@ -2,6 +2,8 @@ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k . /usr/share/beakerlib/beakerlib.sh || exit 1 +DNFSWITCHES="--disablerepo=\* --enablerepo=mytestingrepo" + rlJournalStart rlPhaseStartSetup rlRun "dnf -y remove trivial-empty\* ||:" @@ -27,13 +29,19 @@ gpgcheck=0 enabled=1 EOF rlRun "cat /etc/yum.repos.d/mytestingrepo.repo" - rlRun "dnf --disablerepo=\* --enablerepo=mytestingrepo clean all" - rlRun "dnf --disablerepo=\* --enablerepo=mytestingrepo -y update trivial-empty" + 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 it so make sure the following + # 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 From d071621a56c9a752d1c5941abed193994860a1be Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Wed, 15 Apr 2026 09:07:57 +0200 Subject: [PATCH 21/21] Drop vim modeline, add rpm --nosignature to override new (and unrelated) default. --- Sanity/install-weak-deps/runtest.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sanity/install-weak-deps/runtest.sh b/Sanity/install-weak-deps/runtest.sh index 40c5ba9..b952e10 100755 --- a/Sanity/install-weak-deps/runtest.sh +++ b/Sanity/install-weak-deps/runtest.sh @@ -1,5 +1,4 @@ #!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k . /usr/share/beakerlib/beakerlib.sh || exit 1 DNFSWITCHES="--disablerepo=\* --enablerepo=mytestingrepo" @@ -17,7 +16,7 @@ rlJournalStart rlRun "pushd $HOME/rpmbuild/RPMS/$a" rlRun "createrepo ." rlRun "popd" - rlRun "rpm -Uvh $HOME/rpmbuild/RPMS/$a/trivial-empty-1.0-1*" + 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