Commits
rhel-8.3
Name already in use
Commits on Sep 22, 2020
-
common/allocators/malloc.c: Fix .fill method.
This always filled with zero rather than the requested byte. It is easy to demonstrate this using: $ nbdkit data '1*6' -D data.AST=1 \ --run 'nbdcopy $uri - | hexdump -C' allocator=malloc 00000000 00 00 00 00 00 00 |......| This was broken since the malloc allocator was introduced in 1.21.9. Fixes: commit 87ea585 (cherry picked from commit b81da0b) -
golang: Cast correctly for portability to 32 bit armv7.
../../src/libguestfs.org/nbdkit/nbdkit.go:532:22: cannot use struct_size (type _Ctype_ulong) as type _Ctype_ulonglong in assignment ../../src/libguestfs.org/nbdkit/nbdkit.go:566:41: cannot use struct_size (type _Ctype_ulong) as type _Ctype_uint in argument to _Cfunc__CMalloc (cherry picked from commit 4457156)
-
-
Fix everything that flake8 complains about (mostly whitespace changes and deleting unused imports). Signed-off-by: Eric Blake <eblake@redhat.com> (cherry picked from commit 3aae7ba)
-
tests: Improve python style in all tests using nbdsh
Using a py linter on a .sh test that invokes nbdsh is not practical, so I probably missed some style changes. However, it's pretty mechanical to fix our testsuite to consistently prefer 'method()' over 'method ()' when it comes to python snippets; likewise, a consistent pattern of handling expected exceptions is easier to follow. Signed-off-by: Eric Blake <eblake@redhat.com> (cherry picked from commit 9d46a95)
-
tests: Improve test-file-dir.sh
Using 'nbdsh -u $bad_uri' will cause nbdsh 1.4 to leak an nbd.Error excpetion all the way out of python, which in turn triggers ABRT with python3-abrt-addon to potentially flag a program crash. Also, our logic to test for expected failure is rather convoluted. Better is to avoid -u, and instead catch the expected exception ourselves, so that we can rely on successful exit as our witness that the export did not exist. Signed-off-by: Eric Blake <eblake@redhat.com> (cherry picked from commit 2053002)
-
docs: Preferred python formatting in man page examples
Python prefers 'method()' over 'method ()'; our documentation was inconsistent on which style we presented, so this scrubs all .pod files for any embedded python snippets. Signed-off-by: Eric Blake <eblake@redhat.com> (cherry picked from commit 6d50b02)
-
docs: Neutral language for filtering IP addresses.
(cherry picked from commit 13b41bd)
-
common/allocators: Refactor allocator registration.
Make allocators a little bit more independent. They now register themselves with the allocator code at start up. This is just refactoring and should change nothing about how it works. Unfortunately it does require every call to go through an extra indirection although I guess that doesn't really matter. It would be possible to optimize this by copying the whole function table into ‘struct allocator’. (cherry picked from commit fa3aabc)
-
data: In documentation, always include full runnable commands.
(cherry picked from commit a8fc5b8)
-
common/allocators: Use 64 bit ints for all counts and sizes.
With the data plugin it is possible to create subpatterns which are larger than a uint32_t. This causes the plugin to silently overflow when doing operations like '*'. eg. This impossible operation worked before: $ ./nbdkit data ' 1 *2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2 *2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2 ' \ --run 'qemu-img info $nbd' image: nbd://localhost:10809 file format: raw virtual size: 1 TiB (1099511627776 bytes) Simply changing all the functions to take uint64_t is sufficient. The data plugin is already passing 64 bit ints for counts, and the memory plugin uses 32 bit ints which will be extended because the functions are prototyped. Thanks: Eric Blake (cherry picked from commit 058be0a) -
common/allocators/sparse.c: Optimize blit of sparse/zero pages.
When blitting sparse/zero pages into the allocator, test if they are zero (expected to be a common case) and free the page if so. We could actually do even better here by using the extents information from the other allocator to skip the copying entirely, but the implementation of that would be much more complex. (cherry picked from commit 0ff4b38)
-
When implementing the new parser this was reimplemented incorrectly so it moved forwards rather than backwards, and also didn't test bounds correctly. Note there was no test before of either @+N or @-N so we didn't catch this. In this commit I have added a simple test. Fixes: commit eb0062d (cherry picked from commit 25f1e85) [For the stable-1.22 branch this only adds the test from the original commit.]
-
docs: Cross-reference pkg-config from nbdkit-probing(1).
(cherry picked from commit dc6b6b1)
-
data: Test strings containing \x00.
Both the old and new parsers supported \x00 within strings, but we never tested it before. (cherry picked from commit 7e8a296)
-
server/public.c: Rearrange headers to match other files.
(cherry picked from commit c0c60c4)
-
data: Small refactoring to enclosed pattern (...) handling.
This should have no effect. (cherry picked from commit ee8f1d0)
-
data: Move orphan string in the documentation earlier.
Improves readability. (cherry picked from commit 0562fa1)
-
-
-
build: Fix configure feature function.
On Windows the feature() function failed because of improper quoting. This was only cosmetic. TLS .................................... ./configure: line 21827: test: too many arguments (cherry picked from commit 3683e80) -
server: Use dlsym(RTLD_DEFAULT) instead of dlsym(NULL).
Actually NULL works fine on both Linux and Windows, but RTLD_DEFAULT is what is documented. (cherry picked from commit 6fde747)
-
example2: Remove \n at end of debug string.
(cherry picked from commit b901f7d)
-
tests: Silence python stack trace during expected failure
test-offset-truncate.sh intentionally provokes out-of-bound reads under the shell function expect_fail; but does so in a way that causes nbdsh to die with a python stack dump. Abrt then picked this up and tried to report it as an application crash. Improve the test by gracefully letting python exit with non-zero status without a crash. Signed-off-by: Eric Blake <eblake@redhat.com> (cherry picked from commit e13048f)
-
Commits on Sep 3, 2020
-
-
tests: Rewrite and extend file plugin test using nbdsh.
This test used libnbd before. However it only tested pread and nothing else so it was hardly a useful test. This test didn't run on Windows (since no libnbd). Rewrite the test to use nbdsh, and at the same time extend it to test a few useful calls. (cherry picked from commit d9faa09)
-
-
sh: Don't pass exportname to .preconnect
nbdkit calls .preconnect prior to the client actually requesting any export name, so it is always going to be NULL at the point of the query. As this is a pointless parameter that has always been empty, we can drop it without breaking existing sh scripts. Fixes: 01049ae Signed-off-by: Eric Blake <eblake@redhat.com> (cherry picked from commit f53e20f)
-
Due to a semantic merge conflict (competing introduction of fadvise= vs. dir= configuration parameters), a failure in posix_fadvise while in dir mode would pass NULL to a %s format. While glibc handles this fine, it is not portable. Fixes: 5c1f4d6 Signed-off-by: Eric Blake <eblake@redhat.com> (cherry picked from commit d5b32ec)
-
Commits on Aug 27, 2020
-
docs: Release notes wording tweak
Clear up wording about tls-fallback filter. Signed-off-by: Eric Blake <eblake@redhat.com> (cherry picked from commit 44903fe)