1
0
mirror of https://github.com/ceph/ceph synced 2024-12-26 05:25:09 +00:00
ceph/COPYING
Loic Dachary a62d519835 Unit tests for chain_xattr.cc
Create a new test file covering most (> 97%) of src/os/chain_xattr.{cc,h}
lines of code. The following functions are tested:

int chain_getxattr(const char *fn, const char *name, void *val, size_t size);
int chain_fgetxattr(int fd, const char *name, void *val, size_t size);
int chain_setxattr(const char *fn, const char *name, const void *val, size_t size);
int chain_fsetxattr(int fd, const char *name, const void *val, size_t size);
int chain_listxattr(const char *fn, char *names, size_t len);
int chain_flistxattr(int fd, char *names, size_t len);
int chain_removexattr(const char *fn, const char *name);
int chain_fremovexattr(int fd, const char *name);

The function translate_raw_name substitutes @@ into @. When the trailing
character is a @, it breaks. However, such an occurence cannot be created by
chain_setxattr because it always create pairs of @. Instead of silently
breaking the loop, the function should probably return on error so that the
caller can ignore it.

The function chain_fgetxattr_len may return on error if fgetxattr
returns on error. However, it is only called after another attr function
returned success and the tests cannot create the conditions under which
it would fail.

The function chain_fsetxattr may leak attributes when used to override
an existing attribute. This leak is not tested or fixed, it is just
discussed in http://marc.info/?l=ceph-devel&m=136027076615853&w=4

If the file system in which the tests are run does not support extended
attributes, the tests are not run. The detection uses the same logic as
the one implemented in FileStore::_detect_fs

The output of the tests are silenced to reduce the output when testing
assertions ( except for the dout_emergency function which cannot be
controlled).
2013-02-11 23:14:30 +01:00

104 lines
3.9 KiB
Plaintext

Files: *
Copyright: (c) 2004-2010 by Sage Weil <sage@newdream.net>
License: LGPL2.1 (see COPYING-LGPL2.1)
Files: doc/*
Copyright: (c) 2010-2012 New Dream Network and contributors
License: Creative Commons Attribution-ShareAlike (CC BY-SA)
Files: src/client/hadoop/ceph
Copyright: Copyright (C) New Dream Network and contributors
License: Apache License v2
Files: src/rbd.cc
Copyright:
Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
License: GPL2
Files: src/common/fiemap.cc
Copyright:
Copyright (C) 2010 Canonical
License: GPL2
Files: src/mount/canonicalize.c
Copyright: Copyright (C) 1993 Rick Sladkey <jrs@world.std.com>
License: LGPL2 or later
Files: src/os/btrfs_ioctl.h
Copyright: Copyright (C) 2007 Oracle. All rights reserved.
License: GPL2
Files: src/include/ceph_hash.cc
Copyright: None
License: Public domain
Files: m4/acx_pthread.m4
Copyright: Steven G. Johnson <stevenj@alum.mit.edu>
License: GPLWithACException
Files: src/common/sctp_crc32.c:
Copyright:
Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
a) Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
b) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.
c) Neither the name of Cisco Systems, Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Files: src/json_spirit
Copyright:
Copyright John W. Wilkinson 2007 - 2011
License:
The MIT License
Copyright (c) 2007 - 2010 John W. Wilkinson
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Files: src/test/common/Throttle.cc src/test/filestore/chain_xattr.cc
Copyright: Copyright (C) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
License: LGPL2 or later