ceph/qa/workunits/i_complete_vs_rename.sh
Sage Weil be8cdb08b2 qa: test for proper i_complete handling
This reproduces some buggery with rename vs I_COMPLETE on the kernel
client.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-07 09:15:21 -08:00

32 lines
423 B
Bash
Executable File

#!/bin/sh
set -e
mkdir x
cd x
touch a
touch b
touch c
touch d
ls
chmod 777 .
stat e || true
touch f
touch g
# over existing file
echo attempting rename over existing file...
touch ../xx
mv ../xx f
ls | grep f || false
echo rename over existing file is okay
# over negative dentry
echo attempting rename over negative dentry...
touch ../xx
mv ../xx e
ls | grep e || false
echo rename over negative dentry is ok
echo OK