mirror of
https://github.com/openharmony/third_party_liburing.git
synced 2026-07-20 22:58:41 -04:00
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:
+1
-2
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user