selftests: add a new test driver for sysfs
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 8 repliesIn review
- v14 patches 5 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | selftests: add tests_sysfs moduleMAINTAINERS lib/ lib/ +4 more | +2177 | 4 replies | |
| 2/4 | kernfs: add initial failure injection supportDocumentation/ MAINTAINERS fs/ +5 more | +207 | 0 replies | |
| 3/4 | test_sysfs: add support to use kernfs failure injectionlib/ lib/ tools/ +1 more | +211 | 0 replies | |
| 4/4 | test_sysfs: demonstrate deadlock fixlib/ tools/ | +64 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/4] selftests: add a new test driver for sysfs
This v2 rebases onto the latest linux-next tag, next-20210701. A few changes were needed, namely:
1) changes kernfs_init_failure_injection() to return int instead of void. On the latest linux-next we have a new static build check for this, so this mistake was captured when building.
2) I made kernfs_init_failure_injection static
3) lib/test_sysfs.c moved to the new blk_alloc_disk() added by Christoph as direct queue allocation is no longer supported, ie, blk_alloc_queue() is no longer exported. This work was done by Christoph in preparation to help make add_disk*() callers eventually return an error code and make the error handling much saner. Because of this same change blk_cleanup_queue() is no longer needed so we embrace the shiny new blk_cleanup_disk().
I've put this up on my linux-next git tree [0] under the branch named 20210701-sysfs-fix-races-v2.
Luis Chamberlain (4):
selftests: add tests_sysfs module
kernfs: add initial failure injection support
test_sysfs: add support to use kernfs failure injection
test_sysfs: demonstrate deadlock fix
.../fault-injection/fault-injection.rst | 22 + MAINTAINERS | 9 +- fs/kernfs/Makefile | 1 + fs/kernfs/failure-injection.c | 83 + fs/kernfs/file.c | 13 + fs/kernfs/kernfs-internal.h | 72 + include/linux/kernfs.h | 5 + lib/Kconfig.debug | 23 + lib/Makefile | 1 + lib/test_sysfs.c | 1027 ++++++++++++ tools/testing/selftests/sysfs/Makefile | 12 + tools/testing/selftests/sysfs/config | 5 + tools/testing/selftests/sysfs/sysfs.sh | 1376 +++++++++++++++++ 13 files changed, 2648 insertions(+), 1 deletion(-) create mode 100644 fs/kernfs/failure-injection.c create mode 100644 lib/test_sysfs.c create mode 100644 tools/testing/selftests/sysfs/Makefile create mode 100644 tools/testing/selftests/sysfs/config create mode 100755 tools/testing/selftests/sysfs/sysfs.sh
Signature · 1 line
2.27.0