summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* cluster/afr: Set all the xattrs needed by index xlatorAnuradha2014-09-161-0/+58
| | | | | | | | | | | | | | | | | | | | | | Index xlator removes the index file from indices xattrop directory in case the value for keys sent are zero. If all the required keys are not set by afr then index file might be removed in an invalid way. With this change all the keys required by index xlator are set by afr such that invalid removal of files does not occur. Change-Id: Idbed0764a95157fd5cab8d6685057a43788fc7df BUG: 1139230 Signed-off-by: Anuradha <atalur@redhat.com> Reviewed-on: http://review.gluster.org/8652 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* Regression test portability: arequal-checksumEmmanuel Dreyfus2014-09-161-6/+31
| | | | | | | | | | | | | Emulate GNU libc extension FTW_SKIP_SUBTREE for system that lack it. FTW_ACTIONRETVAL is another GNU libc extension we just ignore now. BUG: 764655 Change-Id: I25d9641055a30fe72b4e248f51b53b2a3ba637e9 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8427 Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Handle EAGAIN properly in inodelkPranith Kumar K2014-09-151-1/+0
| | | | | | | | | | | | | | | | | | Problem: When one of the brick is taken down and brough back up in a replica pair, locks on that brick will be allowed. Afr returns inodelk success even when one of the bricks already has the lock taken. Fix: If any brick returns EAGAIN return failure to parent xlator. Change-Id: I5b842d0fc094359cc4231494053d2bfeb606bbbe BUG: 1141539 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8710 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: Fix typo in M2 definitionPranith Kumar K2014-09-121-2/+2
| | | | | | | | | | | | Thanks to Anoop CS for finding the bug Change-Id: I237e3a396967096b8e49200aed279af970e0a4d5 BUG: 1141167 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8707 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Justin Clift <justin@gluster.org> Reviewed-by: Anand Avati <avati@redhat.com>
* snapview-server: get the handle if its absent before doing any fopRaghavendra Bhat2014-09-121-5/+17
| | | | | | | | | | | | | | | | | | | | | | | * Now that NFS server does inode linking in readdirp, it can resolve the gfid (i.e. find the right inode from its inode table) present in the filehandle sent by the NFS client on which a fop came. So instead of sending the lookup on that entry, it directly sends the fop. But snapview-server does not get the handle for the entries in readdirp (because doing a lookup on each entry via gfapi would be costly. So it waits till a lookup is done on that inode, to get the handle and the fs instance and fill it in the inode context). So when NFS resoves the gfid and directly sends the fop, snapview-server will not be able to perform the fop as the inode contet would not contain the fs instance and the handle. So fops should check for the handle before doing gfapi calls. If the handle and fs instance are not present in the inode context they should get them by doing an explicit lookup on the entry. Change-Id: Idd648fbcc3ff6aadc3b63ff236561ca967b92f5d BUG: 1115949 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/8324 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* test: cleanup should clean all left over (stale) mountsAtin Mukherjee2014-09-121-0/+3
| | | | | | | | | | | | | | | | This is a temporary work around to fix the spurious failures seen in ec testcases. As per the initial analysis it looks like quota (glusterd_quota_initiate_fs_crawl) is causing a mount point in /tmp to be stale. Once the root cause is identified this fix can be reverted as well. Change-Id: I8686f144ed298124074f749e75c13028ec00be01 BUG: 1092850 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/8703 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Justin Clift <justin@gluster.org> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* ec: Removed SSE2 dependencyXavier Hernandez2014-09-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the Galois Field multiplications using pure C code without any assembler support. This makes the ec xlator portable to other architectures. In the future it will be possible to use an optimized implementation of the multiplications using architecture dependent facilities (it will be automatically detected and configured). To allow bricks with different machine word sizes to be able to work seamlessly in the same volume, the minimum fragment length to be stored in any brick has been fixed to 512 bytes. Otherwise, different implementations will corrupt the data (SSE2 used 128 bytes, while new implementation would have used 64). This patch also removes the '-msse2' option added on patch http://review.gluster.org/8395/ Change-Id: Iaf6e4ef3dcfda6c68f48f16ca46fc4fb61a215f4 BUG: 1125166 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8413 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* tests/ec: Avoid spurious umount failuresXavier Hernandez2014-09-111-1/+1
| | | | | | | | | | | Change-Id: Id22d64a95adf3666a5e4208f87f9a6d91c40b267 BUG: 1092850 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8694 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* snapview-server: register a callback with glusterd to get notificationsRaghavendra Bhat2014-09-081-0/+16
| | | | | | | | | | | | | | | * As of now snapview-server is polling (sending rpc requests to glusterd) to get the latest list of snapshots at some regular time intervals (non configurable). Instead of that register a callback with glusterd so that glusterd sends notifications to snapd whenever a snapshot is created/deleted and snapview-server can configure itself. Change-Id: I17a274fd2ab487d030678f0077feb2b0f35e5896 BUG: 1119628 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/8150 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: perform list-xattr during lookupRavishankar N2014-09-052-1/+51
| | | | | | | | | | | | | Detect and heal mismatching user extended attributes during lookup. 'Forward' port of http://review.gluster.org/#/c/7444/ Change-Id: Id03c9746f083ffd3014711d0b3a2e5a71a45eed4 BUG: 1134691 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/8558 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* porting: Provide setfattr/getfattr implementationHarshavardhana2014-09-0523-227/+465
| | | | | | | | | | | | | | | | - Use 'getfattr' properly avoid redundant options during xattr query - Untabify certain parts of tests (remove tabs) - Avoid backtick evaluation for certain values to make code more portable. - Use awk on FreeBSD/Darwin, since 'wc' implementation is broken and adds spurious spaces in its output. Change-Id: I7dcc0b70874e43b4cda8c306ed18a31b7a3f990a BUG: 1131713 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8520 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
* Regression test portability: EXPECTEmmanuel Dreyfus2014-09-041-1/+5
| | | | | | | | | | | | | | | | | | Make sure test_expect_not_footer() and test_expect_footer() work on non empty strings, otherwise it may produce errors such as in pgfid_feat.t on NetBSD: not ok 12 Got "" instead of "" This a a missing bit from previosuly merged patchset: I9cb76ba863897126534c3808fb0c9e564659835f BUG: 1129939 Change-Id: I2635b67deec9cf60295faab52e7421947b1f7bda Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8576 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr : Mark pending changelog xattrs for new creationsAnuradha2014-09-032-0/+128
| | | | | | | | | | | | | Based on type of file, set appropriate pending changelogs for new entries. Change-Id: Ifd124bf9bc54b996ce83ab9f39d03b3ccca7eb3c BUG: 1130892 Signed-off-by: Anuradha <atalur@redhat.com> Reviewed-on: http://review.gluster.org/8555 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cluster/dht: Modified test case to note rename failures as errorsShyam2014-09-021-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The bug referenced in this change, had an race condition that is now fixed by the following commits that are posted for review. http://review.gluster.org/#/c/8563/ http://review.gluster.org/#/c/8570/ These changes would now make the winning client not fail a rename, in case it failed to rename the linkto file. Hence when one client wins the link race, and the other still deletes the linkto file, the rename failure by the winning client is not a critical failure, hence it resolves the issue posted in the bug. As a result modifying the test case to treat the rename failures as errors, to catch any future issues. Change-Id: Ibe9caac7ee87dcbc4f581cfbd36173b734859ccb BUG: 1123950 Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on: http://review.gluster.org/8579 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Propagate EIO on inode's type mismatchKrutika Dhananjay2014-09-021-0/+129
| | | | | | | | | | | | | Original author of the test script: Pranith Kumar K <pkarampu@redhat.com> Change-Id: If515ecefd3c17f85f175b6a8cb4b78ce8c916de2 BUG: 1132469 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/8574 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* storage/posix: Prefer gfid links for inode-handlePranith Kumar K2014-09-022-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: File path could change by other entry operations in-flight so if renames are in progress at the time of other operations like open, it may lead to failures. We observed that this issue can also happen while renames and readdirps/lookups are in progress because dentry-table is going stale sometimes. Fix: Prefer gfid-handles over paths for files. For directory handles prefering gfid-handles hits performance issues because it needs to resolve paths traversing up the symlinks. Tests which test if files are opened should check on gfid path after this change. So changed couple of tests to reflect the same. Note: This patch doesn't fix the issue for directories. I think a complete fix is to come up with an entry operation serialization xlator. Until then lets live with this. Change-Id: I10bda1083036d013f3a12588db7a71039d9da6c3 BUG: 1136159 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8575 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Regression test portability: mknodEmmanuel Dreyfus2014-08-311-0/+29
| | | | | | | | | | | | Linux mknod(2) is able to create fifo and named sockets. NetBSD and FreeBSD use mkfifo(2) and socket(2)/bind(2) for that. BUG: 764655 Change-Id: I1d3969e3fcb6afdbd184c28bd268ffa2da7ae202 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8433 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Regression test portability: EXPECTEmmanuel Dreyfus2014-08-311-2/+10
| | | | | | | | | | | | | | Make sure test_expect_not_footer() and test_expect_footer() work on non empty strings, otherwise it may produce errors such as in pgfid_feat.t on NetBSD: not ok 12 Got "" instead of "" BUG: 1129939 Change-Id: I9cb76ba863897126534c3808fb0c9e564659835f Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8568 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Regression test portability: LVMEmmanuel Dreyfus2014-08-312-0/+18
| | | | | | | | | | | Skip any test involving LVM on NetBSD as LVM is not supported BUG: 1129939 Change-Id: I2237bae1128d1a81047c9ff7f905431156daf8b7 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8556 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* porting: various fixes regression tests OSX/FreeBSDHarshavardhana2014-08-2932-55/+80
| | | | | | | | | | | | | | | | | | | | - `wc -l` on OSX/FreeBSD adds spurious spaces, this clobbers up TAP output parsers - fix it. - `umount -l` doesn't exist on OSX/FreeBSD use 'umount -f' if available. - Add check for 'file' version, to handle mime type variations across versions - Converge 'glusterfs --attribute-timeout=0 --entry-timeout=0' into '$GFS' - Modify remaining 'mount -t nfs' to use 'mount_nfs' - Update sha1sum for OSX to use 'openssl sha1'. Change-Id: Id1012faa5d67a921513d220e7fa9cebafe830d34 BUG: 1131713 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8501 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* porting: `pidof` portability for OSX/FreeBSDHarshavardhana2014-08-268-18/+72
| | | | | | | | | | | | | | | | | | | | - Provide a portable `pidof` just to be used specifically with glusterfs regression tests on OSX and FreeBSD. This was written after countless hrs of effort to get a sane `pidof` working on either of the environments. `pidof` comes at the wake of lack of proper procfs support and also incompatible way of handling process names since glusterd/glusterfs are symbolic links to 'glusterfsd' - tests/utils/* directory should be part of 'PATH' to avoid abspath calculation using $(dirname) - cleanup() - rpcinfo command prints error on FreeBSD/OSX fix it Change-Id: I35f86273624cb279da1c8fae056ca27669e251d8 BUG: 1131713 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8499 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cli/glusterd: Support of volume get for a specific volume optionAtin Mukherjee2014-08-261-0/+25
| | | | | | | | | | | | | | This patch introduces a cli command to display a specific volume option/all volume options of a specific volume with the following usage: Usage: volume get <VOLNAME> <key|all> Change-Id: Ic88edb33c5509d7a37cd5ade6341e45e3cdbf59d BUG: 983317 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/8305 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* tests: bug-1002207.t - should mount glusterfs before testsHarshavardhana2014-08-261-3/+2
| | | | | | | | | Change-Id: I9238ea8cf4e5ad9bab384ef08d873a5b0e578a33 BUG: 1133266 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8519 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cli: Fixing ambiguous message error for rebalance <volname> start commandggarg2014-08-252-3/+26
| | | | | | | | | | | | | | | | | | | Previously output message of command 'gluster volume rebalance <volname> start/start force/fix-layout start' was ambiguous and poorly formatted. Previously output message was: "volume rebalance: <volname>: success: Starting rebalance on volume <volname> has been successful." Now with this fix properly formatted output message is: "volume rebalance: <volname>: success: Rebalance on <volname> has been started Successfully. Use rebalance status command to check status of the rebalance process." Change-Id: I23268fc13b05d1b39ffe4c702d0e4f73085acd1c BUG: 1087487 Signed-off-by: ggarg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/7473 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mount/fuse: Handle fd resolution failuresPranith Kumar K2014-08-252-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Even when the fd resolution failed, the fop is continuing on the new graph which may not have valid inode. This lead to NULL layout subvols in dht which lead to crash in fsync after graph migration. Fix: - Remove resolution error handling in FUSE_FOP as it was only added to handle fd migration failures. - check in fuse_resolve_done for fd resolution failures and fail the fop right away. - loc resolution failures are already handled in the corresponding fops. - Return errno from state->resolve.op_errno in resume functions. - Send error to fuse on frame allocation failures. - Removed unused variable state->resolved - Removed unused macro FUSE_FOP_COOKIE Change-Id: I479d6e1ff2ca626ad8c8fcb6f293022149474992 BUG: 1126048 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8402 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: metadata self-heal testsPranith Kumar K2014-08-231-0/+133
| | | | | | | | | Change-Id: Idef49b22018908c0a2ed95852b0670a91a750eba BUG: 1132913 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8515 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Set pending changelog based on filetype for new entriesPranith Kumar K2014-08-211-0/+28
| | | | | | | | | Change-Id: Ib6eea2dfe43aacf1f3446cc023adecbcf8645d48 BUG: 1132102 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8506 Reviewed-by: Anuradha Talur <atalur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Regression test portability: mktempEmmanuel Dreyfus2014-08-204-4/+4
| | | | | | | | | | | | | | Linux mktemp accepts to run without a template, NetBSD mandates it. Since the template option has the same syntax, add it everywhere. While there, also do this in scripts outside of regression testing. BUG: 764655 Change-Id: I3ec140afbc9009257c81a56d77afcc21fef74cc4 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8432 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* Regression test portability: sha1sumEmmanuel Dreyfus2014-08-201-0/+8
| | | | | | | | | | | | Provide a shell function for sha1sum if missing BUG: 764655 Change-Id: I8b232af8aab7f95ba7c7ad83e37a111d562201a5 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8450 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* Regression test portability: ddEmmanuel Dreyfus2014-08-201-1/+1
| | | | | | | | | | | | Use dd msgfmt=quiet also in truncate replacement BUG: 764655 Change-Id: I5ad022c1dc65ecc98996ccbe8a3d0e9de162aa1a Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8464 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* Regression test portability: 127.0.0.0/8Emmanuel Dreyfus2014-08-201-0/+7
| | | | | | | | | | | | | | On Linux, the host answers any address in 127.0.0.0/8 On NetBSD, any address must be configured with ifconfig lo0 alias before it can be used. BUG: 1129939 Change-Id: Ia628716c104d955817a95e0c5e04ead924bb4847 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8483 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* Regression test portability: mountEmmanuel Dreyfus2014-08-2013-19/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address various portability-related problems related to mount - In order to address the non-portability of NFS mount options, use the mount_nfs shell function everywhere, and use it to translate options. - Make sure NFS mounts are unmounted before shutting down the daemons in order to avoid deadlock. The change is done in every test that did not unmounted NFS mounts at the end of the script, and in global cleanup function as well. The force_umount shell function from volume.rc was duplicated as umount_nfs in nfs.rc so that we do not have to add an include on volume.rc for all NFS tests that do not need it. - The FUSE mount type on NetBSD is puffs|perfuse|fuse.glusterfs instead of just fuse.glusterfs, make the regexp configurable in include.rc - Finding wether the mount is RO or RW in mount output needs a system-dependent command configurable in include.rc - mount options in /proc/mounts may be limited to "rw", adjust the regexp for this case where there is no comma And while there change rm into rm -f in tests/basic/mount.t for removal opearation that should fail, since rm may ask for confirmation Change-Id: I1fb708486ec350b2885e2404879561c1020fa8fd BUG: 1129939 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8494 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* cluster/dht: Fix dht_access treating directory like filesShyam2014-08-181-0/+100
| | | | | | | | | | | | | | | | | | | | | | | When the cluster topology changes due to add-brick, all sub volumes of DHT will not contain the directories till a rebalance is completed. Till the rebalance is run, if a caller bypasses lookup and calls access due to saved/cached inode information (like NFS server does) then, dht_access misreads the error (ESTALE/ENOENT) from the new subvolumes and incorrectly tries to handle the inode as a file. This results in the directories in memory state in DHT to be corrupted and not heal even post a rebalance. This commit fixes the problem in dht_access thereby preventing DHT from misrepresenting a directory as a file in the case presented above. Change-Id: Idcdaa3837db71c8fe0a40ec0084a6c3dbe27e772 BUG: 1125824 Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on: http://review.gluster.org/8462 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Regression test portability: statEmmanuel Dreyfus2014-08-189-27/+75
| | | | | | | | | | | | | | | Linux uses stat -c, stat --printf= or stat --printf NetBSD uses stat -f with different format strings. This change set changes all stat usage to stat -c and introduce a shell stat() fonction to perform the format string translation. BUG: 764655 Change-Id: I024fca7c1b736b053f5888cbf21da0a72489ef63 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8424 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* Regression test portability: mkdirEmmanuel Dreyfus2014-08-181-1/+1
| | | | | | | | | | | | mkdir -v (verbose) is not portable, just remove it. BUG: 764655 Change-Id: If344792caf977698abe0bf497d9083bc9333df55 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8463 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* porting: FreeBSD related changes to regression scriptsHarshavardhana2014-08-135-11/+12
| | | | | | | | | | | | | | | - json_verify do not use '/usr/bin' let bash evaluate the location - TEST for test code compilation `bug-1051896.t`, `bug-1058663.t`, bug-905864.t - run-tests.sh - better checks for installed packages Change-Id: Ic7feda36ddfc082c609aabd75da2e9a8f59a92b3 BUG: 1111774 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8435 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
* tests: trigger entry heals by lookupRavishankar N2014-08-131-1/+5
| | | | | | | | | | | | | Trigger entry heals explicitly by lookup until heal full is fixed in afr v2 to do conservative merge. Change-Id: I474b518045bebcf399bc414caff3b415259381d6 BUG: 1127148 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/8465 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* Regression test portability: xargsEmmanuel Dreyfus2014-08-083-1/+4
| | | | | | | | | | | | | | | Linux xarg complains about an empty input, while NetBSD xargs does not. This breaks tests where xargs is in a pipe after a command that should be tested. Make sure we test the first command without xargs BUG: 764655 Change-Id: I754d7d52332221c462ce3594f4e8d8d62ae606d5 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8280 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Wrong test in self-heal.tEmmanuel Dreyfus2014-08-071-1/+1
| | | | | | | | | | | | | | | | | self-heal.t checks for gfid before and after an operation, but fails to do it on the same file since the prefix is not the same: undefined $B1 before and $B0 after. The errorcause the test to fail on NetBSD. I do not know how this test could pass on Linux before. BUG: 764655 Change-Id: I6df1175e177855afca1736cf8c847c51fe407576 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8431 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* build: make GLUSTERD_WORKDIR rely on localstatedirHarshavardhana2014-08-0724-48/+73
| | | | | | | | | | | | | | | | | | | | | | - Break-way from '/var/lib/glusterd' hard-coded previously, instead rely on 'configure' value from 'localstatedir' - Provide 's/lib/db' as default working directory for gluster management daemon for BSD and Darwin based installations - loff_t is really off_t on Darwin - fix-off the warnings generated by clang on FreeBSD/Darwin - Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all platforms. - Define proper environment for running tests, define correct PATH and LD_LIBRARY_PATH when running tests, so that the desired version of glusterfs is used, regardless where it is installed. (Thanks to manu@netbsd.org for this additional work) Change-Id: I2339a0d9275de5939ccad3e52b535598064a35e7 BUG: 1111774 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8246 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Regression test portability: truncate, md5Emmanuel Dreyfus2014-08-061-0/+112
| | | | | | | | | | | | | | Add shell functions to replace truncate and md5, which are Linux specific Resubmit because of failed regression test with no apparent cause BUG: 764655 Change-Id: I07200cf886bd52904a5cf63c66f43f0b1cc91540 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8341 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: weighted-rebalance.t shouldn't write to '/dev/tty'Harshavardhana2014-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | On our jenkins instance "/dev/tty" doesn't exist, necessary output fails as below message ~~~ ./tests/features/weighted-rebalance.t: \ line 72: /dev/tty: No such device or address ~~~ Comment out the debugging code Change-Id: Iba29b80c8ba2dcaab3d6654d7c54332a915bffb8 BUG: 1114680 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8421 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Regression test portability: arequal-checksumEmmanuel Dreyfus2014-08-047-157/+182
| | | | | | | | | | | | | | | | | | | | Building arequal-checksum on non Linux systems requires a few adjustments: - use __builtin_alloca() on all platforms - on systems without argp, get it from contrib/standalone-argp (this requires adding cflags support to the build_tester function) - FTW_ACTIONRETVAL option to nftw(3) is GNU libc specific, work around if it does not exist. - md5sum is Linux-specific. Use md5 -n on NetBSD and md5 -q on FreeBSD/Darwin - Use 'cc' as synonymous for all compilers, it can behave as gcc/clang depending on which is default - cleanup tabs/whitespaces BUG: 764655 Change-Id: I9090c17da596fbf00fc1fbd7593163ce8cd3b84c Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8283 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/ec: Fix incorrect management of NFS requestsXavier Hernandez2014-08-021-0/+18
| | | | | | | | | | | | | | | | | | | Some operations, specially those comming from NFS, do not use a regular fd and use an anonymous fd (i.e. a previous open call has not been sent). Any context information created during open or create will not be present on these fd's, so we simply return NULL for contexts of those fd. Also it seems that NFS can send write requests with a very big buffer (higher that the default value of 128 KB). Some changes have been made to correctly handle these large buffers. Change-Id: I281476bd0d2cbaad231822248d6a616fcf5d4003 BUG: 1122417 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8367 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* ec: Test volume mount point in a better wayXavier Hernandez2014-08-011-1/+1
| | | | | | | | | | | | | | | An 'ls -a1' on an empty volume seems to return 3 entries instead of the expected 2 ('.' and '..') in the build servers. I changed the test to a simple 'stat', which is enough and more reliable. Change-Id: I12d0f47394ad378b40fc9b86507cdb3543f99970 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8313 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: Avoid test bug-884597.t to loop infinitelyXavier Hernandez2014-08-011-6/+26
| | | | | | | | | | | | | | | If some unexpected error happens while this test is trying to create a linkto file, an infinite loop is generated and the test never ends. This patch limits the number of retries it can do to find that file. Change-Id: Ie556c509116109ead99c78d671b2669b4428faac Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8318 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Regression test portability: system-specific cleanupEmmanuel Dreyfus2014-08-011-5/+37
| | | | | | | | | | | | | Add NetBSD system-specific cleanup code Define killall as pkill when it is missing. BUG: 764655 Change-Id: I3a1cfa3029fd60ede334a670fc115c211700063d Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8290 Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Symlink mtime changes when rebalancingAnders Blomdell2014-07-311-0/+59
| | | | | | | | | | | | | Added mtime preservation for special files during rebalance. Change-Id: If04921d4d66853fde8b4d8a3ab748790864f8f42 BUG: 1122443 Signed-off-by: Anders Blomdell <anders.blomdell@control.lth.se> Reviewed-on: http://review.gluster.org/8383 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Anand Avati <avati@redhat.com>
* Regression test portability: psEmmanuel Dreyfus2014-07-284-9/+9
| | | | | | | | | | | | | ps aux is truncated to the terminal width on NetBSD, Use ps auxww to avoid that BUG: 764655 Change-Id: I28a2fc23e2823dd6524a72da30111b86fc4bfa7b Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8281 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* Regression test portability: hostnameEmmanuel Dreyfus2014-07-281-1/+8
| | | | | | | | | | | | | | The --fqdn option to hostname is Linux only This is resubmission of the same patch. I assume the regression test is a test bug BUG: 764655 Change-Id: I6437124186435f10d1ee6a847e2593554d633716 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8282 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>