All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 0/3] gfs2-utils: Unit test framework improvements
Date: Fri, 11 Sep 2020 15:42:40 +0100	[thread overview]
Message-ID: <20200911144243.667554-1-anprice@redhat.com> (raw)

To date we haven't accumulated many unit tests. That's partly because the older code was never written with testability in mind and partly because the unit test infrastructure is poorly organised in the project.

This patch set aims to lower the effort needed to write new unit tests by stubbing out all of the infrastructure required and by moving the unit tests into the directories of the code they're testing. Doing that also means that the main testsuite script is no longer dependent on the unit tests and can more easily be used outside of the source directory, e.g. for CI.

Andrew Price (3):
  Reorganise unit tests
  Stub out unit tests for the main gfs2-utils
  Describe the unit tests in README.tests

 .gitignore                           | 14 ++++--
 doc/README.tests                     | 31 ++++++++++++-
 gfs2/convert/Makefile.am             |  4 ++
 gfs2/convert/check_convert.c         | 27 +++++++++++
 gfs2/convert/checks.am               |  7 +++
 gfs2/convert/gfs2_convert.c          |  2 +
 gfs2/edit/Makefile.am                |  3 ++
 gfs2/edit/check_edit.c               | 27 +++++++++++
 gfs2/edit/checks.am                  |  7 +++
 gfs2/edit/hexedit.c                  |  2 +
 gfs2/fsck/Makefile.am                |  4 ++
 gfs2/fsck/check_fsck.c               | 27 +++++++++++
 gfs2/fsck/checks.am                  |  7 +++
 gfs2/fsck/main.c                     |  2 +
 gfs2/libgfs2/Makefile.am             | 21 +++++----
 gfs2/libgfs2/check_libgfs2.c         | 21 +++++++++
 gfs2/libgfs2/check_meta.c            | 21 +++++++++
 {tests => gfs2/libgfs2}/check_rgrp.c | 67 ++++++++++++----------------
 gfs2/libgfs2/checks.am               | 32 +++++++++++++
 gfs2/mkfs/Makefile.am                |  3 ++
 gfs2/mkfs/check_grow.c               | 27 +++++++++++
 gfs2/mkfs/check_jadd.c               | 27 +++++++++++
 gfs2/mkfs/check_mkfs.c               | 27 +++++++++++
 gfs2/mkfs/checks.am                  | 17 +++++++
 gfs2/mkfs/main_grow.c                |  2 +
 gfs2/mkfs/main_jadd.c                |  2 +
 gfs2/mkfs/main_mkfs.c                |  2 +
 gfs2/tune/Makefile.am                |  4 ++
 gfs2/tune/check_tune.c               | 27 +++++++++++
 gfs2/tune/checks.am                  |  7 +++
 gfs2/tune/main.c                     |  2 +
 tests/Makefile.am                    | 53 ++--------------------
 tests/check_meta.c                   | 33 --------------
 tests/libgfs2.at                     |  9 ----
 tests/testsuite.at                   |  1 -
 35 files changed, 421 insertions(+), 148 deletions(-)
 create mode 100644 gfs2/convert/check_convert.c
 create mode 100644 gfs2/convert/checks.am
 create mode 100644 gfs2/edit/check_edit.c
 create mode 100644 gfs2/edit/checks.am
 create mode 100644 gfs2/fsck/check_fsck.c
 create mode 100644 gfs2/fsck/checks.am
 create mode 100644 gfs2/libgfs2/check_libgfs2.c
 create mode 100644 gfs2/libgfs2/check_meta.c
 rename {tests => gfs2/libgfs2}/check_rgrp.c (62%)
 create mode 100644 gfs2/libgfs2/checks.am
 create mode 100644 gfs2/mkfs/check_grow.c
 create mode 100644 gfs2/mkfs/check_jadd.c
 create mode 100644 gfs2/mkfs/check_mkfs.c
 create mode 100644 gfs2/mkfs/checks.am
 create mode 100644 gfs2/tune/check_tune.c
 create mode 100644 gfs2/tune/checks.am
 delete mode 100644 tests/check_meta.c
 delete mode 100644 tests/libgfs2.at

-- 
2.26.2



             reply	other threads:[~2020-09-11 14:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 14:42 Andrew Price [this message]
2020-09-11 14:42 ` [Cluster-devel] [PATCH 1/3] Reorganise unit tests Andrew Price
2020-09-11 14:42 ` [Cluster-devel] [PATCH 2/3] Stub out unit tests for the main gfs2-utils Andrew Price
2020-09-11 14:42 ` [Cluster-devel] [PATCH 3/3] Describe the unit tests in README.tests Andrew Price

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=20200911144243.667554-1-anprice@redhat.com \
    --to=anprice@redhat.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.