13 Commits

Author SHA1 Message Date
ohci1 4b8f3098a5 update configure info for 2.14
Co-authored-by: Pavel Begunkov<asml.silence@gmail.com>
Co-authored-by: Guillem Jover<guillem@hadrons.org>
Co-authored-by: Jens Axboe<axboe@kernel.dk>
Co-authored-by: Khem Raj<raj.khem@gmail.com>
Co-authored-by: Michael de Lang<kingoipo@gmail.com>
Co-authored-by: David Disseldorp<ddiss@suse.de>
Co-authored-by: Ming Lei<ming.lei@redhat.com>
2026-04-24 09:24:13 +08:00
fangzhiyi18 0ae77b95ef 升级2.7
Signed-off-by: fangzhiyi18 <fangzhiyi1@huawei.com>
2024-10-21 02:53:20 +00:00
Ammar Faizi 1a8defca17 t/socket-rw: Don't brute force the port number
Don't brute force the port number, use `t_bind_ephemeral_port()`,
much simpler and reliable for choosing a port number that is not
in use.

Cc: Dylan Yudaken <dylany@fb.com>
Cc: Facebook Kernel Team <kernel-team@fb.com>
Cc: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>
Tested-by: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Link: https://lore.kernel.org/r/20220902071153.3168814-4-ammar.faizi@intel.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-09-02 05:56:14 -06:00
Ammar Faizi 63104dbb5c test/socket-rw: Fix UB, accessing dead object
Dereference to a local variable that has been out of its scope is
undefined behavior, it may contain garbage or the compiler may
reuse it for other local variables.

Fix this by moving the struct iov variable declarations so their
lifetime is extended.

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Hrvoje Zeba <zeba.hrvoje@gmail.com>
Fixes: 79ba71a488 ("Add deadlock socket read/write test case")
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Link: https://lore.kernel.org/r/20220107130218.1238910-3-ammarfaizi2@gnuweeb.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-01-09 09:47:16 -07:00
Ammar Faizi d7e251c891 test: Fix endianess issue on bind() and connect()
When we call `bind()` or `connect()`, the `addr` and `port` should be
in big endian value representation.

Portability notes:
  - Do not hard code the address with integer like this `0x0100007fU`.
    Instead, use `inet_addr("127.0.0.1")` to ensure portability for
    the machine with different endianess. It's also cleaner and more
    readable to use `inet_addr()` from `#include <arpa/inet.h>`.

  - Use `htons(port_number)` to make sure the port_number is properly
    choosen instead directly assign it with integer (still about
    endianess problem).

This commit fixes endianess issue in these files:
  test/232c93d07b74-test.c
  test/accept-link.c
  test/accept.c
  test/poll-link.c
  test/shutdown.c
  test/socket-rw-eagain.c
  test/socket-rw.c

Fixes: 08bd815170 ("Un-DOSify test/232c93d07b74-test.c")
Fixes: 4bce856d43 ("Improve reliability of poll/accept-link tests")
Fixes: 904989c0f1 ("Add nonblock empty socket read test")
Fixes: 7de6253569 ("test/accept: code reuse cleanup")
Fixes: 5068da320a ("Add IORING_OP_SHUTDOWN test case")
Fixes: 2b52a1be2d ("Moves function calls out of assert().")
Suggested-by: Louvian Lyndal <louvianlyndal@gmail.com>
Signed-off-by: Ammar Faizi <ammarfaizi2@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-09-27 07:45:03 -06:00
Jens Axboe 1ce4dd11b8 test/socket-rw*: don't fatally error on failure to bind
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-03-29 07:58:14 -06:00
Jens Axboe 6c012d67a1 test: use random port in range for socket tests
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-02-17 14:32:27 -07:00
Ryan Sharpelletti 2b52a1be2d Moves function calls out of assert().
This change ensures that tests will run properly outside of debug.
2020-10-28 21:07:29 +00:00
Jens Axboe 6c32e92bb0 test: add potential argument, ignore if unused
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-19 17:36:19 -06:00
Jens Axboe e502435779 Add SPDX license identifiers
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-11 20:34:12 -07:00
Jens Axboe a8f853698f Always use bundled liburing.h for test cases
Don't rely on the systems version, or that the system even has one
installed.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-11-12 12:30:38 -07:00
Jens Axboe 7469f9f6d3 test/socket-rw.c: use TCP, not pipes
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-17 17:20:20 -06:00
Jens Axboe 79ba71a488 Add deadlock socket read/write test case
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-17 16:36:37 -06:00