]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
test: Do not test unicode if boost::spirit >= 1.72 32388/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sun, 22 Dec 2019 11:11:53 +0000 (12:11 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Sun, 22 Dec 2019 15:08:10 +0000 (16:08 +0100)
commit05fe3fc9c898ff00fc267d0059cb5ca17a386415
tree6741567e57173c81877d8c7a92ca1fd36cefc78b
parenteffe9c9a3f1c299f2f8ff19c98c572aad11c1f00
test: Do not test unicode if boost::spirit >= 1.72

Testing with Boost 1.72 unittest_confutil crashes with:
```
[ RUN      ] ConfUtils.ReadFiles2
Assertion failed: (strict_ischar(ch)), function isblank, file /usr/local/include/boost/spirit/home/support/char_encoding/standard.hpp, line 129.
Abort
```

Which is due to the fact that in Boost 1.72 most of the character
testing has been garded with an assert to make sure char holds an
ascii char.
Like:
```
        static bool
        isblank BOOST_PREVENT_MACRO_SUBSTITUTION (int ch)
        {
            BOOST_ASSERT(strict_ischar(ch));
            return (ch == ' ' || ch == '\t');
        }
```
And ReadFile2 explicitly tests for strings with char value > 0x7f.
So that is certainly going to crash.

Now I can imagine that we would like to be able to have users use
different encodings for things like logfiles.
But for now that is not going to work with the boost:spirit parser

Fixes: https://tracker.ceph.com/issues/43406
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/test/confutils.cc