From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Bruens Date: Tue, 13 Sep 2016 00:04:27 +0200 Subject: [U-Boot] [PATCH 3/3] test/fs: Check writes using "." (same dir) relative path In-Reply-To: References: <20160911204606.4146-1-stefan.bruens@rwth-aachen.de> <6a0119bae65b4b8daf8af135dfedc9ba@rwthex-w2-b.rwth-ad.de> Message-ID: <2960090.po5o64fQlJ@pebbles.site> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Montag, 12. September 2016 12:44:08 CEST you wrote: > On 09/11/2016 02:46 PM, Stefan Br?ns wrote: > > / and /./ should reference the same file. > > > > diff --git a/test/fs/fs-test.sh b/test/fs/fs-test.sh > > > > +# Read 1MB from small file > > +${PREFIX}load host${SUFFIX} $addr ${FPATH}$FILE_SMALL > > I think the same issue with $FPATH ending/not-ending in / applies here > too, and for all commands in this patch. FPATH is either "" for native fat, "/" for native ext4, or / for hostfs, so this is correct. Specifically, for fat, we dont want any "/" in front of $FILE_foo. > > @@ -482,6 +499,16 @@ function check_results() { > > > > + # Check directory traversal > > + grep -A6 "Test Case 13a " "$1" | \ > > + egrep -q '1048576 bytes written|update journal' > > Why is "update journal" considered successful? Surely the "n bytes > written" message is always printed irrespective of whether anything > journal-related happened? Thats a question left to the author of Test Case 11, where the fragment was copied from. Ext4 unfortunately is quite verbose, it inserts "File system is consistent" and "update journal finished" lines in the output. I think these lines where better stripped from the log prior to any further parsing. Kind regards, Stefan -- Stefan Br?ns / Bergstra?e 21 / 52062 Aachen home: +49 241 53809034 mobile: +49 151 50412019 work: +49 2405 49936-424