"Fossies" - the Fresh Open Source Software Archive

Member "glusterfs-6.9/tests/bugs/md-cache/afr-stale-read.t" (23 Apr 2020, 1358 Bytes) of package /linux/misc/glusterfs-6.9.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 . $(dirname $0)/../../include.rc
    4 #. $(dirname $0)/../../volume.rc
    5 
    6 cleanup;
    7 
    8 #Basic checks
    9 TEST glusterd
   10 TEST pidof glusterd
   11 TEST $CLI volume info
   12 
   13 TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1..2};
   14 
   15 TEST $CLI volume set $V0 features.cache-invalidation on
   16 TEST $CLI volume set $V0 features.cache-invalidation-timeout 600
   17 TEST $CLI volume set $V0 performance.cache-invalidation on
   18 TEST $CLI volume set $V0 performance.md-cache-timeout 600
   19 TEST $CLI volume set $V0 performance.cache-samba-metadata on
   20 TEST $CLI volume set $V0 cluster.self-heal-daemon off
   21 TEST $CLI volume set $V0 read-subvolume $V0-client-0
   22 TEST $CLI volume set $V0 performance.quick-read off
   23 
   24 TEST $CLI volume start $V0
   25 
   26 TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0
   27 TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M1
   28 
   29 #Write some data from M0 and read it from M1,
   30 #so that M1 selects a read subvol, and caches the lookup
   31 TEST `echo "one" > $M0/file1`
   32 EXPECT "one" cat $M1/file1
   33 
   34 #Fail few writes from M0 on brick-0, as a result of this failure
   35 #upcall in brick-0 will invalidate the read subvolume of M1.
   36 TEST chattr +i $B0/${V0}1/file1
   37 TEST `echo "two" > $M0/file1`
   38 TEST `echo "three" > $M0/file1`
   39 TEST `echo "four" > $M0/file1`
   40 TEST `echo "five" > $M0/file1`
   41 
   42 EXPECT_WITHIN $MDC_TIMEOUT "five" cat $M1/file1
   43 TEST chattr -i $B0/${V0}1/file1
   44 cleanup;