diff options
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/posix/bug-1651445.t | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/tests/bugs/posix/bug-1651445.t b/tests/bugs/posix/bug-1651445.t index f6f1833f919..5248d470568 100644 --- a/tests/bugs/posix/bug-1651445.t +++ b/tests/bugs/posix/bug-1651445.t @@ -17,39 +17,34 @@ TEST $CLI volume start $V0 TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 -TEST $CLI volume set $V0 storage.reserve-size 10MB +#Setting the size in bytes +TEST $CLI volume set $V0 storage.reserve 40MB -#No effect as priority to reserve-size -TEST $CLI volume set $V0 storage.reserve 20 +#wait 5s to reset disk_space_full flag +sleep 5 TEST dd if=/dev/zero of=$M0/a bs=100M count=1 -sleep 5 +TEST dd if=/dev/zero of=$M0/b bs=10M count=1 -#Below dd confirms posix is giving priority to reserve-size -TEST dd if=/dev/zero of=$M0/b bs=40M count=1 +# Wait 5s to update disk_space_full flag because thread check disk space +# after every 5s sleep 5 +# setup_lvm create lvm partition of 150M and 40M are reserve so after +# consuming more than 110M next dd should fail TEST ! dd if=/dev/zero of=$M0/c bs=5M count=1 rm -rf $M0/* -#Size will reserve from the previously set reserve option = 20% -TEST $CLI volume set $V0 storage.reserve-size 0 -#Overwrite reserve option -TEST $CLI volume set $V0 storage.reserve-size 40MB +#Setting the size in percent and repeating the above steps +TEST $CLI volume set $V0 storage.reserve 40 -#wait 5s to reset disk_space_full flag sleep 5 -TEST dd if=/dev/zero of=$M0/a bs=100M count=1 +TEST dd if=/dev/zero of=$M0/a bs=80M count=1 TEST dd if=/dev/zero of=$M0/b bs=10M count=1 -# Wait 5s to update disk_space_full flag because thread check disk space -# after every 5s - sleep 5 -# setup_lvm create lvm partition of 150M and 40M are reserve so after -# consuming more than 110M next dd should fail TEST ! dd if=/dev/zero of=$M0/c bs=5M count=1 TEST $CLI volume stop $V0 |