Re: [PATCH v2 3/9] test-write-threshold: rewrite test_threshold_(not_)trigger tests

2021-05-05 Thread Vladimir Sementsov-Ogievskiy
05.05.2021 17:28, Max Reitz wrote: On 04.05.21 10:25, Vladimir Sementsov-Ogievskiy wrote: These tests use bdrv_write_threshold_exceeded() API, which is used only for test. Well, now.  That used to be different before patch 1. Better is testing real API, which is used in block.c as well.

Re: [PATCH v2 3/9] test-write-threshold: rewrite test_threshold_(not_)trigger tests

2021-05-05 Thread Max Reitz
On 04.05.21 10:25, Vladimir Sementsov-Ogievskiy wrote: These tests use bdrv_write_threshold_exceeded() API, which is used only for test. Well, now. That used to be different before patch 1. Better is testing real API, which is used in block.c as well. So, let's call

[PATCH v2 3/9] test-write-threshold: rewrite test_threshold_(not_)trigger tests

2021-05-04 Thread Vladimir Sementsov-Ogievskiy
These tests use bdrv_write_threshold_exceeded() API, which is used only for test. Better is testing real API, which is used in block.c as well. So, let's call bdrv_write_threshold_check_write(), and check is bs->write_threshold_offset cleared or not (it's cleared iff threshold triggered). Also