* tests/mv/mv-special-1.sh: Adjust the python probe to more
closely match how copy.c creates sockets, as otherwise we
get a false failure on systems where mknod() fails with S_IFSOCK,
which was seen on Solaris and FreeBSD at least.
* tests/mv/mv-special-2.sh: Adjust similarly as this
was a latent issue on this root only test.
Reported by Bruno Haible.
# must replace that destination, not unlink it first and then fail,
# leaving the user with neither file.
source=mv-sock
-if python -c "import socket as s; \
- s.socket(s.AF_UNIX).bind('$source'); \
- s.socket(s.AF_UNIX).bind('$other_partition_tmpdir/test.sock') \
+if python -c "import os, stat; \
+ os.mknod('$source', stat.S_IFSOCK | 0o600); \
+ os.mknod('$other_partition_tmpdir/test.sock', \
+ stat.S_IFSOCK | 0o600) \
" &&
test -S "$source" && test -S "$other_partition_tmpdir/test.sock"; then
returns_ 1 test -L broken_symlink &&
test -L xdev/broken_symlink || fail=1
-if python -c "import socket as s; s.socket(s.AF_UNIX).bind('test.sock')" &&
- test -S 'test.sock'; then
+if python -c "import os, stat; \
+ os.mknod('test.sock', stat.S_IFSOCK | 0o600); \
+ " && test -S 'test.sock'; then
mv --verbose test.sock xdev &&
returns_ 1 test -S test.sock &&
test -S xdev/test.sock || fail=1