diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2015-03-30 05:43:12 +0200 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-03-30 05:32:56 -0700 |
commit | aff367a601351ff7bfbfc572d6ae0d4ffafae0f0 (patch) | |
tree | 35261d5ad69e94696056f381189168ea3d436fc9 /tests/features | |
parent | 299f6ce2b17216a6c09d5345139b9a78f7505b24 (diff) |
Tests: portability fixes
Fix various portability problems in mount-nfs-auth.t,
quota-ancestry-building.t and trash.t:
- dd bs=1M is not portable, use dd bs=1024k instead
- dd bs=1MB is not portable iether, use dd bs=1000000 instead
- After restarting NFS service, wait for it to become available
- After killing a process, wait for it to terminate
- BSD awk does not accept a=b="", use a=""; b="" instead
- NetBSD displays the original program name in paenthesis at the end
of ps output. Strip it using sed 's/ *([^()]*)$//' is we want just
the command
- Do no use umount $N0, which leads to many troubles solved by
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0
- The -p option for mkdir must be before the directory name
- du -b is not portable. Use ls -l instead.
BUG: 1129939
Change-Id: I3d44a10a37d47ebb6a263c206566487e3ffb85d8
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/10033
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Anoop C S <achiraya@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'tests/features')
-rwxr-xr-x | tests/features/trash.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/features/trash.t b/tests/features/trash.t index e0b85dafaf0..cbcff237f35 100755 --- a/tests/features/trash.t +++ b/tests/features/trash.t @@ -51,9 +51,9 @@ truncate_op() { sleep 2 test -e $M0/$1 - test $(du -b $M0/$1 | awk '{print $1}') -eq 2 &>/dev/null + test $(ls -l $M0/$1 | awk '{print $5}') -eq 2 &>/dev/null test -e $M0/.trashcan/$1* - test $(du -b $M0/.trashcan/$1*|awk '{print $1}') -eq $2 &>/dev/null + test $(ls -l $M0/.trashcan/$1*|awk '{print $5}') -eq $2 &>/dev/null # truncate from trashcan truncate -s 1 $M0/.trashcan/$1* @@ -94,7 +94,7 @@ TEST unlink_op file1 TEST truncate_op file2 4 # create files directory hierarchy and check [16] -mkdir $M0/1/2/3 -p +mkdir -p $M0/1/2/3 create_files $M0/1/2/3/foo1 $M0/1/2/3/foo2 TEST file_exists 1/2/3/foo1 1/2/3/foo2 @@ -122,7 +122,7 @@ TEST [ ! -e $M0/.trashcan/a/test1* ] # truncate from eliminate path [23-25] truncate -s 2 $M0/a/test2 TEST [ -e $M0/a/test2 ] -TEST [ `du -b $M0/a/test2 | awk '{print $1}'` -eq 2 ] +TEST [ `ls -l $M0/a/test2 | awk '{print $5}'` -eq 2 ] TEST [ ! -e $M0/.trashcan/a/test2* ] # set internal op on [26-27] |