Merge tag 'test-fixes-2022-04-15' of https://github.com/ammarfaizi2/liburing

Pull test fixes from Ammar Faizi:

  - Two fixes for `-Wunused-but-set-variable` warning from clang-15.

  - Fix the wrong assertion condition and testfile cleanup in
    test/submit_reuse.

  Link: https://github.com/axboe/liburing/pull/567

* tag 'test-fixes-2022-04-15' of https://github.com/ammarfaizi2/liburing:
  test/submit-reuse: Fix `-Wunused-but-set-variable` warning from clang-15
  test/35fa71a030ca: Fix `-Wunused-but-set-variable` warning from clang-15
  test/rw_merge_test: Fix the wrong assertion condition and unlink testfile
This commit is contained in:
Jens Axboe
2022-04-14 16:27:15 -06:00
3 changed files with 3 additions and 5 deletions
+1 -2
View File
@@ -238,8 +238,7 @@ static void execute_one(void);
static void loop(void)
{
int iter;
for (iter = 0;; iter++) {
for (;;) {
int pid = fork();
if (pid < 0)
exit(1);
+2 -1
View File
@@ -35,7 +35,8 @@ int main(int argc, char *argv[])
assert(!ret);
fd = open("testfile", O_RDWR | O_CREAT, 0644);
assert(ret >= 0);
assert(fd >= 0);
unlink("testfile");
ret = ftruncate(fd, 4096);
assert(!ret);
-2
View File
@@ -26,13 +26,11 @@ struct thread_data {
static void *flusher(void *__data)
{
struct thread_data *data = __data;
int i = 0;
while (!data->do_exit) {
posix_fadvise(data->fd1, 0, FILE_SIZE, POSIX_FADV_DONTNEED);
posix_fadvise(data->fd2, 0, FILE_SIZE, POSIX_FADV_DONTNEED);
usleep(10);
i++;
}
return NULL;