diff --git a/tests/bugs/Static-linking-results-in-misleading-error-message/main.fmf b/tests/bugs/Static-linking-results-in-misleading-error-message/main.fmf new file mode 100644 index 0000000..9a3c2d6 --- /dev/null +++ b/tests/bugs/Static-linking-results-in-misleading-error-message/main.fmf @@ -0,0 +1,20 @@ +summary: Static linking results in misleading error message + +description: |+ + This: + + /usr/bin/ld: cannot find -lc + + becomes this: + + /usr/bin/ld: cannot find -lc + /usr/bin/ld: have you installed the static version of the c library ? + +duration: 5m + +link: + - verifies: https://issues.redhat.com/browse/RHEL-69758 + +adjust+: + - when: distro < rhel-9.6 + enabled: false diff --git a/tests/bugs/Static-linking-results-in-misleading-error-message/test.sh b/tests/bugs/Static-linking-results-in-misleading-error-message/test.sh new file mode 100755 index 0000000..81b79a2 --- /dev/null +++ b/tests/bugs/Static-linking-results-in-misleading-error-message/test.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# source the test script helpers +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +. "$TMT_TREE/tests/lib.sh" || exit 1 + +rlJournalStart + rlPhaseStartSetup + buTestHeader + buEnterTmpDir + + rlRun "echo 'int main(int argc, char **argv) { return 1; }' > main.c" + rlPhaseEnd + + rlPhaseStartTest + rlRun -s "gcc -static -lfoo" 1 + + rlAssertGrep "cannot find -lfoo" "$rlRun_LOG" + rlAssertGrep "have you installed the static version of the foo library ?" "$rlRun_LOG" + rlPhaseEnd + + rlPhaseStartCleanup + buExitTmpDir + rlPhaseEnd +rlJournalPrintText +rlJournalEnd