On 9/28/19 3:02 PM, Richard W.M. Jones wrote:
---
tests/Makefile.am | 6 ++++
tests/test-info-conntime.sh | 65 +++++++++++++++++++++++++++++++++++
tests/test-info-time.sh | 68 +++++++++++++++++++++++++++++++++++++
tests/test-info-uptime.sh | 65 +++++++++++++++++++++++++++++++++++
4 files changed, 204 insertions(+)
+# Test the info plugin with mode=conntime.
+
+source ./functions.sh
+set -e
+set -x
+
+requires nbdsh --version
+
+sock=`mktemp -u`
+files="info-conntime.out info-conntime.pid $sock"
+rm -f $files
+cleanup_fn rm -f $files
+
+# Run nbdkit.
+start_nbdkit -P info-conntime.pid -U $sock info mode=conntime
+
For conntime, is it worth testing 2 separate connections:
Connection 1: connect, sleep 1, read
Connection 2: connect, read
where the delta read by connection 2 should be less than the delta read
by 1? (longer sleep if needed)
Conversely, for uptime, 2 separate connections with the same access
pattern should show connection 2 greater than the delta of 1.
Otherwise looks good.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization:
qemu.org |
libvirt.org