linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Efremov <efremov@linux.com>
To: linux-kselftest@vger.kernel.org
Cc: Denis Efremov <efremov@linux.com>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Jens Axboe <axboe@kernel.dk>, Jiri Kosina <jkosina@suse.cz>,
	Willy Tarreau <w@1wt.eu>
Subject: [RFC PATCH 0/5] selftests: floppy: basic tests
Date: Wed, 18 Aug 2021 18:46:41 +0300	[thread overview]
Message-ID: <20210818154646.925351-1-efremov@linux.com> (raw)

Add basic tests to cover some regressions that we had.
It's hard to test floppy because some tests require
presence or absense of a diskette in a drive. To simulate
test conditions and automate the testing I added
"run_*.sh" wrapper scripts that run tests in QEMU.

The first patch just improves check for reverted commits
in a commit message. The second patch is required to
generate a minimal initrd used in next commits. Rest of
commits are basic floppy tests.

Please, comment the approach, selftests integration
and suggest tests that you would like to add.

I thought about adding a possibility to remove/insert
diskettes inside a test. This is possible if we give
the guest an access to the QEMU monitor (eject/change cmds).
But I didn't find a better way to do it than to map a
monitor to an external port:
  -monitor tcp:<ip>:<port>,server,nowait
  and access this ip from the guest.
Maybe it's also possible to do with virtserialport.

Denis Efremov (5):
  checkpatch: improve handling of revert commits
  gen_initramfs.sh: use absolute path for gen_init_cpio
  selftests: floppy: add basic tests for opening an empty device
  selftests: floppy: add basic tests for a readonly disk
  selftests: floppy: add basic rdwr tests

 MAINTAINERS                                  |  1 +
 scripts/checkpatch.pl                        | 12 +--
 tools/testing/selftests/floppy/.gitignore    |  8 ++
 tools/testing/selftests/floppy/Makefile      | 10 ++
 tools/testing/selftests/floppy/config        |  1 +
 tools/testing/selftests/floppy/empty.c       | 58 ++++++++++++
 tools/testing/selftests/floppy/init.c        | 43 +++++++++
 tools/testing/selftests/floppy/lib.sh        | 67 +++++++++++++
 tools/testing/selftests/floppy/rdonly.c      | 99 ++++++++++++++++++++
 tools/testing/selftests/floppy/rdwr.c        | 67 +++++++++++++
 tools/testing/selftests/floppy/run_empty.sh  | 16 ++++
 tools/testing/selftests/floppy/run_rdonly.sh | 22 +++++
 tools/testing/selftests/floppy/run_rdwr.sh   | 22 +++++
 usr/gen_initramfs.sh                         |  2 +-
 14 files changed, 421 insertions(+), 7 deletions(-)
 create mode 100644 tools/testing/selftests/floppy/.gitignore
 create mode 100644 tools/testing/selftests/floppy/Makefile
 create mode 100644 tools/testing/selftests/floppy/config
 create mode 100644 tools/testing/selftests/floppy/empty.c
 create mode 100644 tools/testing/selftests/floppy/init.c
 create mode 100644 tools/testing/selftests/floppy/lib.sh
 create mode 100644 tools/testing/selftests/floppy/rdonly.c
 create mode 100644 tools/testing/selftests/floppy/rdwr.c
 create mode 100755 tools/testing/selftests/floppy/run_empty.sh
 create mode 100755 tools/testing/selftests/floppy/run_rdonly.sh
 create mode 100755 tools/testing/selftests/floppy/run_rdwr.sh

-- 
2.31.1


             reply	other threads:[~2021-08-18 15:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 15:46 Denis Efremov [this message]
2021-08-18 15:46 ` [RFC PATCH 1/5] checkpatch: improve handling of revert commits Denis Efremov
2021-08-18 16:00   ` Joe Perches
2021-08-18 16:21     ` Denis Efremov
2021-08-18 20:21       ` Joe Perches
2021-08-18 20:35         ` Andrew Morton
2021-08-18 21:22       ` Joe Perches
2021-08-19 19:52         ` Denis Efremov
2021-08-19 21:44           ` Joe Perches
2021-08-19 22:17           ` Joe Perches
2021-08-21  6:47             ` Denis Efremov
2021-08-21  7:12               ` Joe Perches
2021-08-21  7:35                 ` Denis Efremov
2021-08-18 15:46 ` [RFC PATCH 2/5] gen_initramfs.sh: use absolute path for gen_init_cpio Denis Efremov
2021-08-19  0:24   ` Masahiro Yamada
2021-08-19 20:51     ` Denis Efremov
2021-08-20  2:19       ` Masahiro Yamada
2021-08-18 15:46 ` [RFC PATCH 3/5] selftests: floppy: add basic tests for opening an empty device Denis Efremov
2021-08-18 15:46 ` [RFC PATCH 4/5] selftests: floppy: add basic tests for a readonly disk Denis Efremov
2021-08-18 15:46 ` [RFC PATCH 5/5] selftests: floppy: add basic rdwr tests Denis Efremov

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=20210818154646.925351-1-efremov@linux.com \
    --to=efremov@linux.com \
    --cc=axboe@kernel.dk \
    --cc=jkosina@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=w@1wt.eu \
    --subject='Re: [RFC PATCH 0/5] selftests: floppy: basic tests' \
    /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

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).