summaryrefslogtreecommitdiffstats
path: root/src/ceph/qa/workunits/fs/misc/i_complete_vs_rename.sh
blob: a9b98271df11a7500c937f661f5808fb41fbedf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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