Skip to content

Commit

Permalink
test: cleanup NFS test case
Browse files Browse the repository at this point in the history
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 483c8eb commit 74eecad
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 @@ -25,7 +25,6 @@ class KdumpHelpers(testlib.MachineCase):
def setUp(self):
super().setUp()
self.allow_restart_journal_messages()
self.machine.execute("mkdir -p /var/crash")

def enableKdump(self):
# all current Fedora/CentOS/RHEL images use BootLoaderSpec
Expand Down Expand Up @@ -424,8 +423,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 74eecad

Please sign in to comment.