Whamcloud - gitweb
LU-13404 utils: fix lfs mirror duplicate file check 08/38108/2
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 31 Mar 2020 22:45:40 +0000 (16:45 -0600)
committerOleg Drokin <green@whamcloud.com>
Tue, 14 Apr 2020 08:11:12 +0000 (08:11 +0000)
commit8befc64e5aabe9b9bdca49f51830f25b3f747019
treedbc7c7d7a3ec5999acdd445b86d37fe317d9dfc0
parent3911f551b759068c16d390cb7b5661108d7e6cb0
LU-13404 utils: fix lfs mirror duplicate file check

Fix the check_same_file() check to work if the output file does not
exist.  Since the file is opened with O_CREAT|O_EXCL then definitely
it cannot be the same as the input file.

Add test_0j to verify "lfs mirror read -o" and "lfs mirror write -i".

Test-Parameters: trivial testlist=sanity-flr env=ONLY=0j
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ide929b53a528bd0cc77e1f997d3c561c67729179
Reviewed-on: https://review.whamcloud.com/38108
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-flr.sh
lustre/utils/lfs.c