All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Kent Gibson <warthog618@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-gpio@vger.kernel.org, Bartosz Golaszewski <brgl@bgdev.pl>
Subject: [libgpiod v2][PATCH v3 0/3] libgpiod v2: rewrite tests for the C library
Date: Thu,  3 Mar 2022 10:18:33 +0100	[thread overview]
Message-ID: <20220303091836.168223-1-brgl@bgdev.pl> (raw)

This series contains a rework of the line_config interface and a bit patch
that replaces the old test suite for libgpiod v1 based on gpio-mockup with
a one covering around 95% of the libgpiod v2 code based on the upcoming
gpio-sim module.

v1 -> v2:
- drop applied patches
- improve documentation
- skip offsets that are overridden in line_config but not actually requested

v2 -> v3:
- add a patch adding an enum for line values
- rework the mechanism for retrieving overrides
- add new "constructors" for line_config
- incorporate part of Kent's points in the documentation
- a bunch of improvements to tests as per Kent's reviews

Bartosz Golaszewski (3):
  API: add an enum for line values
  line-config: expose the override logic to users
  tests: rewrite core C tests using libgpiosim

 configure.ac                 |    8 +-
 include/gpiod.h              |  603 +++++++++++++------
 lib/line-config.c            |  871 ++++++++++++++++++---------
 tests/Makefile.am            |   24 +-
 tests/gpiod-test-helpers.c   |   49 ++
 tests/gpiod-test-helpers.h   |  139 +++++
 tests/gpiod-test-sim.c       |  308 ++++++++++
 tests/gpiod-test-sim.h       |   42 ++
 tests/gpiod-test.c           |  233 +-------
 tests/gpiod-test.h           |   83 +--
 tests/gpiosim/gpiosim.c      |    1 +
 tests/mockup/Makefile.am     |   11 -
 tests/mockup/gpio-mockup.c   |  496 ----------------
 tests/mockup/gpio-mockup.h   |   36 --
 tests/tests-chip.c           |  282 ++++-----
 tests/tests-edge-event.c     |  490 +++++++++++++++
 tests/tests-event.c          |  908 ----------------------------
 tests/tests-info-event.c     |  301 ++++++++++
 tests/tests-line-config.c    |  503 ++++++++++++++++
 tests/tests-line-info.c      |  318 ++++++++++
 tests/tests-line-request.c   |  526 ++++++++++++++++
 tests/tests-line.c           | 1091 ----------------------------------
 tests/tests-misc.c           |   80 ++-
 tests/tests-request-config.c |   90 +++
 tools/gpioget.c              |    6 +-
 tools/gpiomon.c              |    6 +-
 tools/gpioset.c              |    9 +-
 27 files changed, 4017 insertions(+), 3497 deletions(-)
 create mode 100644 tests/gpiod-test-helpers.c
 create mode 100644 tests/gpiod-test-helpers.h
 create mode 100644 tests/gpiod-test-sim.c
 create mode 100644 tests/gpiod-test-sim.h
 delete mode 100644 tests/mockup/Makefile.am
 delete mode 100644 tests/mockup/gpio-mockup.c
 delete mode 100644 tests/mockup/gpio-mockup.h
 create mode 100644 tests/tests-edge-event.c
 delete mode 100644 tests/tests-event.c
 create mode 100644 tests/tests-info-event.c
 create mode 100644 tests/tests-line-config.c
 create mode 100644 tests/tests-line-info.c
 create mode 100644 tests/tests-line-request.c
 delete mode 100644 tests/tests-line.c
 create mode 100644 tests/tests-request-config.c

-- 
2.30.1


             reply	other threads:[~2022-03-03  9:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03  9:18 Bartosz Golaszewski [this message]
2022-03-03  9:18 ` [libgpiod v2][PATCH v3 1/3] API: add an enum for line values Bartosz Golaszewski
2022-03-05  5:50   ` Kent Gibson
2022-03-03  9:18 ` [libgpiod v2][PATCH v3 2/3] line-config: expose the override logic to users Bartosz Golaszewski
2022-03-05  5:51   ` Kent Gibson
2022-03-05 20:57     ` Bartosz Golaszewski
2022-03-03  9:18 ` [libgpiod v2][PATCH v3 3/3] tests: rewrite core C tests using libgpiosim Bartosz Golaszewski
2022-03-05  5:51   ` Kent Gibson

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=20220303091836.168223-1-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=warthog618@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.