diff options
author | Garrett Cooper <yanegomi@gmail.com> | 2012-08-07 08:57:31 -0700 |
---|---|---|
committer | Garrett Cooper <yanegomi@gmail.com> | 2012-08-07 08:57:31 -0700 |
commit | 5d520f448bc8e395242b8a94ee6c90720afd11e7 (patch) | |
tree | ae5ee1f6653351c990c30029eb2b506788c4a4f1 /runltp | |
parent | 8594a88ba1eb47637743690f888899b7a6b63f70 (diff) |
Fix -d option processing
When converting the path specified for -d to absolute path, an extra '/'
is added, e.g. if '/mypath' is specified, TMPBASE will be '//mypath'.
Some testcases fail because of this, e.g. chdir01A fails with:
chdir01 1 TFAIL : symlink(object, symbolic) was succesful.
mkdir(object, 0700) was successful
chdir(2) returned successfully, but getcwd(3) indicated new current
working directory location /ext4/ltp-2nHcAjcGKr/chd2Y4XkO/object not
equal to expected //ext4/ltp-2nHcAjcGKr/chd2Y4XkO/object
Signed-off-by: Simon Xu <xu.simon@oracle.com>
Reviewed-by: Garrett Cooper <yanegomi@gmail.com>
Diffstat (limited to 'runltp')
-rwxr-xr-x | runltp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -235,7 +235,7 @@ main() esac ;; d) # convert the user path to absolute path. - export TMPBASE=`cd \`dirname ${OPTARG}\`; pwd`/`basename ${OPTARG}` ;; + export TMPBASE=$(readlink -f ${OPTARG}) ;; D) NUM_PROCS=1; NUM_FILES=1; NUM_BYTES=$((1024 * 1024 * 1024)); CLEAN_FLAG=0 ARGUMENT_LIST=$OPTARG |