2 # This is just for the record.
3 # This test is not run.
5 # Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
27 On a VFAT file system with coreutils-5.0.90, 'mv FOO foo' removes the
28 sole copy of the file named by both the source and destination arguments.
30 Demonstrate the problem, as root:
33 && dd if=/dev/zero of=1 bs=8192 count=50 \
34 && mkdir mnt && mkfs -t vfat 1 \
35 && mount -oloop 1 mnt && cd mnt \
36 && printf something important > foo \
38 test -f FOO && echo PASS-1 || echo FAIL-1
41 test -f FOO && echo PASS-2 || echo FAIL-2
43 And in case you actually do the above, you can do this to clean up:
45 cd /tmp && umount /tmp/mnt && rm -r 1 mnt
47 Hey! Can't create hard links on vfat.
48 The above 'ln' evokes an 'operation not permitted' failure.
50 This demonstrates the same thing with file system type 'umsdos'
54 && dd if=/dev/zero of=1 bs=8192 count=50 \
55 && mkdir mnt && mkfs -t msdos 1 \
56 && mount -t umsdos -oloop 1 mnt && cd mnt \
57 && printf something important > foo \
59 test -f FOO && echo PASS-1 || echo FAIL-1
62 test -f FOO && echo PASS-2 || echo FAIL-2