From 4edea128916eb76ec94fde90407eb70af6493337 Mon Sep 17 00:00:00 2001 From: Vishal Pandey Date: Tue, 24 Oct 2017 14:26:45 +0530 Subject: write once read many: file appendable in worm state Issue: A new file is appendable even when file level worm is 1. Fix: Do a state transition in writev function in worm.c file. Steps To Test: 1- Activate file level worm. 2- Create a new file. 3- Leave file dormant for auto commit period. 4- Try and append some content to the file. 5- check the file if new content has been appended or not. 6- check if file has been transitioned to Worm Retention state. Change-Id: I52d50ad888cb0c39ad54be9352ccb07d48b8d71a BUG: 1505807 Signed-off-by: Vishal Pandey --- tests/features/worm.t | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/features') diff --git a/tests/features/worm.t b/tests/features/worm.t index f8f05065918..c725f5858ec 100755 --- a/tests/features/worm.t +++ b/tests/features/worm.t @@ -57,6 +57,13 @@ TEST rm -f $M0/file2 sleep 10 TEST rm -f $M0/file1 +## Test for state transition over write. +TEST `echo "worm 1" > $M0/file3` +sleep 5 +TEST `echo "worm 2" >> $M0/file3` +EXPECT 'worm 1' cat $M0/file3 +TEST ! rm -f $M0/file3 + TEST $CLI volume stop $V0 EXPECT 'Stopped' volinfo_field $V0 'Status' -- cgit