westerndigitalcorporation / zenfs

ZenFS is a storage backend for RocksDB that enables support for ZNS SSDs and SMR HDDs.
GNU General Public License v2.0
243 stars 88 forks source link

test: Example integration test based on RocksDB gtest infrastructure #172

Closed metaspace closed 2 years ago

metaspace commented 2 years ago

This patch adds a simple integration test based on RocksDB gtest infrastructure. To be functional, the patch requires changes in rocksdb. The patch for rocksdb is currenlty on top of the 6.29.3 branch and can be found here.

metaspace commented 2 years ago

Adding a small Readme or a Guide on how to add more tests or run the tests, will help a lot.

I'll update the ZenFS docs with instructions on how to execute and pointers to gtest docs.

metaspace commented 2 years ago

Now that I think of it, I think that it would be better if the test suite create the ZenFS filesystem in SetUp() rather than relying on it being present on the device. Will fix that.

metaspace commented 2 years ago

Added a github action to run the tests. If they complete without error they produce a coverage report that can be downloaded as a workflow artifact. See this link bottom of page.

I had to move come code from the zenfs utility to the library for the tests to be able to mkfs and mount without duplicated code. It's a lot of changes, but I tried to split it into a bunch of patches that can be reviewed one by one.

metaspace commented 2 years ago

For commit c5f4e30: .github/workflows/mtr-test.yaml would also need to bump percona-server to Percona-Server-8.0.28-19

Bumped percona server to 8.0.28-19.

metaspace commented 2 years ago

Rebased on master

metaspace commented 2 years ago

Seems github is broken. I will close this PR and open a new one.