# Testing crash recovery features in a CI environment

DevFeed: [Testing crash recovery features in a CI environment](<https://devfeed.tech/articles/testing-crash-recovery-features-in-a-ci-environment-90368.md>)

Original publisher: [Read original article](<https://andrea.corbellini.blog/2025/09/09/testing-crash-recovery-features-in-ci/>)

Author: andreacorbellini

Published: 2025-09-09T00:05:00Z

Content type: tutorial

Language: en

Sources: [Andrea Corbellini](<https://devfeed.tech/sources/andrea-corbellini.md>)

Topics: [Test automation](<https://devfeed.tech/topics/test-automation.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [btrfs](<https://devfeed.tech/topics/btrfs.md>)

Tags: [automation](<https://devfeed.tech/tags/automation.md>), [btrfs](<https://devfeed.tech/tags/btrfs.md>), [bug](<https://devfeed.tech/tags/bug.md>), [information-technology](<https://devfeed.tech/tags/information-technology.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

The author describes building Linux virtual machine tests that simulate kernel crashes while a Rust crate updates files atomically. The suite checks file contents across filesystems, reproduces an issue involving btrfs and anonymous temporary files, and runs in GitHub Actions. Its current approach uses the host kernel, limiting tests on other kernels and platforms.

## Source excerpt

About two years ago I wrote a Rust crate to fulfill this promise: If a crash occurs while updating a file, the file either contains the old contents, or the new contents, nothing in between. This crate essentially solves the following problem: when you update a file, generally you open it, truncate it, write to it block-by-block, and eventually close it. The problem with ...