]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: mv: check moving named sockets is supported master
authorPádraig Brady <P@draigBrady.com>
Tue, 16 Dec 2025 11:33:38 +0000 (11:33 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 16 Dec 2025 11:33:38 +0000 (11:33 +0000)
* tests/mv/mv-special-2.sh: Use python to create a named socket,
and ensure it's copied across file systems.

tests/mv/mv-special-2.sh

index fc259c76037e5e41105e77e7126495800ad15922..f77e323234571842676576d72f7c1607472bb167 100755 (executable)
@@ -59,4 +59,11 @@ mv --verbose blah xdev &&
 returns_ 1 test -L blah &&
 test -L xdev/blah || fail=1
 
+if python -c "import socket as s; s.socket(s.AF_UNIX).bind('test.sock')" &&
+   test -S 'test.sock'; then
+  mv --verbose test.sock xdev &&
+  returns_ 1 test -S test.sock &&
+  test -S xdev/test.sock || fail=1
+fi
+
 Exit $fail