New upstream version 1.3.7.

This commit is contained in:
Richard W.M. Jones 2020-04-23 22:18:55 +01:00
parent 7708b43ae1
commit 488d479179
3 changed files with 7 additions and 59 deletions

View File

@ -1,52 +0,0 @@
From 0475bfe04a527051c0a37af59a733c4c8554e427 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 17 Apr 2020 22:23:56 +0100
Subject: [PATCH] ocaml: Fix bug in asynch copy test.
This program had a subtle bug: If we've read everything from the
source, but there are still source commands in flight, AND it happens
that there are no destination commands in flight, then the loop
finishes prematurely. This is particularly evident when you run the
test on a slow machine (armv7 in Koji is illustrative). The fix is to
check that there are no commands in flight either from the source or
to the destination.
(I actually discovered this when writing the golang bindings which
copied from the OCaml version, but forgot to make the correction to
the original.)
---
ocaml/examples/asynch_copy.ml | 3 ++-
ocaml/tests/test_590_aio_copy.ml | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ocaml/examples/asynch_copy.ml b/ocaml/examples/asynch_copy.ml
index d5dcc60..7132f57 100644
--- a/ocaml/examples/asynch_copy.ml
+++ b/ocaml/examples/asynch_copy.ml
@@ -41,7 +41,8 @@ let asynch_copy src dst =
(* The main loop which runs until we have finished reading and
* there are no more commands in flight.
*)
- while !soff < size || NBD.aio_in_flight dst > 0 do
+ while !soff < size || NBD.aio_in_flight src > 0 || NBD.aio_in_flight dst > 0
+ do
(* If we're able to submit more reads from the source then do so now. *)
if !soff < size && NBD.aio_in_flight src < max_reads_in_flight then (
let bs = min bs (size -^ !soff) in
diff --git a/ocaml/tests/test_590_aio_copy.ml b/ocaml/tests/test_590_aio_copy.ml
index ac490ef..e3cd59d 100644
--- a/ocaml/tests/test_590_aio_copy.ml
+++ b/ocaml/tests/test_590_aio_copy.ml
@@ -64,7 +64,8 @@ let asynch_copy src dst =
(* The main loop which runs until we have finished reading and
* there are no more commands in flight.
*)
- while !soff < size || NBD.aio_in_flight dst > 0 do
+ while !soff < size || NBD.aio_in_flight src > 0 || NBD.aio_in_flight dst > 0
+ do
(* If we're able to submit more reads from the source then do so now. *)
if !soff < size && NBD.aio_in_flight src < max_reads_in_flight then (
let bs = min bs (size -^ !soff) in
--
2.25.0

View File

@ -8,8 +8,8 @@
%global source_directory 1.3-development %global source_directory 1.3-development
Name: libnbd Name: libnbd
Version: 1.3.6 Version: 1.3.7
Release: 5%{?dist} Release: 1%{?dist}
Summary: NBD client library in userspace Summary: NBD client library in userspace
License: LGPLv2+ License: LGPLv2+
@ -22,9 +22,6 @@ Source1: http://libguestfs.org/download/libnbd/%{source_directory}/%{name
# https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex # https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex
Source2: libguestfs.keyring Source2: libguestfs.keyring
# Upstream patch to fix one of the tests that fails on slow machines.
Patch1: 0001-ocaml-Fix-bug-in-asynch-copy-test.patch
%if 0%{patches_touch_autotools} %if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool BuildRequires: autoconf, automake, libtool
%endif %endif
@ -282,6 +279,9 @@ make %{?_smp_mflags} check || {
%changelog %changelog
* Thu Apr 23 2020 Richard W.M. Jones <rjones@redhat.com> - 1.3.7-1
- New upstream version 1.3.7.
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 1.3.6-5 * Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 1.3.6-5
- OCaml 4.11.0 pre-release attempt 2 - OCaml 4.11.0 pre-release attempt 2

View File

@ -1,2 +1,2 @@
SHA512 (libnbd-1.3.6.tar.gz) = 2c39b820c95cdc61aceea188d1804f4551a776487543a487bd17357b039036ca15805daf8953e9701d003b2166de305167d7fa578fd3b0fa5e6764caebe9a516 SHA512 (libnbd-1.3.7.tar.gz) = 28980a8b4200ec41a6e344ca34e3fcfb27fb7a896b93e0883709da1804b310b1dbc76e9313524934909fd1ce55f019d2fa72d7058ea8db00f44795fdaa8e33b2
SHA512 (libnbd-1.3.6.tar.gz.sig) = 6d8eaab14e5853c6c2ffdfbef86ca1362246bc156ac035a12777c59afc827483a65957a0c4fa82b6bc5cc2653fb2a01fe6e21497db46800d935a181cb257044b SHA512 (libnbd-1.3.7.tar.gz.sig) = fc7a13d957dbc2595301d14f45674ae700f98d50ef57577cd5ce2ce4a33df043423f9ee41e44c06637d29a0728a0a526887a33b3d3dfe8cd175a535e00836a11