Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kola/tests/misc/verity: add recursive list to provoke panic #202

Merged
merged 1 commit into from
Aug 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions kola/tests/misc/verity.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ func VerityCorruption(c cluster.TestCluster) {
c.MustSSH(m, fmt.Sprintf(`sudo dd if=/dev/zero of=%s bs=1M count=10 status=none`, usrdev))

// make sure we flush everything so the filesystem has to go through to the device backing verity before fetching a file from /usr
// (done in one execution because after flushing command itself runs the corruption could already be detected).
_, err := c.SSH(m, "sudo /bin/sh -c 'sync; echo -n 3 >/proc/sys/vm/drop_caches; cat /usr/lib/os-release'")
// (done in one execution because after flushing command itself runs the corruption could already be detected,
// we just need to give arm64 QEMU tests a few more chances to detect the corruption while one 'cat' execution is enough on amd64).
_, err := c.SSH(m, "sudo /bin/sh -c 'sync; echo -n 3 >/proc/sys/vm/drop_caches; cat /usr/lib/os-release; ls -R /usr'")
if err == nil {
c.Fatalf("verity did not prevent reading from a corrupted disk (expected kernel panic)!")
}
Expand Down