On 11.12.2014 12:09, Martin Kletzander wrote:
Volume and pool formatting functions took different approaches to
unspecified uids/gids. When unknown, it is always parsed as -1, but one
of the functions formatted it as unsigned int (wrong) and one as
int (better). Due to that, our two of our XML files from tests cannot
be parsed on 32-bit machines.
RNG schema needs to be modified as well, but because both
storagepool.rng and storagevol.rng need same schema for permission
element, save some space by moving it to storagecommon.rng.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Notes:
v2:
- Added test case vol-gluster-dir-neg-uid that shows how 4294967295 is
correctly read as '-1' even on 64bit machines
docs/schemas/storagecommon.rng | 29 +++++++++++++++++++++
docs/schemas/storagepool.rng | 30 +---------------------
docs/schemas/storagevol.rng | 23 -----------------
src/conf/storage_conf.c | 9 +++----
.../vol-gluster-dir-neg-uid.xml} | 0
...gluster-dir.xml => vol-gluster-dir-neg-uid.xml} | 4 +--
tests/storagevolxml2xmlout/vol-gluster-dir.xml | 4 +--
tests/storagevolxml2xmlout/vol-sheepdog.xml | 4 +--
tests/storagevolxml2xmltest.c | 1 +
9 files changed, 41 insertions(+), 63 deletions(-)
copy tests/{storagevolxml2xmlout/vol-gluster-dir.xml =>
storagevolxml2xmlin/vol-gluster-dir-neg-uid.xml} (100%)
copy tests/storagevolxml2xmlout/{vol-gluster-dir.xml => vol-gluster-dir-neg-uid.xml}
(83%)
ACK
Michal