[LTP] [PATCH 0/6] Locally distributed work API

Richard Palethorpe rpalethorpe@suse.com
Tue Sep 27 18:14:02 CEST 2022


Hello,

Sorry for such a large complicated patch-set. This is essentially an
RFC, but I haven't marked it as such because some parts of it may be
ready to merge.

This is motivated by patterns I noticed both in the read_all test and
work we have been doing on the LTP parallel test executor
(LTX). Currently LTX exists outside the main LTP tree and doesn't use
the LTP library. However it would be nice to share code between some
types of test and LTX.

We have various ways of communicating and synchronising between
processes. This adds another which is particularly suited to
distributing work across multiple processes. Including work that
completes unevenly and is likely to fail.

Currently these are local processes, but LTX runs as a remote process
on a SUT. It takes commands from and returns results to a test
schedular on another machine. The interface should be relatively easy
to extend to support this scenario.

Still TODO:
* Documenation (other than commit messages)
* Integrate LTX into LTP API
* Implement variations on the read_all test (e.g. splice_all)

Richard Palethorpe (6):
  api/epoll: Add safe epoll functions
  api/evloop: Add helpers for creating an event loop
  api/state_machine: Add validating state machines
  api/channel: Add channel abstraction for message passing
  api/worker: Add library for distributing work over multiple procs
  read_all: Migrate to the worker lib

 include/tst_channel.h                   |  97 ++++
 include/tst_epoll.h                     |  36 ++
 include/tst_evloop.h                    |  32 ++
 include/tst_state_machine.h             |  50 ++
 include/tst_worker.h                    |  62 +++
 lib/tst_channel.c                       | 410 +++++++++++++++++
 lib/tst_epoll.c                         |  81 ++++
 lib/tst_evloop.c                        | 102 ++++
 lib/tst_state_machine.c                 |  98 ++++
 lib/tst_worker.c                        | 285 ++++++++++++
 testcases/kernel/fs/read_all/read_all.c | 588 +++++++-----------------
 11 files changed, 1424 insertions(+), 417 deletions(-)
 create mode 100644 include/tst_channel.h
 create mode 100644 include/tst_epoll.h
 create mode 100644 include/tst_evloop.h
 create mode 100644 include/tst_state_machine.h
 create mode 100644 include/tst_worker.h
 create mode 100644 lib/tst_channel.c
 create mode 100644 lib/tst_epoll.c
 create mode 100644 lib/tst_evloop.c
 create mode 100644 lib/tst_state_machine.c
 create mode 100644 lib/tst_worker.c

-- 
2.36.1



More information about the ltp mailing list