Fix issue where growfiles tests still not creating temp files in directory specified by TMPDIR as expected. This is an updated patch which changes the arguments for gf12, gf13 test to use the named pipes created by mkfifo properly, rather then the ordinary file created by and incorporates the previous changes. Hopefully that catches everything, these fs tests are quite hard to interpret. A previous patch that attempts to force tests to use the TMPDIR env variable is incomplete. This patch fixes growfiles test arguments in the fs scenario.
Scripts which use growfiles with command-line file names are not performing the tests in the expected target directory. When file names are provided on the growfiles command line, they are taken relative to the cwd and not the -d auto_dir passed on the command line. This renders many of the test scripts in runtests ineffective in that the tests are not being performed on the expected filesystem. For example, the first line of the fs scenario reads:

gf01 growfiles -B 800000 -W gf01 -b -e 1 -u -i 0 -L 20 -w -C 1 -l -I r -T 10 glseek20 glseek20.2 -d $TMPDIR

The -d $TMPDIR construct is almost always used in the scripts to point to the filesystem under test. However, the presence of the glseek20 glseek20.2 command line parameters constitute full file names from the test's view, so they will be used as-is (in the current working directory) as opposed to $TMPDIR/glseek20 or $TMPDIR/glseek20.2 as expected by the script. To get the desired behavior, here are the key switches:

-f specifies the 'auto_file' which is the base file name (gf is used if it's missing)
-d specifies the 'auto_dir' to be used ('.' is used if it's missing)
-S specifies the number of 'auto seq' files to be used. These files are of the form: "%s/%s%d" using auto_dir, auto_file, file_number.
Signed-off-by: Henry Yei <hyei@mvista.com>,
1 file changed