[Gluster-devel] Spurious failure in ./tests/bugs/bug-1038598.t [28]

Pranith Kumar Karampuri pkarampu at redhat.com
Thu May 29 02:04:28 UTC 2014


hi Anuradha,
      Please look into this.

Patch                     ==> http://review.gluster.com/#/c/7880/1
Author                    ==>  Emmanuel Dreyfus manu at netbsd.org
Build triggered by        ==> kkeithle
Build-url                 ==> http://build.gluster.org/job/regression/4603/consoleFull
Download-log-at           ==> http://build.gluster.org:443/logs/regression/glusterfs-logs-20140528:18:25:12.tgz
Test written by           ==> Author: Anuradha <atalur at redhat.com>

./tests/bugs/bug-1038598.t [28]
    0 #!/bin/bash
    1 .  $(dirname $0)/../include.rc
    2 .  $(dirname $0)/../volume.rc
    3 
    4 cleanup;
    5 
    6 TEST glusterd
    7 TEST pidof glusterd
    8 TEST $CLI volume info;
    9 
   10 TEST $CLI volume create $V0 replica 2  $H0:$B0/${V0}{1,2};
   11 
   12 function hard_limit()
   13 {
   14         local QUOTA_PATH=$1;
   15         $CLI volume quota $V0 list $QUOTA_PATH | grep "$QUOTA_PATH" | awk '{print $2}'
   16 }
   17 
   18 function soft_limit()
   19 {
   20         local QUOTA_PATH=$1;
   21         $CLI volume quota $V0 list $QUOTA_PATH | grep "$QUOTA_PATH" | awk '{print $3}'
   22 }
   23 
   24 function usage()
   25 {
   26         local QUOTA_PATH=$1;
   27         $CLI volume quota $V0 list $QUOTA_PATH | grep "$QUOTA_PATH" | awk '{print $4}'
   28 }
   29 
   30 function sl_exceeded()
   31 {
   32         local QUOTA_PATH=$1;
   33         $CLI volume quota $V0 list $QUOTA_PATH | grep "$QUOTA_PATH" | awk '{print $6}'
   34 }
   35 
   36 function hl_exceeded()
   37 {
   38         local QUOTA_PATH=$1;
   39         $CLI volume quota $V0 list $QUOTA_PATH | grep "$QUOTA_PATH" | awk '{print $7}'
   40 
   41 }
   42 
   43 EXPECT "$V0" volinfo_field $V0 'Volume Name';
   44 EXPECT 'Created' volinfo_field $V0 'Status';
   45 EXPECT '2' brick_count $V0
   46 
   47 TEST $CLI volume start $V0;
   48 EXPECT 'Started' volinfo_field $V0 'Status';
   49 
   50 TEST $CLI volume quota $V0 enable
   51 sleep 5
   52 
   53 TEST glusterfs -s $H0 --volfile-id $V0 $M0;
   54 
   55 TEST mkdir -p $M0/test_dir
   56 TEST $CLI volume quota $V0 limit-usage /test_dir 10MB 50
   57 
   58 EXPECT "10.0MB" hard_limit "/test_dir";
   59 EXPECT "50%" soft_limit "/test_dir";
   60 
   61 TEST dd if=/dev/zero of=$M0/test_dir/file1.txt bs=1M count=4
   62 EXPECT "4.0MB" usage "/test_dir";
   63 EXPECT 'No' sl_exceeded "/test_dir";
   64 EXPECT 'No' hl_exceeded "/test_dir";
   65 
   66 TEST dd if=/dev/zero of=$M0/test_dir/file1.txt bs=1M count=6
   67 EXPECT "6.0MB" usage "/test_dir";
   68 EXPECT 'Yes' sl_exceeded "/test_dir";
   69 EXPECT 'No' hl_exceeded "/test_dir";
   70 
   71 #set timeout to 0 so that quota gets enforced without any lag
   72 TEST $CLI volume set $V0 features.hard-timeout 0
   73 TEST $CLI volume set $V0 features.soft-timeout 0
   74 
   75 TEST ! dd if=/dev/zero of=$M0/test_dir/file1.txt bs=1M count=15
   76 EXPECT 'Yes' sl_exceeded "/test_dir";
***77 EXPECT 'Yes' hl_exceeded "/test_dir";
   78 
   79 cleanup;

Pranith


More information about the Gluster-devel mailing list