Re: [PATCH blktests v3 0/6] Add SRP initiator driver tests

2018-07-10 Thread Bart Van Assche
On Tue, 2018-07-10 at 20:40 +, Bart Van Assche wrote:
> On Tue, 2018-07-10 at 12:57 -0700, Omar Sandoval wrote:
> > As a further improvement, is it possible to configure multipathd to read
> > from a custom configuration path? That way we could, e.g., dump the
> > required multipath.conf in $TMPDIR instead of requiring the system-level
> > configuration.
> 
> To my own surprise, not yet. The /etc/multipath.conf path is hardcoded in
> multipathd. I can look into making this path configurable but I'm afraid it
> will take a while before that patch ends up in the majority of the Linux
> distro's.
> 
> > If not, can you please make the group_requires automatically make the
> > symlink instead of requiring it? Obviously checking if there was already
> > a prod config file there.
> 
> OK, will do.
> 
> > I also had to apply the following patch:
> > 
> > diff --git a/tests/srp/002 b/tests/srp/002
> > index c07e76f..74c5fee 100755
> > --- a/tests/srp/002
> > +++ b/tests/srp/002
> > @@ -45,6 +45,7 @@ test_disconnect_repeatedly() {
> >  }
> 
> Thanks, I will apply this patch.

Hello Omar,

These changes have been implemented and the corresponding pull request has
been updated (https://github.com/osandov/blktests/pull/24). Please let me
know if you would like me to repost this patch series.

Thanks,

Bart.





Re: [PATCH blktests v3 0/6] Add SRP initiator driver tests

2018-07-10 Thread Bart Van Assche
On Tue, 2018-07-10 at 12:57 -0700, Omar Sandoval wrote:
> As a further improvement, is it possible to configure multipathd to read
> from a custom configuration path? That way we could, e.g., dump the
> required multipath.conf in $TMPDIR instead of requiring the system-level
> configuration.

To my own surprise, not yet. The /etc/multipath.conf path is hardcoded in
multipathd. I can look into making this path configurable but I'm afraid it
will take a while before that patch ends up in the majority of the Linux
distro's.

> If not, can you please make the group_requires automatically make the
> symlink instead of requiring it? Obviously checking if there was already
> a prod config file there.

OK, will do.

> I also had to apply the following patch:
> 
> diff --git a/tests/srp/002 b/tests/srp/002
> index c07e76f..74c5fee 100755
> --- a/tests/srp/002
> +++ b/tests/srp/002
> @@ -45,6 +45,7 @@ test_disconnect_repeatedly() {
>  }

Thanks, I will apply this patch.

Bart.















Re: [PATCH blktests v3 0/6] Add SRP initiator driver tests

2018-07-10 Thread Omar Sandoval
On Mon, Jul 09, 2018 at 03:56:37PM -0700, Bart Van Assche wrote:
> Hello Omar,
> 
> As promised during LSF/MM, I have converted the srp-tests software to the
> blktests framework. Please consider this patch series for inclusion in the
> official blktests repository. This patch series is also available as a
> github pull request, namely https://github.com/osandov/blktests/pull/24.
> 
> Thanks,
> 
> Bart.

Awesome!

$ sudo ./check srp
srp/001 (Create and remove LUNs) [passed]
runtime  2.260s  ...  1.902s
srp/002 (File I/O on top of multipath concurrently with logout and login (mq)) 
[passed]
runtime  39.992s  ...  38.689s
srp/003 (File I/O on top of multipath concurrently with logout and login (sq)) 
[passed]
runtime  10.071s  ...  34.998s
srp/004 (File I/O on top of multipath concurrently with logout and login 
(sq-on-mq)) [passed]
runtime  10.077s  ...  35.385s
srp/005 (Direct I/O with large transfer sizes, cmd_sg_entries=255 and bs=4M) 
[passed]
runtime  10.093s  ...  14.184s
srp/006 (Direct I/O with large transfer sizes, cmd_sg_entries=255 and bs=8M) 
[passed]
runtime  10.171s  ...  12.890s
srp/007 (Direct I/O with large transfer sizes, cmd_sg_entries=1 and bs=4M) 
[passed]
runtime  9.949s  ...  14.197s
srp/008 (Direct I/O with large transfer sizes, cmd_sg_entries=1 and bs=8M) 
[passed]
runtime  10.029s  ...  12.751s
srp/009 (Buffered I/O with large transfer sizes, cmd_sg_entries=255 and bs=4M) 
[passed]
runtime  11.805s  ...  14.138s
srp/010 (Buffered I/O with large transfer sizes, cmd_sg_entries=255 and bs=8M) 
[passed]
runtime  10.267s  ...  13.941s
srp/011 (Block I/O on top of multipath concurrently with logout and login) 
[passed]
runtime  11.087s  ...  33.344s
srp/012 (dm-mpath on top of multiple I/O schedulers) [passed]
runtime  10.141s  ...  10.954s
srp/013 (Direct I/O using a discontiguous buffer)[passed]
runtime  10.161s  ...  3.721s

As a further improvement, is it possible to configure multipathd to read
from a custom configuration path? That way we could, e.g., dump the
required multipath.conf in $TMPDIR instead of requiring the system-level
configuration.

If not, can you please make the group_requires automatically make the
symlink instead of requiring it? Obviously checking if there was already
a prod config file there.

I also had to apply the following patch:

diff --git a/tests/srp/002 b/tests/srp/002
index c07e76f..74c5fee 100755
--- a/tests/srp/002
+++ b/tests/srp/002
@@ -45,6 +45,7 @@ test_disconnect_repeatedly() {
 }
 
 test() {
+   : "${TIMEOUT:=30}"
trap 'trap "" EXIT; teardown' EXIT
setup && test_disconnect_repeatedly && echo Passed
 }
diff --git a/tests/srp/003 b/tests/srp/003
index fc85e29..9b8eeb4 100755
--- a/tests/srp/003
+++ b/tests/srp/003
@@ -45,6 +45,7 @@ test_disconnect_repeatedly() {
 }
 
 test() {
+   : "${TIMEOUT:=30}"
trap 'trap "" EXIT; teardown' EXIT
setup && test_disconnect_repeatedly && echo Passed
 }
diff --git a/tests/srp/004 b/tests/srp/004
index 9c37fd2..1e8766a 100755
--- a/tests/srp/004
+++ b/tests/srp/004
@@ -45,6 +45,7 @@ test_disconnect_repeatedly() {
 }
 
 test() {
+   : "${TIMEOUT:=30}"
trap 'trap "" EXIT; teardown' EXIT
setup && test_disconnect_repeatedly && echo Passed
 }
diff --git a/tests/srp/011 b/tests/srp/011
index 3561662..df99da5 100755
--- a/tests/srp/011
+++ b/tests/srp/011
@@ -41,6 +41,7 @@ test_disconnect_repeatedly() {
 }
 
 test() {
+   : "${TIMEOUT:=30}"
trap 'trap "" EXIT; teardown' EXIT
setup && test_disconnect_repeatedly && echo Passed
 }
 
Thanks, Bart!


[PATCH blktests v3 0/6] Add SRP initiator driver tests

2018-07-09 Thread Bart Van Assche
Hello Omar,

As promised during LSF/MM, I have converted the srp-tests software to the
blktests framework. Please consider this patch series for inclusion in the
official blktests repository. This patch series is also available as a
github pull request, namely https://github.com/osandov/blktests/pull/24.

Thanks,

Bart.

Changes compared to v2:
- Instead of documenting which kernel configuration options are required in
  README.md, skip the SRP tests if not all required kernel configuration
  options have been set.
- Renamed tests/srp/functions into tests/srp/rc.
- Made sure that the SRP test cleanup code is run if a test is interrupted
  with Ctrl-C.
- Fixed the syntax of the fio command line: changed -rw=... into --rw=...
- Suppressed the "Unloaded the ... kernel module" messages.
- Moved the multipath configuration data from README.md into
  tests/srp/multipath.conf. With this change /etc/multipath.conf can be a
  soft link and copy/pasting multipath configuration data is no longer required.
- multipathd is now started and stopped during each test instead of requiring
  that it is started before running any tests.
- Added "find_multipaths no" to multipath.conf for Arch Linux.
- The null_blk driver is now used instead of brd.
- If a PCI RDMA adapter is present in the test system, the SRP initiator not
  only connects over the rdma_rxe driver but also uses the loopback
  functionality of the PCI RDMA adapter.
- A list of which SRP connections have been created is written into the $FULL
  file.
- It is no longer attempted to associate the rdma_rxe driver with IPoIB network
  interfaces.

Changes compared to v1:
- Left out the patches from version one of this series that are already
  upstream.
- Renamed tests/srp/group into tests/srp/rc.
- The SRP tests do not start if LIO was already configured (reported by Ming).
- Documented the SRP test requirements in README.md.

Bart Van Assche (6):
  dir-locals.el: Add c-mode settings
  check: Make $FULL an absolute path
  src/Makefile: Introduce the C_TARGETS variable
  src/Makefile: Move -Wall from the C compilation rule to the $(CFLAGS)
variable
  Add the discontiguous-io test program
  Add tests for the SRP initiator and target drivers

 .dir-locals.el   |6 +-
 README.md|   13 +
 check|2 +-
 common/rc|   17 +
 src/.gitignore   |1 +
 src/Makefile |   17 +-
 src/discontiguous-io.cpp |  340 +
 tests/srp/001|   73 ++
 tests/srp/001.out|3 +
 tests/srp/002|   50 ++
 tests/srp/002.out|2 +
 tests/srp/003|   50 ++
 tests/srp/003.out|2 +
 tests/srp/004|   50 ++
 tests/srp/004.out|2 +
 tests/srp/005|   41 ++
 tests/srp/005.out|2 +
 tests/srp/006|   41 ++
 tests/srp/006.out|2 +
 tests/srp/007|   41 ++
 tests/srp/007.out|2 +
 tests/srp/008|   40 ++
 tests/srp/008.out|2 +
 tests/srp/009|   41 ++
 tests/srp/009.out|2 +
 tests/srp/010|   41 ++
 tests/srp/010.out|2 +
 tests/srp/011|   46 ++
 tests/srp/011.out|2 +
 tests/srp/012|   53 ++
 tests/srp/012.out|2 +
 tests/srp/013|   49 ++
 tests/srp/013.out|3 +
 tests/srp/multipath.conf |   27 +
 tests/srp/rc | 1433 ++
 35 files changed, 2493 insertions(+), 7 deletions(-)
 create mode 100644 src/discontiguous-io.cpp
 create mode 100755 tests/srp/001
 create mode 100644 tests/srp/001.out
 create mode 100755 tests/srp/002
 create mode 100644 tests/srp/002.out
 create mode 100755 tests/srp/003
 create mode 100644 tests/srp/003.out
 create mode 100755 tests/srp/004
 create mode 100644 tests/srp/004.out
 create mode 100755 tests/srp/005
 create mode 100644 tests/srp/005.out
 create mode 100755 tests/srp/006
 create mode 100644 tests/srp/006.out
 create mode 100755 tests/srp/007
 create mode 100644 tests/srp/007.out
 create mode 100755 tests/srp/008
 create mode 100644 tests/srp/008.out
 create mode 100755 tests/srp/009
 create mode 100644 tests/srp/009.out
 create mode 100755 tests/srp/010
 create mode 100644 tests/srp/010.out
 create mode 100755 tests/srp/011
 create mode 100644 tests/srp/011.out
 create mode 100755 tests/srp/012
 create mode 100644 tests/srp/012.out
 create mode 100755 tests/srp/013
 create mode 100644 tests/srp/013.out
 create mode 100644 tests/srp/multipath.conf
 create mode 100755 tests/srp/rc

-- 
2.18.0