summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherle2022-08-16 21:12:36 +0200
committerMichael Scherle2022-08-16 21:12:36 +0200
commitbccf8b86cb164d4def3e44f1cf85ee3f2edf5a83 (patch)
tree26e4dc61f6f3a3c59162999effcac08c93f5985f
parentchanged test to use net 6 (diff)
downloaddnbd3-bccf8b86cb164d4def3e44f1cf85ee3f2edf5a83.tar.gz
dnbd3-bccf8b86cb164d4def3e44f1cf85ee3f2edf5a83.tar.xz
dnbd3-bccf8b86cb164d4def3e44f1cf85ee3f2edf5a83.zip
improvements to cowtest readme
-rw-r--r--src/cowtest/readme.md56
1 files changed, 29 insertions, 27 deletions
diff --git a/src/cowtest/readme.md b/src/cowtest/readme.md
index 876bf79..66bdffa 100644
--- a/src/cowtest/readme.md
+++ b/src/cowtest/readme.md
@@ -9,46 +9,46 @@
# Introduction
-This test suit is for verifying that the fuse cow implementation works correctly. It can verify that read and writes on the cow fuse client work correctly and that the cow server merges the image correctly.
+This test collection is used to check whether the cow implementation of the fuse client is working correctly. It can check whether read and write operations on the cow fuse client work correctly and whether the cow server merges the image correctly.
# Usage
### Parameters
-- `-c <path>` generates a test image at given path. This image should be loaded for the tests to work.
-- `-t <path>` runs the tests on the image at the given past.
-- `-v <path>` verifies that previous tests on the image were successful (also reads the image completely).
-- `-r <mountedImagePath> <normalImagePath>` random writes and changes size of two images. After a key press both images are compared for equalness.
-- `-x <mergedImagePath> <normalImagePath>` Checks both images are compared for equalness.
+- `-c <path>` generates a test image in the specified path. This image is needed for the tests.
+- `-t <file>` performs the standard tests on the image at the specified location.
+- `-v <file>` checks if previous tests of the image were successful (also reads the image completely).
+- `-r <mountedImageFile> <normalImageFile>` writes randomly and changes the size of two images. After pressing ctrl +c, both images are compared for equality.
+- `-x <mergedImageFile> <normalImageFile>` Checks if both images are equal.
### Example usage for standard test
-1. Generate the test image with `-c <path>` and copy it to the image location of the dnbd3 server. Also make sure that the cow servers `OriginalImageDirectory` points to the same Directory or copied in that Directory too. This step is only needed once for setting up.
+1. Generate the test image with `-c <path>` and copy it into the image directory of the dnbd3 server. Also make sure that the `OriginalImageDirectory` of the Cow server points to the same directory or has also been copied to this directory. This step is only required once for the setup.
2. Start the dnbd3 and cow server.
-3. Mount the image in cow mode.
-4. Run the test with `-t <path>`, where the path points to the mounted image.
+3. Mount the image in cow mode (`-c <path>` and `-C <address>` on the fuse client).
+4. Run the test with `-t <path>`, with the path pointing to the mounted image.
5. Optional verify again with `-v <path>`.
-6. Optional unmount the image and then load it again (with `-L <path>` in the fuse client). Then verify the loaded image with `-v <path>`.
-7. Unmount and merge the image.
+6. Optionally unmount the image and then load it again (with `-L <path>` instead of `-C <path>` on the Fuse client). Then verify the loaded image with `-v <path>`.
+7. Unmount and merge the image (`-m` on the fuse client).
8. Verify the merged image from the cow server with `-v <path>`.
### Example usage for random writes
-1. Generate the test image with `-c <path>` and copy it to the image location of the dnbd3 server. Also make sure that the cow servers `OriginalImageDirectory` points to the same Directory or copied in that Directory too. This step is only needed once for setting up.
-2. Copy the generated image to another location.
+1. Generate the test image with `-c <path>` and copy it into the image directory of the dnbd3 server. Also make sure that the `OriginalImageDirectory` of the Cow server points to the same directory or has also been copied to this directory. This step is only required once for the setup.
+2. Make a copy of the created image in another location.
3. Start the dnbd3 and cow server.
-4. Mount the image in cow mode.
-5. Run the test with `-t <mountedImagePath> <normalImagePath>`, where the `<mountedImagePath>` points to the mounted image and `<normalImagePath>` points to the copied image on the disk.
-6. After some time press enter and both images will be compared for equalness.
-7. Unmount the image and merge.
-8. Run `-x <mergedImagePath> <normalImagePath>` where the `<mergedImagePath>` points to the merged image and `<normalImagePath>` points to the copied image on the disk. This will verify that the merged image is equal to the image on the disk.
+4. Mount the image in cow mode (`-c <path>` and `-C <address>` on the fuse client).
+5. Run the test with `-t <mountedImagePath> <normalImagePath>`, where `<mountedImagePath>` refers to the mounted image and `<normalImagePath>` refers to the copied image on the hard disk.
+6. After some time, press ctrl+c to end the test. Afterwards, both images are automatically compared for equality.
+7. Unmount the image and merge it(`-m` on the fuse client).
+8. Run `-x <mergedImagePath> <normalImagePath>` where `<mergedImagePath>` points to the merged image and `<normalImagePath>` points to the copied image on the hard disk. This verifies that the merged image matches the image on the hard disk.
# Tests
### TestSingleBit
-Reads the first block and verifies that all bits are 0. Then it sets the first bit to 1 and writes it.
-This test, tests basic functionality and verifies that the image is still 'clean'.
-Then it sets a single Bit in the second block to 1, to verify padding works correctly.
+Reads the first block and checks whether all bits are 0. Then sets the first bit to 1 and writes it.
+This test checks the basic functions and whether the image is still "clean".
+Then sets a single bit in the second block to 1 to verify that padding works correctly.
| offset | size |
| -------| -----|
@@ -64,7 +64,7 @@ Tests that continuous writes over two DNBD3_BLOCK's are possible.
### WriteNotOnBlockBorder
-Verifies that writes not aligned to block borders (multiples of 4096).
+Verifies that writes are not aligned to block boundaries (multiples of 4096).
| offset | size |
| -------| -----|
@@ -78,7 +78,7 @@ Verifies that writes not aligned to block borders (multiples of 4096).
|DNBD3_BLOCK_SIZE * 35 | DNBD3_BLOCK_SIZE * 10|
### WriteOverL2
-Tests that continuous writes over L2 borders are possible.
+Tests whether continuous writes across L2 boundaries are possible.
| offset | size |
| -------| -----|
@@ -86,7 +86,8 @@ Tests that continuous writes over L2 borders are possible.
### MultipleWrites
-Writes multiple times on the same Blocks different data. The separate writes can be delayed with the `-d` parameter. This is useful to test if uploading the same blocks multiple times works as intended.
+Writes different data several times on the same block. The individual writes can be delayed with the parameter `-d`. This is useful to test whether uploading the same blocks multiple times works as intended.
+
| offset | size |
| -------| -----|
@@ -94,11 +95,12 @@ Writes multiple times on the same Blocks different data. The separate writes can
### fileSizeChanges
-Tests file size changes. First in increases the file size with a truncate by 2 * l2Capacity. It then checks that all the bits in the new allocated space are set to 0. Then it writes data to it to verify writes are possible. After that it truncates it back to the original size. Then it truncates it back to
-the original size + 2 * l2Capacity and verifies that the again all bits in the new allocated space are 0 (so that the before written data is set to 0 again).
+Tests changes to the file size. First it increases the file size by 2 * l2Capacity with a truncate. Then it checks if all bits in the newly allocated memory space are set to 0. Then it writes data to the file to check if writes are possible. After that, it is truncated back to the original size. Then it is reduced again to
+the original size + 2 * l2Capacity and checks whether all bits in the newly allocated memory space are 0 again (so that the previously written data is set to 0 again).
### LongNonAlignedPattern
-This test writes writes an long pattern over 3 l2 borders. The pattern repeats chars from 0 to 254, so it's not a multiple of 4096, which therefore results that all Blocks are filled with different data. Also, this test is not block aligned.
+This test writes a long pattern over 3 l2 blocks. The pattern repeats chars from 0 to 254, so it is not a multiple of 4096, which results in all blocks being filled with different data. Furthermore, this test is not block-aligned.
+
| offset | size |
| -------| -----|