Commit Graph

12 Commits

Author SHA1 Message Date
fangzhiyi18 0ae77b95ef 升级2.7
Signed-off-by: fangzhiyi18 <fangzhiyi1@huawei.com>
2024-10-21 02:53:20 +00:00
Eli Schwartz 4475e75034 tests: more work on updating exit codes to use enum-based status reporting
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Link: https://lore.kernel.org/r/20220706034059.2817423-4-eschwartz93@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-06 06:44:52 -06:00
Eli Schwartz c0cd89e898 tests: mark passing tests which exit early as skipped
Instead of logging the console message "skipped" and reporting success,
return a skip status for the test harness to catch.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2022-06-28 10:37:33 -04:00
Eli Schwartz dd35f16b1d tests: emit a skip exit code if invoked with additional argv
These are skipped because they are not applicable if files/devices are
provided for a special test run. Note this in the return status.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2022-06-28 10:37:33 -04:00
Eli Schwartz 3467e7ac6d tests: migrate some tests to use enum-based exit codes
For maintainability and clarity, eschew the use of integer literals in
reporting test statuses. Instead, use a helper enum which contains
various values from the GNU exitcode protocol. Returning 0 or 1 is
obvious, and in the previous commit the ability to read "skip" (77) was
implemented. The final exit status is 99, which indicates some kind of
error in running the test itself.

A partial migration of existing pass/fail values in test sources is
included.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2022-06-28 10:37:33 -04:00
Ammar Faizi c90d0b874c test/double-poll-crash: Skip this test if the mmap() fails
This test is very prone to hiting a SIGSEGV signal due to missing error
handling on mmap() calls. This especially often happens when executing
`runtests-parallel`. Let's just skip this test if those calls fail
instead of having a random segfault with no clear resolution.

Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-04-22 15:15:28 -06:00
Ammar Faizi 1ae61f6898 test: Add missing SPDX-License-Identifier
This adds missing SPDX-License-Identifier for:
  test/ce593a6c480a-test.c
  test/double-poll-crash.c
  test/exec-target.c
  test/lfs-openat-write.c
  test/lfs-openat.c
  test/pipe-eof.c
  test/pollfree.c
  test/sendmsg_fs_cve.c
  test/skip-cqe.c
  test/splice.c
  test/sq-poll-kthread.c
  test/sqpoll-cancel-hang.c
  test/sqpoll-disable-exit.c
  test/sqpoll-exit-hang.c
  test/sqpoll-sleep.c

Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
2022-02-23 17:06:36 +07:00
Jens Axboe 53dafc5397 test/double-poll-crash: only run on x86/x86-64
Various syzbot oddities makes this x86 specific, so just disable
the run on other archs. Also kill useless mmap() while in there.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-02-09 10:56:59 -07:00
Guillem Jover d108506746 test: Remove unused syscall number definitions
These are leftovers from when the tests used direct syscall(2) calls.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
2021-09-13 23:58:39 +02:00
Jens Axboe a61036ac8f test: get rid of x86_64'isms in the test code
Most/all of these are from syzbot. Turn them into regular system calls,
and just let liburing sort out the non-x86 ones.

Fixes: https://github.com/axboe/liburing/issues/322
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-03-31 13:23:56 -06:00
Jens Axboe a1c610c48f test/double-poll-crash: ignore arguments
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-15 11:53:38 -07:00
Jens Axboe 85bdbaa147 Add test case for double poll crash
This is the generated syzkaller reproducer. Should be fixed by this
mainline commit:

commit d4e7cd36a90e38e0276d6ce0c20f5ccef17ec38c (HEAD -> io_uring-5.9, origin/io_uring-5.9)
Author: Jens Axboe <axboe@kernel.dk>
Date:   Sat Aug 15 11:44:50 2020 -0700

    io_uring: sanitize double poll handling

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-15 11:51:29 -07:00