Automated tests
Automated tests
Posted Mar 11, 2021 19:56 UTC (Thu) by thumperward (guest, #34368)In reply to: Automated tests by corbet
Parent article: Linux 5.12's very bad, double ungood day
For an integration test that would specifically have caught this issue, sure. But given the assumption that swap_page_sector() could be called on a swap file, a unit test that called swap_page_sector() on a swap file with a given input and verify that the file contained the right bytes in the right order afterwards is something that could well have existed and caught said bug before the refectoring inadvertently exposed it.