Skip to content

Commit

Permalink
test: cleanup NFS test case
Browse files Browse the repository at this point in the history
Drop the disabling of kdump.service, there is hardly any test usage for
it as on Fedora it's not enabled and on RHEL it is and running simply
disabling does not do anything for us.

Drop the removal of /var/crash, enableKdump used to re-create it anyway.
Test if the dir is empty like TestKdump.testBasic does.
  • Loading branch information
jelly committed Oct 12, 2023
1 parent f3c84c1 commit 41d84ea
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/verify/check-kdump
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class KdumpHelpers(testlib.MachineCase):
self.machine.execute("grubby --args=crashkernel=192M --update-kernel=ALL")
self.machine.reboot()

self.machine.execute("mkdir -p /var/crash")
self.allow_restart_journal_messages()
self.machine.start_cockpit()
self.browser.switch_to_top()
Expand Down Expand Up @@ -419,11 +418,10 @@ class TestKdumpNFS(KdumpHelpers):
self.machines["nfs"].write("/etc/exports", "/srv/kdump 10.111.113.0/24(rw,no_root_squash)\n")
self.machines["nfs"].execute("mkdir -p /srv/kdump/var/crash; firewall-cmd --add-service nfs; systemctl restart nfs-server")

# there shouldn't be any crash reports in the target directory
self.assertEqual(m.execute("find /var/crash -maxdepth 1 -mindepth 1 -type d"), "")

# set up client machine
if m.image.startswith("fedora"):
m.execute("systemctl disable kdump")
# ensure there is no local /var/crash, should not break kdump
m.execute("rmdir /var/crash")
self.login_and_go("/kdump")
self.enableKdump()

Expand Down

0 comments on commit 41d84ea

Please sign in to comment.