Now that the tests at the top level directory are run via TESTS and not
check-local:, the test-suite.log file is created and must bit
gitignored.
Signed-off-by: Loic Dachary <loic@dachary.org>
osd: FileStore: support multiple ondisk finish and apply finishers
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
The shell used by the cli tests is not always bash. Not using the
here-word is also more readable in this specific case.
Signed-off-by: Loic Dachary <loic@dachary.org>
Avoid dynamically detecting the application name and instead hardcode
the rbd CLI name into the help output.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
e4ca468 moved src/test/run-cli-tests from check-local to check_SCRIPTS
but did not add it to the TESTS variable.
Signed-off-by: Loic Dachary <loic@dachary.org>
It may happen that the authoritative object
such that auth.size != be_get_ondisk_size(auth_oi.size),
in that case, clarify the error report.
Signed-off-by: Li Wang <li.wang@kylin-cloud.com>
pybind: Add Python 3 support for rados and rbd modules
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Conflicts:
src/pybind/rbd.py (new create args, minor fix to work with py3)
If a stream is not interactive, then under Python 2, then the encoding for
stdout/stderr may be None. This means that it's not possible to print Unicode
characters since the encoding will fall back to ASCII.
This explicitly makes sys.stdout/sys.stderr always use UTF-8 encoding for
strings, regardless of the system's local or if the console is interactive or
not.
This matches the existing tests that assume that output of non-ASCII pool names
will be UTF-8 encoded.
When outputting raw binary data (such as the CRUSH-map), we must bypass the
codec and write directly to raw streams (since the new stream will only accept
ASCII byte-strings or Unicode strings).
Signed-off-by: David Coles <dcoles@gaikai.com>
This function attempts to decode a C-style string into a Python Unicode string.
It accepts an optional "size" parameter for the string length, otherwise it is
assumed that the string is NUL-terminated.
If the pointer is NULL, then this function returns None.
Signed-off-by: David Coles <dcoles@gaikai.com>
Some clients try providing non-ASCII pool names by sending raw encoded bytes.
This check ensures that we still support this behaviour for Python 2.
In Python 3, bytestrings will fail since strings are Unicode strings and thus
clients should use Unicode escapes instead.
Signed-off-by: David Coles <dcoles@gaikai.com>
If you attempt to call encode on a non-ASCII string, then a UnicodeDecodeError
will be raised.
Since str on Python 2 is an 8-bit string, it's possible that it's already UTF-8
encoded. As such we should just pass it through to the C API unmodified.
On Python 3 or if the user explicitly uses unicode, then we'll encode it to
UTF-8 for them.
Signed-off-by: David Coles <dcoles@gaikai.com>
rbd: API: options on image create
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Conflicts:
src/test/librbd/test_librbd.cc (trivial, two tests added at end of file)
Pass options as key/value configuration pairs on image create instead
of expanding rbd_create/rbd_clone/rbd_copy for every possible
configuration override.
Fixes: #13504
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
std::min() takes its parameters by reference, so provide a definition
for OptionPrinter::MAX_DESCRIPTION_OFFSET constant.
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
librbd was missing a recently added file, src/journal was missing
entirely - this brings the build back.
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>