From 95b737c835b8e86ae80dbe759f7bca0235f19e89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Mon, 1 Dec 2025 15:03:36 +0000
Subject: [PATCH] tests: mv: add checks for cross device handling of special
files
* tests/mv/mv-special-2.sh: Add test to ensure we preserve
sparse files, character devices, symlinks, when moving across
file system boundaries.
Addresses https://github.com/coreutils/coreutils/issues/136
---
tests/local.mk | 1 +
tests/mv/mv-special-2.sh | 62 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
create mode 100755 tests/mv/mv-special-2.sh
diff --git a/tests/local.mk b/tests/local.mk
index b7fb84e3e2..17f8503208 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -135,6 +135,7 @@ all_root_tests = \
tests/mkdir/smack-root.sh \
tests/mv/hardlink-case.sh \
tests/mv/sticky-to-xpart.sh \
+ tests/mv/mv-special-2.sh \
tests/rm/fail-2eperm.sh \
tests/rm/no-give-up.sh \
tests/rm/one-file-system.sh \
diff --git a/tests/mv/mv-special-2.sh b/tests/mv/mv-special-2.sh
new file mode 100755
index 0000000000..fc259c7603
--- /dev/null
+++ b/tests/mv/mv-special-2.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+# Ensure that mv works with non standard copies across file systems
+
+# Copyright (C) 2025 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see