From: Zhang Xiaoxu <zhangxiaoxu@huaweicloud.com>
To: zhangxiaoxu5@huawei.com, weiyongjun1@huawei.com,
linux-kernel@vger.kernel.org, broonie@kernel.org,
rostedt@goodmis.org, mingo@redhat.com, frowand.list@gmail.com,
linux-spi@vger.kernel.org
Subject: [PATCH -next 00/14] Implement a ligth weight device driver test framework
Date: Sat, 18 Nov 2023 18:40:26 +0800 [thread overview]
Message-ID: <20231118104040.386381-1-zhangxiaoxu@huaweicloud.com> (raw)
From: Zhang Xiaoxu <zhangxiaoxu@huawei.com>
Implement a ligth weight device driver test framework, KDDV(Kernel
Device Driver Verification). Which using eBPF based bus controllers
to mockup device chipsets.
The kddv already discover the following issues:
fc92d9e3de0b iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw
58143c1ed588 iio: health: afe4403: Fix oob read in afe4403_read_raw
3f4033a811bc iio: filter: admv8818: close potential out-of-bounds read in __admv8818_read_[h|l]pf_freq()
8c9a59939deb Input: raydium_ts_i2c - fix memory leak in raydium_i2c_send()
7485edb2b6ca media: i2c: ov772x: Fix memleak in ov772x_probe()
bab76514aca3 regulator: da9121: Fix uninit-value in da9121_assign_chip_model()
9d47e01b9d80 power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type()
...
Zhang Xiaoxu (14):
kddv/core: Implement a ligth weight device driver test framework
kddv/core: Allow test case config bpf program
kddv/core: Add io fault support to bpf program
kddv/core: Check kmsg before return from test case
kddv/core: Support kernel memory leak detector
kddv/core: Add page and slab fault inject support
kddv/cmd: Add command to create/remove mockup device
kddv/cmd: Add command to run testcases
kddv/core: Add test support for SPI driver
kddv/tests: Add support for testing hwmon driver
kddv/tests/hwmon: Add test cases for max31722 driver
kddv/tests: Add support for testing mtd driver
kddv/tests/mtd: Add test cases for mchp23k256 driver
kddv: Add document for kddv
Documentation/dev-tools/index.rst | 1 +
Documentation/dev-tools/kddv.rst | 183 ++++++++
tools/testing/kddv/.gitignore | 3 +
tools/testing/kddv/Makefile | 25 ++
tools/testing/kddv/kddv/Makefile | 28 ++
tools/testing/kddv/kddv/__init__.py | 0
tools/testing/kddv/kddv/cmds/__init__.py | 0
tools/testing/kddv/kddv/cmds/mock.py | 105 +++++
tools/testing/kddv/kddv/cmds/test.py | 75 ++++
tools/testing/kddv/kddv/cmds/utils.py | 28 ++
tools/testing/kddv/kddv/core/__init__.py | 13 +
.../testing/kddv/kddv/core/buses/__init__.py | 13 +
tools/testing/kddv/kddv/core/buses/spi.py | 74 +++
tools/testing/kddv/kddv/core/consts.py | 13 +
tools/testing/kddv/kddv/core/ddunit.py | 83 ++++
tools/testing/kddv/kddv/core/device.py | 78 ++++
tools/testing/kddv/kddv/core/dmesg.py | 41 ++
tools/testing/kddv/kddv/core/driver.py | 82 ++++
tools/testing/kddv/kddv/core/environ.py | 65 +++
tools/testing/kddv/kddv/core/failnth.py | 57 +++
tools/testing/kddv/kddv/core/faulter.py | 48 ++
.../testing/kddv/kddv/core/faults/__init__.py | 13 +
tools/testing/kddv/kddv/core/faults/fail.py | 86 ++++
tools/testing/kddv/kddv/core/faults/page.py | 40 ++
tools/testing/kddv/kddv/core/faults/slab.py | 36 ++
tools/testing/kddv/kddv/core/memleak.py | 39 ++
tools/testing/kddv/kddv/core/mockup.py | 193 ++++++++
tools/testing/kddv/kddv/core/model.py | 95 ++++
tools/testing/kddv/kddv/data/Makefile | 21 +
tools/testing/kddv/kddv/data/bpf/Makefile | 22 +
.../kddv/data/bpf/include/bpf-xfer-conf.h | 124 +++++
.../kddv/kddv/data/bpf/mtd/mtd-mchp23k256.c | 72 +++
.../kddv/kddv/data/bpf/spi/spi-xfer-base.h | 99 ++++
.../kddv/kddv/data/bpf/spi/spi-xfer-r1v1.c | 51 +++
.../kddv/kddv/data/bpf/spi/spi-xfer-r1v2.c | 51 +++
.../kddv/kddv/data/bpf/spi/spi-xfer-r1v3.c | 86 ++++
.../kddv/kddv/data/bpf/spi/spi-xfer-r2v1.c | 51 +++
.../kddv/kddv/data/bpf/spi/spi-xfer-r2v2.c | 51 +++
.../kddv/kddv/data/bpf/spi/spi-xfer-r3v1.c | 52 +++
.../kddv/kddv/data/bpf/spi/spi-xfer-r4v4.c | 89 ++++
tools/testing/kddv/kddv/tests/__init__.py | 0
.../testing/kddv/kddv/tests/hwmon/__init__.py | 425 ++++++++++++++++++
.../kddv/kddv/tests/hwmon/test_max31722.py | 40 ++
tools/testing/kddv/kddv/tests/mtd/__init__.py | 63 +++
.../kddv/kddv/tests/mtd/test_mchp23k256.py | 41 ++
45 files changed, 2855 insertions(+)
create mode 100755 Documentation/dev-tools/kddv.rst
create mode 100644 tools/testing/kddv/.gitignore
create mode 100644 tools/testing/kddv/Makefile
create mode 100644 tools/testing/kddv/kddv/Makefile
create mode 100755 tools/testing/kddv/kddv/__init__.py
create mode 100755 tools/testing/kddv/kddv/cmds/__init__.py
create mode 100755 tools/testing/kddv/kddv/cmds/mock.py
create mode 100755 tools/testing/kddv/kddv/cmds/test.py
create mode 100755 tools/testing/kddv/kddv/cmds/utils.py
create mode 100755 tools/testing/kddv/kddv/core/__init__.py
create mode 100755 tools/testing/kddv/kddv/core/buses/__init__.py
create mode 100755 tools/testing/kddv/kddv/core/buses/spi.py
create mode 100755 tools/testing/kddv/kddv/core/consts.py
create mode 100755 tools/testing/kddv/kddv/core/ddunit.py
create mode 100755 tools/testing/kddv/kddv/core/device.py
create mode 100755 tools/testing/kddv/kddv/core/dmesg.py
create mode 100755 tools/testing/kddv/kddv/core/driver.py
create mode 100755 tools/testing/kddv/kddv/core/environ.py
create mode 100755 tools/testing/kddv/kddv/core/failnth.py
create mode 100755 tools/testing/kddv/kddv/core/faulter.py
create mode 100755 tools/testing/kddv/kddv/core/faults/__init__.py
create mode 100755 tools/testing/kddv/kddv/core/faults/fail.py
create mode 100755 tools/testing/kddv/kddv/core/faults/page.py
create mode 100755 tools/testing/kddv/kddv/core/faults/slab.py
create mode 100755 tools/testing/kddv/kddv/core/memleak.py
create mode 100755 tools/testing/kddv/kddv/core/mockup.py
create mode 100755 tools/testing/kddv/kddv/core/model.py
create mode 100644 tools/testing/kddv/kddv/data/Makefile
create mode 100644 tools/testing/kddv/kddv/data/bpf/Makefile
create mode 100644 tools/testing/kddv/kddv/data/bpf/include/bpf-xfer-conf.h
create mode 100644 tools/testing/kddv/kddv/data/bpf/mtd/mtd-mchp23k256.c
create mode 100644 tools/testing/kddv/kddv/data/bpf/spi/spi-xfer-base.h
create mode 100644 tools/testing/kddv/kddv/data/bpf/spi/spi-xfer-r1v1.c
create mode 100644 tools/testing/kddv/kddv/data/bpf/spi/spi-xfer-r1v2.c
create mode 100644 tools/testing/kddv/kddv/data/bpf/spi/spi-xfer-r1v3.c
create mode 100644 tools/testing/kddv/kddv/data/bpf/spi/spi-xfer-r2v1.c
create mode 100644 tools/testing/kddv/kddv/data/bpf/spi/spi-xfer-r2v2.c
create mode 100644 tools/testing/kddv/kddv/data/bpf/spi/spi-xfer-r3v1.c
create mode 100644 tools/testing/kddv/kddv/data/bpf/spi/spi-xfer-r4v4.c
create mode 100755 tools/testing/kddv/kddv/tests/__init__.py
create mode 100755 tools/testing/kddv/kddv/tests/hwmon/__init__.py
create mode 100755 tools/testing/kddv/kddv/tests/hwmon/test_max31722.py
create mode 100644 tools/testing/kddv/kddv/tests/mtd/__init__.py
create mode 100755 tools/testing/kddv/kddv/tests/mtd/test_mchp23k256.py
--
2.34.1
next reply other threads:[~2023-11-18 10:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-18 10:40 Zhang Xiaoxu [this message]
2023-11-18 10:40 ` [PATCH -next 01/14] kddv/core: Implement a ligth weight device driver test framework Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 02/14] kddv/core: Allow test case config bpf program Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 03/14] kddv/core: Add io fault support to " Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 04/14] kddv/core: Check kmsg before return from test case Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 05/14] kddv/core: Support kernel memory leak detector Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 06/14] kddv/core: Add page and slab fault inject support Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 07/14] kddv/cmd: Add command to create/remove mockup device Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 08/14] kddv/cmd: Add command to run testcases Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 09/14] kddv/core: Add test support for SPI driver Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 10/14] kddv/tests: Add support for testing hwmon driver Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 11/14] kddv/tests/hwmon: Add test cases for max31722 driver Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 12/14] kddv/tests: Add support for testing mtd driver Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 13/14] kddv/tests/mtd: Add test cases for mchp23k256 driver Zhang Xiaoxu
2023-11-18 10:40 ` [PATCH -next 14/14] kddv: Add document for kddv Zhang Xiaoxu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231118104040.386381-1-zhangxiaoxu@huaweicloud.com \
--to=zhangxiaoxu@huaweicloud.com \
--cc=broonie@kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=weiyongjun1@huawei.com \
--cc=zhangxiaoxu5@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).