From 700bceff1c71024308d08a3b4cac0c155bc494d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Thu, 30 Jan 2025 12:37:25 +0100 Subject: [PATCH 1/5] Mark shell features with `@xfail` and add references to issue --- dnf-behave-tests/dnf/shell-distro-sync.feature | 10 ++-------- dnf-behave-tests/dnf/shell-downgrade.feature | 10 ++-------- dnf-behave-tests/dnf/shell-from-file.feature | 6 ++---- dnf-behave-tests/dnf/shell-group.feature | 10 ++-------- dnf-behave-tests/dnf/shell-help.feature | 2 ++ dnf-behave-tests/dnf/shell-install.feature | 12 ++++-------- dnf-behave-tests/dnf/shell-more-commands.feature | 6 ++---- dnf-behave-tests/dnf/shell-reinstall.feature | 10 ++-------- dnf-behave-tests/dnf/shell-remove.feature | 6 ++---- dnf-behave-tests/dnf/shell-repo.feature | 12 ++---------- dnf-behave-tests/dnf/shell-swap.feature | 7 +++---- dnf-behave-tests/dnf/shell-upgrade-minimal.feature | 10 ++-------- dnf-behave-tests/dnf/shell-upgrade.feature | 6 ++---- 13 files changed, 29 insertions(+), 78 deletions(-) diff --git a/dnf-behave-tests/dnf/shell-distro-sync.feature b/dnf-behave-tests/dnf/shell-distro-sync.feature index 57218767b..5cead60d5 100644 --- a/dnf-behave-tests/dnf/shell-distro-sync.feature +++ b/dnf-behave-tests/dnf/shell-distro-sync.feature @@ -1,3 +1,5 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell distro-sync @@ -17,8 +19,6 @@ Background: Install glibc, flac, and CQRlib | install-dep | glibc-all-langpacks-0:2.28-9.fc29.x86_64 | -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, make distro-sync for an RPM Given I use repository "dnf-ci-fedora-updates" When I open dnf shell session @@ -33,8 +33,6 @@ Scenario: Using dnf shell, make distro-sync for an RPM Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, make distro-sync for mutiple RPMs Given I use repository "dnf-ci-fedora-updates" When I open dnf shell session @@ -48,8 +46,6 @@ Scenario: Using dnf shell, make distro-sync for mutiple RPMs Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to make distro-sync when no upgrade is available Given I use repository "dnf-ci-fedora-updates" And I use repository "dnf-ci-fedora-updates-testing" @@ -62,8 +58,6 @@ Scenario: Using dnf shell, fail to make distro-sync when no upgrade is available Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to make distro-sync for non-existent RPM Given I use repository "dnf-ci-fedora-updates-testing" When I open dnf shell session diff --git a/dnf-behave-tests/dnf/shell-downgrade.feature b/dnf-behave-tests/dnf/shell-downgrade.feature index 0031aebef..d0fe2f2d6 100644 --- a/dnf-behave-tests/dnf/shell-downgrade.feature +++ b/dnf-behave-tests/dnf/shell-downgrade.feature @@ -1,3 +1,5 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell downgrade @@ -17,8 +19,6 @@ Background: Install glibc and flac | install-dep | glibc-all-langpacks-0:2.28-26.fc29.x86_64 | -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, downgrade an RPM When I open dnf shell session And I execute in dnf shell "downgrade glibc" @@ -32,8 +32,6 @@ Scenario: Using dnf shell, downgrade an RPM Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Downgrade multiple RPMs When I open dnf shell session And I execute in dnf shell "downgrade glibc flac" @@ -48,8 +46,6 @@ Scenario: Downgrade multiple RPMs Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to downgrade an RPM of the lowest version When I open dnf shell session And I execute in dnf shell "downgrade setup" @@ -62,8 +58,6 @@ Scenario: Using dnf shell, fail to downgrade an RPM of the lowest version Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to downgrade non-existent RPM When I open dnf shell session And I execute in dnf shell "downgrade non-existent" diff --git a/dnf-behave-tests/dnf/shell-from-file.feature b/dnf-behave-tests/dnf/shell-from-file.feature index cece0920f..99127d133 100644 --- a/dnf-behave-tests/dnf/shell-from-file.feature +++ b/dnf-behave-tests/dnf/shell-from-file.feature @@ -1,3 +1,5 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Execute dnf shell commands from file @@ -10,8 +12,6 @@ Background: | key | value | | enabled | 0 | -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Execute dnf shell with file as argument When I execute dnf with args "shell {context.dnf.fixturesdir}/scripts/shell-commands" Then the exit code is 0 @@ -20,8 +20,6 @@ Scenario: Execute dnf shell with file as argument | install | flac-0:1.3.2-8.fc29.x86_64 | -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Execute dnf shell with file on input When I execute dnf with args "shell < {context.dnf.fixturesdir}/scripts/shell-commands" Then the exit code is 0 diff --git a/dnf-behave-tests/dnf/shell-group.feature b/dnf-behave-tests/dnf/shell-group.feature index 5ac66ac8f..f393abc38 100644 --- a/dnf-behave-tests/dnf/shell-group.feature +++ b/dnf-behave-tests/dnf/shell-group.feature @@ -1,3 +1,5 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell group @@ -15,8 +17,6 @@ Feature: Shell group # conditional: wget, requires filesystem-content -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, install a package group Given I use repository "dnf-ci-fedora" And I use repository "dnf-ci-thirdparty" @@ -34,8 +34,6 @@ Scenario: Using dnf shell, install a package group Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario Outline: Using dnf shell, upgrade a package group using alias Given I use repository "dnf-ci-fedora" And I use repository "dnf-ci-thirdparty" @@ -105,8 +103,6 @@ Scenario: Using dnf shell, remove a package group Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to install a non-existent package group Given I use repository "dnf-ci-fedora" When I open dnf shell session @@ -118,8 +114,6 @@ Scenario: Using dnf shell, fail to install a non-existent package group Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to remove a non-existent package group Given I use repository "dnf-ci-fedora" When I open dnf shell session diff --git a/dnf-behave-tests/dnf/shell-help.feature b/dnf-behave-tests/dnf/shell-help.feature index cc6cbfe14..a11bcffd5 100644 --- a/dnf-behave-tests/dnf/shell-help.feature +++ b/dnf-behave-tests/dnf/shell-help.feature @@ -1,3 +1,5 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell help diff --git a/dnf-behave-tests/dnf/shell-install.feature b/dnf-behave-tests/dnf/shell-install.feature index 9d3827952..c000f3b68 100644 --- a/dnf-behave-tests/dnf/shell-install.feature +++ b/dnf-behave-tests/dnf/shell-install.feature @@ -1,8 +1,8 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell install -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, install an RPM Given I use repository "dnf-ci-fedora" When I open dnf shell session @@ -16,8 +16,7 @@ Scenario: Using dnf shell, install an RPM When I execute in dnf shell "exit" Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" + @bz1658579 Scenario: Using dnf shell, fail to install an RPM when no repositories are enabled When I open dnf shell session @@ -30,8 +29,6 @@ Scenario: Using dnf shell, fail to install an RPM when no repositories are enabl Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to install a non-existent RPM Given I use repository "dnf-ci-fedora" When I open dnf shell session @@ -43,8 +40,7 @@ Scenario: Using dnf shell, fail to install a non-existent RPM When I execute in dnf shell "exit" Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" + @bz1773483 Scenario: Using dnf shell, fail to install local file when goal is not empty Given I use repository "dnf-ci-fedora" diff --git a/dnf-behave-tests/dnf/shell-more-commands.feature b/dnf-behave-tests/dnf/shell-more-commands.feature index 776176aa3..58b550ec4 100644 --- a/dnf-behave-tests/dnf/shell-more-commands.feature +++ b/dnf-behave-tests/dnf/shell-more-commands.feature @@ -1,8 +1,8 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Execute more commands in one transaction in dnf shell -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, install and remove RPMs in one transaction Given I use repository "dnf-ci-fedora" When I open dnf shell session @@ -23,8 +23,6 @@ Scenario: Using dnf shell, install and remove RPMs in one transaction Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, switch conflicting RPMs using install and remove Given I use repository "dnf-ci-thirdparty" Given I use repository "dnf-ci-fedora-updates" diff --git a/dnf-behave-tests/dnf/shell-reinstall.feature b/dnf-behave-tests/dnf/shell-reinstall.feature index 516473092..71f712a26 100644 --- a/dnf-behave-tests/dnf/shell-reinstall.feature +++ b/dnf-behave-tests/dnf/shell-reinstall.feature @@ -1,3 +1,5 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell reinstall @@ -15,8 +17,6 @@ Background: Install flac and filesystem | install-dep | setup-0:2.12.1-1.fc29.noarch | -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, reinstall an RPM When I open dnf shell session And I execute in dnf shell "reinstall flac" @@ -28,8 +28,6 @@ Scenario: Using dnf shell, reinstall an RPM Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, reinstall multiple RPMs When I open dnf shell session And I execute in dnf shell "reinstall flac filesystem" @@ -42,8 +40,6 @@ Scenario: Using dnf shell, reinstall multiple RPMs Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to reinstall non-existent RPM When I open dnf shell session And I execute in dnf shell "reinstall NoSuchPackage" @@ -56,8 +52,6 @@ Scenario: Using dnf shell, fail to reinstall non-existent RPM Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to reinstall an RPM when relevant repository is disabled When I open dnf shell session And I execute in dnf shell "repo disable dnf-ci-fedora" diff --git a/dnf-behave-tests/dnf/shell-remove.feature b/dnf-behave-tests/dnf/shell-remove.feature index 1b8cd99fe..491d2b596 100644 --- a/dnf-behave-tests/dnf/shell-remove.feature +++ b/dnf-behave-tests/dnf/shell-remove.feature @@ -1,3 +1,5 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell remove @@ -10,8 +12,6 @@ Background: Install flac | install | flac-0:1.3.2-8.fc29.x86_64 | -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, remove an RPM When I open dnf shell session And I execute in dnf shell "repo enable dnf-ci-fedora" @@ -24,8 +24,6 @@ Scenario: Using dnf shell, remove an RPM Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to remove a non-existent RPM When I open dnf shell session And I execute in dnf shell "remove NoSuchPackage" diff --git a/dnf-behave-tests/dnf/shell-repo.feature b/dnf-behave-tests/dnf/shell-repo.feature index c20cf0260..452de411e 100644 --- a/dnf-behave-tests/dnf/shell-repo.feature +++ b/dnf-behave-tests/dnf/shell-repo.feature @@ -1,8 +1,8 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell repo -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, enable repositories Given I use repository "dnf-ci-fedora" with configuration | key | value | @@ -24,8 +24,6 @@ Scenario: Using dnf shell, enable repositories Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, disable repositories Given I use repository "dnf-ci-fedora" And I use repository "dnf-ci-fedora-updates" @@ -39,8 +37,6 @@ Scenario: Using dnf shell, disable repositories Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, disable and enable repositories Given I use repository "dnf-ci-fedora" And I use repository "dnf-ci-fedora-updates" @@ -57,8 +53,6 @@ Scenario: Using dnf shell, disable and enable repositories Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to enable non-existent repository When I open dnf shell session And I execute in dnf shell "repo enable NoSuchRepo" @@ -67,8 +61,6 @@ Scenario: Using dnf shell, fail to enable non-existent repository Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, fail to disable non-existent repository When I open dnf shell session And I execute in dnf shell "repo disable NoSuchRepo" diff --git a/dnf-behave-tests/dnf/shell-swap.feature b/dnf-behave-tests/dnf/shell-swap.feature index 29949b62b..2457ae6ef 100644 --- a/dnf-behave-tests/dnf/shell-swap.feature +++ b/dnf-behave-tests/dnf/shell-swap.feature @@ -1,3 +1,5 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell swap Background: @@ -5,8 +7,7 @@ Given I use repository "dnf-ci-fedora" And I use repository "dnf-ci-fedora-updates" And I use repository "dnf-ci-thirdparty" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" + Scenario: Switch packages and their subpackages by swap command (using wildcards) When I open dnf shell session And I execute in dnf shell "install CQRlib-devel CQRlib CQRlib-extension" @@ -38,8 +39,6 @@ Scenario: Switch packages and their subpackages by swap command (using wildcards Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Switch groups by swap command When I open dnf shell session And I execute in dnf shell "groupinstall CQRlib-non-devel" diff --git a/dnf-behave-tests/dnf/shell-upgrade-minimal.feature b/dnf-behave-tests/dnf/shell-upgrade-minimal.feature index 2d1beea6c..24660eae4 100644 --- a/dnf-behave-tests/dnf/shell-upgrade-minimal.feature +++ b/dnf-behave-tests/dnf/shell-upgrade-minimal.feature @@ -1,3 +1,5 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell upgrade-minimal @@ -17,8 +19,6 @@ Background: Install glibc, flac, and CQRlib | install-dep | glibc-all-langpacks-0:2.28-9.fc29.x86_64 | -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, make upgrade-minimal --bugfix Given I use repository "dnf-ci-fedora-updates" When I open dnf shell session @@ -33,8 +33,6 @@ Scenario: Using dnf shell, make upgrade-minimal --bugfix Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, make upgrade-minimal --security Given I use repository "dnf-ci-fedora-updates-testing" When I open dnf shell session @@ -47,8 +45,6 @@ Scenario: Using dnf shell, make upgrade-minimal --security Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario Outline: Using dnf shell, fail to upgrade-minimal when no such upgrade is available Given I use repository "dnf-ci-fedora-updates" And I use repository "dnf-ci-fedora-updates-testing" @@ -67,8 +63,6 @@ Examples: | --security | -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario Outline: Using dnf shell, fail upgrade-minimal for non-existent RPM Given I use repository "dnf-ci-fedora-updates-testing" When I open dnf shell session diff --git a/dnf-behave-tests/dnf/shell-upgrade.feature b/dnf-behave-tests/dnf/shell-upgrade.feature index ba97b62b6..f6ca7cc51 100644 --- a/dnf-behave-tests/dnf/shell-upgrade.feature +++ b/dnf-behave-tests/dnf/shell-upgrade.feature @@ -1,3 +1,5 @@ +# missing shell command: https://github.com/rpm-software-management/dnf5/issues/153 +@xfail Feature: Shell upgrade @@ -13,8 +15,6 @@ Background: Install flac | install | flac-0:1.3.2-8.fc29.x86_64 | -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, upgrade an RPM When I open dnf shell session And I execute in dnf shell "repo enable dnf-ci-fedora-updates" @@ -27,8 +27,6 @@ Scenario: Using dnf shell, upgrade an RPM Then stdout contains "Leaving Shell" -# @dnf5 -# TODO(nsella) Unknown argument "shell" for command "microdnf" Scenario: Using dnf shell, upgrade an RPM with the "update" alias When I open dnf shell session And I execute in dnf shell "repo enable dnf-ci-fedora-updates" From be6ac945b86a2447d025b2f827293f5d7b5b2d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Thu, 30 Jan 2025 12:39:04 +0100 Subject: [PATCH 2/5] Enable swap.feature and mark failing test --- dnf-behave-tests/dnf/swap.feature | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/dnf-behave-tests/dnf/swap.feature b/dnf-behave-tests/dnf/swap.feature index 5d7005ac6..3b7698920 100644 --- a/dnf-behave-tests/dnf/swap.feature +++ b/dnf-behave-tests/dnf/swap.feature @@ -1,3 +1,4 @@ +@dnf5 Feature: Test for swap command @@ -7,8 +8,6 @@ Background: Enable repositories Given I use repository "dnf-ci-thirdparty" -# @dnf5 -# TODO(nsella) rpmdb check fail Scenario: Switch packages by swap command When I execute dnf with args "install CQRlib-devel CQRlib" Then the exit code is 0 @@ -28,8 +27,6 @@ Scenario: Switch packages by swap command | install-weak | flac-0:1.3.3-3.fc29.x86_64 | -# @dnf5 -# TODO(nsella) rpmdb check fail Scenario: Switch packages and their subpackages by swap command with wildcards When I execute dnf with args "install CQRlib-devel CQRlib CQRlib-extension" Then the exit code is 0 @@ -58,10 +55,10 @@ Scenario: Switch packages and their subpackages by swap command with wildcards | install | CQRlib-devel-0:1.1.2-16.fc29.x86_64 | -# @dnf5 -# TODO(nsella) Unknown argument "groupinstall" for command "microdnf" +# Reported as https://github.com/rpm-software-management/dnf5/issues/916 +@xfail Scenario: Switch groups by swap command - When I execute dnf with args "groupinstall CQRlib-non-devel" + When I execute dnf with args "group install cqrlib-non-devel" Then the exit code is 0 And Transaction is following | Action | Package | @@ -89,8 +86,6 @@ Scenario: Switch groups by swap command | group-install | SuperRipper-and-deps | -# @dnf5 -# TODO(nsella) different exit code @bz2036434 Scenario: Swap packages using rpm file path Given I successfully execute dnf with args "install CQRlib-devel CQRlib" From 9f35f96a1ceec3b940393fdb69a304183b2fde93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Thu, 30 Jan 2025 12:40:23 +0100 Subject: [PATCH 3/5] Enable and update stick-to-vendor.feature --- dnf-behave-tests/dnf/stick-to-vendor.feature | 21 +++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/dnf-behave-tests/dnf/stick-to-vendor.feature b/dnf-behave-tests/dnf/stick-to-vendor.feature index 58e401ed9..e640adf55 100644 --- a/dnf-behave-tests/dnf/stick-to-vendor.feature +++ b/dnf-behave-tests/dnf/stick-to-vendor.feature @@ -1,3 +1,4 @@ +@dnf5 Feature: DNF allow_vendor_change option in dnf.conf Background: Given I use repository "dnf-ci-vendor-1" @@ -16,7 +17,6 @@ Background: Then the exit code is 0 And stdout contains "Vendor : First Vendor" -@dnf5 @bz1788371 Scenario: Upgrade sticks to vendor Given I use repository "dnf-ci-vendor-1-updates" @@ -30,7 +30,6 @@ Scenario: Upgrade sticks to vendor Then the exit code is 0 And stdout contains "Vendor : First Vendor" -@dnf5 @bz1788371 Scenario: No upgrade if same vendor not found Given I use repository "dnf-ci-vendor-2-updates" @@ -41,8 +40,7 @@ Scenario: No upgrade if same vendor not found Then the exit code is 0 And stdout contains "Vendor : First Vendor" -# @dnf5 -# TODO(nsella) different exit code + @bz1788371 Scenario: Downgrade is unable to resolve transaction Given I use repository "dnf-ci-vendor-1-updates" @@ -52,16 +50,15 @@ Scenario: Downgrade is unable to resolve transaction When I execute dnf with args "downgrade vendor" Then the exit code is 1 And transaction is empty - And stdout is - """ - (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages) - """ + And stdout is empty And stderr is """ - allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands - Error: - Problem: problem with installed package vendor-1.1-1.x86_64 - - cannot install both vendor-1.0-1.x86_64 and vendor-1.1-1.x86_64 + Failed to resolve the transaction: + Problem: problem with installed package + - cannot install both vendor-1.0-1.x86_64 from dnf-ci-vendor-2 and vendor-1.1-1.x86_64 from @System + - cannot install both vendor-1.0-1.x86_64 from dnf-ci-vendor-2 and vendor-1.1-1.x86_64 from dnf-ci-vendor-1-updates - conflicting requests + You can try to add to command line: + --skip-broken to skip uninstallable packages """ From 9983a3fdaad488f312059f9ffee75f5c9ac42c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Thu, 30 Jan 2025 13:23:12 +0100 Subject: [PATCH 4/5] Enable and update ssl.feature --- dnf-behave-tests/dnf/ssl.feature | 51 +++++++++++++++++--------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/dnf-behave-tests/dnf/ssl.feature b/dnf-behave-tests/dnf/ssl.feature index 5bec037aa..71a656d20 100644 --- a/dnf-behave-tests/dnf/ssl.feature +++ b/dnf-behave-tests/dnf/ssl.feature @@ -1,14 +1,13 @@ +@dnf5 Feature: SSL related tests -# @dnf5 -# TODO(nsella) Unknown argument "-v" for command "install" Scenario: Installing a package from https repository Given I use repository "dnf-ci-fedora" as https When I execute dnf with args "repolist" Then the exit code is 0 And stdout contains "dnf-ci-fedora\s+dnf-ci-fedora" - When I execute dnf with args "install filesystem -v" + When I execute dnf with args "install filesystem" Then the exit code is 0 And Transaction is following | Action | Package | @@ -16,15 +15,17 @@ Scenario: Installing a package from https repository | install-dep | setup-0:2.12.1-1.fc29.noarch | -# @dnf5 -# TODO(nsella) Unknown argument "-v" for command "install" Scenario: Installing a package from https repository with client verification Given I require client certificate verification with certificate "certificates/testcerts/client/cert.pem" and key "certificates/testcerts/client/key.pem" And I use repository "dnf-ci-fedora" as https When I execute dnf with args "repolist" Then the exit code is 0 - And stdout contains "dnf-ci-fedora\s+dnf-ci-fedora" - When I execute dnf with args "install filesystem -v" + And stdout is + """ + repo id repo name + dnf-ci-fedora dnf-ci-fedora test repository + """ + When I execute dnf with args "install filesystem" Then the exit code is 0 And Transaction is following | Action | Package | @@ -32,8 +33,6 @@ Scenario: Installing a package from https repository with client verification | install-dep | setup-0:2.12.1-1.fc29.noarch | -# @dnf5 -# TODO(nsella) different stderr @bz1605187 @bz1713627 Scenario: Installing a package using untrusted client cert should fail @@ -56,13 +55,11 @@ Scenario: Installing a package using untrusted client cert should fail # The connection failures will be hard to debug, untill then, we test # for stderr containing the expected output and ignore the superfluous # errors. - And stderr contains "Errors during downloading metadata for repository 'dnf-ci-fedora':" - And stderr contains " - Curl error" - And stderr contains "Error: Failed to download metadata for repo 'dnf-ci-fedora': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried" + And stderr contains ">>> Curl error" + And stderr contains "Failed to download metadata \(baseurl: \"https://localhost:{context.dnf.ports[dnf-ci-fedora]}/\"\) for repository \"dnf-ci-fedora\"" + And stderr contains " Librepo error: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried" -# @dnf5 -# TODO(nsella) different stderr @bz1605187 @bz1713627 Scenario: Installing a package using nonexistent client cert should fail @@ -72,14 +69,17 @@ Scenario: Installing a package using nonexistent client cert should fail Then the exit code is 1 And stderr matches line by line """ - Errors during downloading metadata for repository 'dnf-ci-fedora': - - Curl error \(58\): Problem with the local SSL certificate for https://localhost:[0-9]+/repodata/repomd.xml \[could not load PEM client certificate from .*/nonexistent.pem, OpenSSL error error:[0-9]+:system library:.*:No such file or directory, \(no key found, wrong pass phrase, or wrong file format\?\)\] - Error: Failed to download metadata for repo 'dnf-ci-fedora': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried + + >>> Curl error \(58\)\: Problem with the local SSL certificate.* + >>> Curl error \(58\)\: Problem with the local SSL certificate.* + >>> Curl error \(58\)\: Problem with the local SSL certificate.* + >>> Curl error \(58\)\: Problem with the local SSL certificate.* + >>> Librepo error: Cannot download repomd.xml: Cannot download repodata/repomd* + Failed to download metadata \(baseurl: \"https://localhost:[0-9]+/\"\) for repository \"dnf-ci-fedora\" + Librepo error: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried """ -# @dnf5 -# TODO(nsella) different stderr Scenario: Installation with untrusted repository should fail # https repositories use sslcacert certificates/testcerts/ca/cert.pem Given I use repository "simple-base" as https @@ -91,14 +91,17 @@ Scenario: Installation with untrusted repository should fail Then the exit code is 1 And stderr matches line by line """ - Errors during downloading metadata for repository 'simple-base': - - Curl error \(60\): .* for https://localhost:[0-9]+/repodata/repomd\.xml \[SSL certificate problem:.*\] - Error: Failed to download metadata for repo 'simple-base': Cannot download repomd\.xml: Cannot download repodata/repomd\.xml: All mirrors were tried + + >>> Curl error \(60\): SSL peer certificate or SSH remote key was not OK for https.* + >>> Curl error \(60\): SSL peer certificate or SSH remote key was not OK for https.* + >>> Curl error \(60\): SSL peer certificate or SSH remote key was not OK for https.* + >>> Curl error \(60\): SSL peer certificate or SSH remote key was not OK for https.* + >>> Librepo error: Cannot download repomd.xml: Cannot download repodata/repomd* + Failed to download metadata \(baseurl: \"https://localhost:[0-9]+/\"\) for repository \"simple-base\" + Librepo error: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried """ -# @dnf5 -# TODO(nsella) different stderr Scenario: Untrusted cert can be overriden with sslverify=False Given I use repository "simple-base" as https And I configure repository "simple-base" with From 8ffb566583cf70d27e9ac1af9e57728a8a0444f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Thu, 30 Jan 2025 14:20:30 +0100 Subject: [PATCH 5/5] Enable and update scriptlets.feature Couple checks for successfully run scriptlets are dropped because dnf5 hides successful scriptlets that have no output. --- dnf-behave-tests/dnf/scriptlets.feature | 122 +++++++++--------------- 1 file changed, 45 insertions(+), 77 deletions(-) diff --git a/dnf-behave-tests/dnf/scriptlets.feature b/dnf-behave-tests/dnf/scriptlets.feature index 570c30dc7..97cc2a426 100644 --- a/dnf-behave-tests/dnf/scriptlets.feature +++ b/dnf-behave-tests/dnf/scriptlets.feature @@ -1,11 +1,15 @@ +@dnf5 Feature: Test for successful and failing rpm scriptlets Background: Enable repository Given I use repository "scriptlets" + # Some of the rpm scriptlet outputs can be quite long and since they are + # truncated: https://github.com/rpm-software-management/dnf5/issues/1829 + # we need to force the width to see it in full. + And I set environment variable "FORCE_COLUMNS" to "400" -@dnf5 Scenario Outline: Install a pkg with a successful scriptlet When I execute dnf with args "install " Then the exit code is 0 @@ -22,37 +26,34 @@ Examples: | Package-posttrans-ok | posttrans scriptlet successfully done | -# @dnf5 -# TODO(nsella) different exit code Scenario Outline: Install a pkg with a failing %pre[IN|TRANS] scriptlet When I execute dnf with args "install " Then the exit code is 1 - And stderr contains "Error in scriptlet in rpm package " - And stderr contains "Error: Transaction failed" - + And stderr contains ">>> Running scriptlet: " + And stderr contains ">>> Error in scriptlet: " + And stderr contains "Transaction failed: Rpm transaction failed." + Examples: - | package | scriptlet | - | Package-pre-fail | PREIN | - | Package-pretrans-fail | PRETRANS | + | package | scriptlet | + | Package-pre-fail-0:1.0-1.x86_64 | pre-install | + | Package-pretrans-fail-0:1.0-1.x86_64 | pre-transaction | -# @dnf5 -# TODO(nsella) different stderr Scenario Outline: Install a pkg with a failing %post[in|trans] scriptlet When I execute dnf with args "install " Then the exit code is 0 And Transaction is following - | Action | Package | - | install | -0:1.0-1.x86_64 | - And stderr contains "Error in scriptlet in rpm package " - + | Action | Package | + | install | | + And stderr contains ">>> Running scriptlet: " + And stderr contains ">>> Non-critical error in scriptlet: " + Examples: - | package | scriptlet | - | Package-post-fail | POSTIN | - | Package-posttrans-fail | POSTTRANS | + | package | scriptlet | + | Package-post-fail-0:1.0-1.x86_64 | post-install | + | Package-posttrans-fail-0:1.0-1.x86_64 | post-transaction | -@dnf5 Scenario Outline: Remove a pkg with a successful %[pre|post]un scriptlet When I execute dnf with args "install " Then the exit code is 0 @@ -62,15 +63,13 @@ Scenario Outline: Remove a pkg with a successful %[pre|post]un scriptlet When I execute dnf with args "remove " Then the exit code is 0 And stdout contains "" - + Examples: | package | output | | Package-preun-ok | preun scriptlet successfully done | | Package-postun-ok | postun scriptlet successfully done | -# @dnf5 -# TODO(nsella) different exit code Scenario: Remove a pkg with a failing %preun scriptlet When I execute dnf with args "install Package-preun-fail" Then the exit code is 0 @@ -79,8 +78,9 @@ Scenario: Remove a pkg with a failing %preun scriptlet | install | Package-preun-fail-0:1.0-1.x86_64 | When I execute dnf with args "remove Package-preun-fail" Then the exit code is 1 - And stderr contains "Error in PREUN scriptlet in rpm package Package-preun-fail" - And stderr contains "Error: Transaction failed" + And stderr contains ">>> Running pre-uninstall scriptlet: Package-preun-fail-0:1.0-1.x86_64" + And stderr contains ">>> Error in pre-uninstall scriptlet: Package-preun-fail-0:1.0-1.x86_64" + And stderr contains "Transaction failed: Rpm transaction failed." When I execute dnf with args "--setopt=tsflags=noscripts remove Package-preun-fail" Then the exit code is 0 And Transaction is following @@ -88,8 +88,6 @@ Scenario: Remove a pkg with a failing %preun scriptlet | remove | Package-preun-fail-0:1.0-1.x86_64 | -# @dnf5 -# TODO(nsella) different stderr Scenario: Remove a pkg with a failing %postun scriptlet When I execute dnf with args "install Package-postun-fail" Then the exit code is 0 @@ -98,15 +96,14 @@ Scenario: Remove a pkg with a failing %postun scriptlet | install | Package-postun-fail-0:1.0-1.x86_64 | When I execute dnf with args "remove Package-postun-fail" Then the exit code is 0 - And stderr contains "Error in POSTUN scriptlet in rpm package Package-postun-fail" + And stderr contains ">>> Running post-uninstall scriptlet: Package-postun-fail-0:1.0-1.x86_64" + And stderr contains ">>> Non-critical error in post-uninstall scriptlet: Package-postun-fail-0:1.0-1.x86_64" + And stderr contains "Complete!" And Transaction is following | Action | Package | | remove | Package-postun-fail-0:1.0-1.x86_64 | -# The patch for printing correct pacakges whose the running scriptlet is had to be reverted because it broke DNF API. -# The fix is delayed to DNF5 because is will use C rpm API instead of the Python one -@xfail @bz1724779 Scenario: Output for triggered successful scriptlet of a package not present in transaction has temporarily just pkg name Given I successfully execute dnf with args "install Package-triggerin-ok" @@ -117,30 +114,19 @@ Scenario: Output for triggered successful scriptlet of a package not present in | install | Package-install-file-0:1.0-1.x86_64 | And stdout contains "triggerin scriptlet \(Package-triggerin-ok\) for Package-install-file install/update successfully done" And stdout does not contain "Running scriptlet\s*:\s*Package-install-file" - And stdout contains "Running scriptlet\s*:\s*Package-triggerin-ok-1.0-1.x86_64" -@xfail @bz1724779 Scenario: Correct output for triggered failed scriptlet of package not present in transaction Given I successfully execute dnf with args "install Package-triggerin-fail" When I execute dnf with args "install Package-install-file" Then the exit code is 0 - And stdout contains "failing on triggerin scriptlet" - And stdout contains "Running scriptlet\s*:\s*Package-triggerin-fail-1.0-1.x86_64" - And stdout does not contain "Running scriptlet\s*:\s*Package-install-file" - # There is an RPM problem, where it doesn't export internal tag for %triggerin, therefore DNF prints instead - # And stderr is - # """ - # Error in %triggerin scriptlet in rpm package Package-triggerin-fail triggered by rpm package Package-install-file-1.0-1.x86_64 - # """ - And stderr is - """ - Error in scriptlet in rpm package Package-triggerin-fail triggered by rpm package Package-install-file-1.0-1.x86_64 - """ - - -@xfail + And stderr contains "failing on triggerin scriptlet" + And stderr contains ">>> Running trigger-install scriptlet: Package-triggerin-fail-0:1.0-1.x86_64" + And stderr contains ">>> Non-critical error in trigger-install scriptlet: Package-triggerin-fail-0:1.0-1.x86_64" + And stderr does not contain "scriptlet: Package-install-file" + + @bz1724779 Scenario: Correct output for triggered failing transfiletriggerpostun scriptlet of package not present in transaction Given I successfully execute dnf with args "install Package-transfiletriggerpostun-fail" @@ -148,23 +134,15 @@ Scenario: Correct output for triggered failing transfiletriggerpostun scriptlet When I execute dnf with args "remove Package-install-file" Then the exit code is 0 And Transaction is following - | Action | Package | + | Action | Package | | remove | Package-install-file-0:1.0-1.x86_64 | - And stdout contains "transfiletriggerpostun scriptlet \(Package-transfiletriggerpostun-fail\) for uninstall transaction of Package-install-file is failing" - And stdout contains "Running scriptlet\s*:\s*Package-transfiletriggerpostun-fail-1.0-1.x86_64" - And stdout does not contain "Running scriptlet\s*:\s*Package-install-file" - #""" - #Error in %filetriggerin scriptlet in rpm package Package-transfiletriggerpostun-fail triggered by rpm package Package-install-file-1.0-1.x86_64 - #""" - And stderr is - """ - Error in scriptlet in rpm package Package-transfiletriggerpostun-fail triggered by rpm package Package-install-file-1.0-1.x86_64 - """ + And stderr contains "transfiletriggerpostun scriptlet \(Package-transfiletriggerpostun-fail\) for uninstall transaction of Package-install-file is failing" + And stderr contains ">>> Running trigger-post-uninstall scriptlet: Package-transfiletriggerpostun-fail-0:1.0-1.x86_64" + And stderr contains ">>> Non-critical error in trigger-post-uninstall scriptlet: Package-transfiletriggerpostun-fail-0:1.0-1.x86_64" + And stderr does not contain "scriptlet: Package-install-file" @bz1724779 -# Another RPM problem where it provides wrong pkg in the callback for FILETRIGGERIN, should be fixed by https://github.com/rpm-software-management/rpm/pull/892 -@xfail Scenario: Correct output for triggered successful file scriptlet of package not present in transaction Given I successfully execute dnf with args "install Package-filetriggerin-ok" When I execute dnf with args "install Package-install-file" @@ -173,29 +151,20 @@ Scenario: Correct output for triggered successful file scriptlet of package not | Action | Package | | install | Package-install-file-0:1.0-1.x86_64 | And stdout contains "filetriggerin scriptlet \(Package-filetriggerin-ok\) for Package-install-file install/update successfully done" - And stdout contains "Running scriptlet\s*:\s*Package-filetriggerin-ok-1.0-1.x86_64" - And stdout does not contain "Running scriptlet\s*:\s*Package-install-file" + And stdout does not contain "scriptlet: Package-install-file" @bz1724779 -@xfail Scenario: Correct output for triggered failing file scriptlet of package not present in transaction Given I successfully execute dnf with args "install Package-filetriggerin-fail" When I execute dnf with args "install Package-install-file" Then the exit code is 0 - And stdout contains "filetriggerin scriptlet \(Package-filetriggerin-fail\) for Package-install-file install/update is failing" - And stdout contains "Running scriptlet\s*:\s*Package-filetriggerin-fail-1.0-1.x86_64" - And stdout does not contain "Running scriptlet\s*:\s*Package-install-file" - #""" - #Error in %filetriggerin scriptlet in rpm package Package-transfiletriggerpostun-fail triggered by rpm package Package-install-file-1.0-1.x86_64 - #""" - And stderr is - """ - Error in scriptlet in rpm package Package-filetriggerin-fail triggered by rpm package Package-install-file-1.0-1.x86_64 - """ + And stderr contains "filetriggerin scriptlet \(Package-filetriggerin-fail\) for Package-install-file install/update is failing" + And stderr contains ">>> Running trigger-install scriptlet: Package-filetriggerin-fail-0:1.0-1.x86_64" + And stderr contains ">>> Non-critical error in trigger-install scriptlet: Package-filetriggerin-fail-0:1.0-1.x86_64" + And stderr does not contain "scriptlet: Package-install-file" -@xfail @bz1724779 Scenario: Correct output for triggered successful transfiletriggerpostun scriptlet of package not present in transaction Given I successfully execute dnf with args "install Package-transfiletriggerpostun-ok" @@ -203,8 +172,7 @@ Scenario: Correct output for triggered successful transfiletriggerpostun scriptl When I execute dnf with args "remove Package-install-file" Then the exit code is 0 And Transaction is following - | Action | Package | + | Action | Package | | remove | Package-install-file-0:1.0-1.x86_64 | And stdout contains "transfiletriggerpostun scriptlet \(Package-transfiletriggerpostun-ok\) for Package-install-file transaction uninstall successfully done" - And stdout contains "Running scriptlet\s*:\s*Package-transfiletriggerpostun-ok-1.0-1.x86_64" - And stdout does not contain "Running scriptlet\s*:\s*Package-install-file" + And stderr does not contain "scriptlet: Package-install-file"