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 13, 2023
1 parent 2df1a7e commit 657302e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 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 @@ -421,8 +420,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")

# ensure there is no local /var/crash, should not break kdump
m.execute("rmdir /var/crash")
# 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
self.login_and_go("/kdump")
self.enableKdump()

Expand Down

0 comments on commit 657302e

Please sign in to comment.