]> www.infradead.org Git - users/sagi/libnvme.git/commit
test: Add initial tests for mi-mctp layer
authorJeremy Kerr <jk@codeconstruct.com.au>
Thu, 16 Jun 2022 06:55:40 +0000 (14:55 +0800)
committerJeremy Kerr <jk@codeconstruct.com.au>
Wed, 29 Jun 2022 02:31:01 +0000 (10:31 +0800)
commit9f1ae9cebbff7ac6a64cbb241fbec5dfb7d31abf
tree5c10b5f2088fa1433e246f8408beb60c1a71a248
parent8f917d6bc6833da58b9cc203b0d80380a96b9211
test: Add initial tests for mi-mctp layer

This change adds a new test module, for the MCTP transport of the MI
layer.

To do this, we hook into the socket, sendmsg and recvmsg calls from the
core mi-mctp code, allowing the test to provide a mock communication
with the kernel MCTP layer.

On top of this, we write a few simple test cases for the socket error
resonses, which we'll extend in future changes.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
src/nvme/mi-mctp.c
src/nvme/private.h
test/meson.build
test/mi-mctp.c [new file with mode: 0644]