linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tobin at kernel.org (Tobin C. Harding)
Subject: [PATCH v4 0/6] lib/string: Add strscpy_pad() function
Date: Fri,  5 Apr 2019 12:58:53 +1100	[thread overview]
Message-ID: <20190405015859.32755-1-tobin@kernel.org> (raw)

Hi Shua,

Here is the set with cleanup as suggested by Kees on v3.

Configured, built, and tested all modules loaded by
tools/testing/selftests/lib/*.sh

>From previous cover letters ...

While doing the testing for strscpy_pad() it was noticed that there is
duplication in how test modules are being fed to kselftest and also in
the test modules themselves.

This set makes an attempt at adding a framework to kselftest for writing
kernel test modules.  It also adds a script for use in creating script
test runners for kselftest.  My macro-foo is not great, all criticism
and suggestions very much appreciated.  The design is based on test
modules lib/test_printf.c, lib/test_bitmap.c, lib/test_xarray.c.

Changes since last version:

 - Remove dependency on Bash (thanks Kees)
 - Use oneliner to implement kselftest test runners (thanks Kees)
 - Squash patch that adds kselftest script creator script with patch
   that uses it. 
 - Fix typos (thanks Randy)
 - Add Kees' Acked-by tags to all patches

thanks,
Tobin.


Tobin C. Harding (6):
  lib/test_printf: Add empty module_exit function
  kselftest: Add test runner creation script
  kselftest: Add test module framework header
  lib: Use new kselftest header
  lib/string: Add strscpy_pad() function
  lib: Add test module for strscpy_pad

 Documentation/dev-tools/kselftest.rst        |  94 +++++++++++-
 include/linux/string.h                       |   4 +
 lib/Kconfig.debug                            |   3 +
 lib/Makefile                                 |   1 +
 lib/string.c                                 |  47 +++++-
 lib/test_bitmap.c                            |  20 +--
 lib/test_printf.c                            |  17 +--
 lib/test_strscpy.c                           | 150 +++++++++++++++++++
 tools/testing/selftests/kselftest_module.h   |  48 ++++++
 tools/testing/selftests/kselftest_module.sh  |  84 +++++++++++
 tools/testing/selftests/lib/Makefile         |   2 +-
 tools/testing/selftests/lib/bitmap.sh        |  18 +--
 tools/testing/selftests/lib/config           |   1 +
 tools/testing/selftests/lib/prime_numbers.sh |  17 +--
 tools/testing/selftests/lib/printf.sh        |  19 +--
 tools/testing/selftests/lib/strscpy.sh       |   3 +
 16 files changed, 440 insertions(+), 88 deletions(-)
 create mode 100644 lib/test_strscpy.c
 create mode 100644 tools/testing/selftests/kselftest_module.h
 create mode 100755 tools/testing/selftests/kselftest_module.sh
 create mode 100755 tools/testing/selftests/lib/strscpy.sh

-- 
2.21.0

WARNING: multiple messages have this Message-ID (diff)
From: tobin@kernel.org (Tobin C. Harding)
Subject: [PATCH v4 0/6] lib/string: Add strscpy_pad() function
Date: Fri,  5 Apr 2019 12:58:53 +1100	[thread overview]
Message-ID: <20190405015859.32755-1-tobin@kernel.org> (raw)
Message-ID: <20190405015853.8dQbylDKAAGgh8b8GRwyl7mD5rCZjakVVtAN4-EiRyE@z> (raw)

Hi Shua,

Here is the set with cleanup as suggested by Kees on v3.

Configured, built, and tested all modules loaded by
tools/testing/selftests/lib/*.sh

>From previous cover letters ...

While doing the testing for strscpy_pad() it was noticed that there is
duplication in how test modules are being fed to kselftest and also in
the test modules themselves.

This set makes an attempt at adding a framework to kselftest for writing
kernel test modules.  It also adds a script for use in creating script
test runners for kselftest.  My macro-foo is not great, all criticism
and suggestions very much appreciated.  The design is based on test
modules lib/test_printf.c, lib/test_bitmap.c, lib/test_xarray.c.

Changes since last version:

 - Remove dependency on Bash (thanks Kees)
 - Use oneliner to implement kselftest test runners (thanks Kees)
 - Squash patch that adds kselftest script creator script with patch
   that uses it. 
 - Fix typos (thanks Randy)
 - Add Kees' Acked-by tags to all patches

thanks,
Tobin.


Tobin C. Harding (6):
  lib/test_printf: Add empty module_exit function
  kselftest: Add test runner creation script
  kselftest: Add test module framework header
  lib: Use new kselftest header
  lib/string: Add strscpy_pad() function
  lib: Add test module for strscpy_pad

 Documentation/dev-tools/kselftest.rst        |  94 +++++++++++-
 include/linux/string.h                       |   4 +
 lib/Kconfig.debug                            |   3 +
 lib/Makefile                                 |   1 +
 lib/string.c                                 |  47 +++++-
 lib/test_bitmap.c                            |  20 +--
 lib/test_printf.c                            |  17 +--
 lib/test_strscpy.c                           | 150 +++++++++++++++++++
 tools/testing/selftests/kselftest_module.h   |  48 ++++++
 tools/testing/selftests/kselftest_module.sh  |  84 +++++++++++
 tools/testing/selftests/lib/Makefile         |   2 +-
 tools/testing/selftests/lib/bitmap.sh        |  18 +--
 tools/testing/selftests/lib/config           |   1 +
 tools/testing/selftests/lib/prime_numbers.sh |  17 +--
 tools/testing/selftests/lib/printf.sh        |  19 +--
 tools/testing/selftests/lib/strscpy.sh       |   3 +
 16 files changed, 440 insertions(+), 88 deletions(-)
 create mode 100644 lib/test_strscpy.c
 create mode 100644 tools/testing/selftests/kselftest_module.h
 create mode 100755 tools/testing/selftests/kselftest_module.sh
 create mode 100755 tools/testing/selftests/lib/strscpy.sh

-- 
2.21.0

             reply	other threads:[~2019-04-05  1:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  1:58 tobin [this message]
2019-04-05  1:58 ` [PATCH v4 0/6] lib/string: Add strscpy_pad() function Tobin C. Harding
2019-04-05  1:58 ` [PATCH v4 1/6] lib/test_printf: Add empty module_exit function tobin
2019-04-05  1:58   ` Tobin C. Harding
2019-04-05  1:58 ` [PATCH v4 2/6] kselftest: Add test runner creation script tobin
2019-04-05  1:58   ` Tobin C. Harding
2019-10-30 12:45   ` Naresh Kamboju
2019-10-30 19:16     ` Kees Cook
2019-04-05  1:58 ` [PATCH v4 3/6] kselftest: Add test module framework header tobin
2019-04-05  1:58   ` Tobin C. Harding
2019-04-05  1:58 ` [PATCH v4 4/6] lib: Use new kselftest header tobin
2019-04-05  1:58   ` Tobin C. Harding
2019-04-05  1:58 ` [PATCH v4 5/6] lib/string: Add strscpy_pad() function tobin
2019-04-05  1:58   ` Tobin C. Harding
2019-04-05  1:58 ` [PATCH v4 6/6] lib: Add test module for strscpy_pad tobin
2019-04-05  1:58   ` Tobin C. Harding
2019-04-07 21:45 ` [PATCH v4 0/6] lib/string: Add strscpy_pad() function me
2019-04-07 21:45   ` Tobin C. Harding
2019-04-08 14:08 ` shuah
2019-04-08 14:08   ` shuah
2019-04-08 14:59   ` keescook
2019-04-08 14:59     ` Kees Cook

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=20190405015859.32755-1-tobin@kernel.org \
    --to=linux-kselftest@vger.kernel.org \
    /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).