From 4b0df05907596a2e1f451549165c49b7bc62b61b Mon Sep 17 00:00:00 2001 From: nielash Date: Fri, 8 Aug 2025 21:48:17 -0400 Subject: [PATCH] bisync: disable --sftp-copy-is-hardlink on sftp tests Before this change, TestSFTPOpenssh integration tests would fail due to setting copy_is_hardlink=true in /fstest/testserver/init.d/TestSFTPOpenssh. For example, if a file was server-side copied from path1 to path2 and then the bisync tests set the path2 modtime, the path1 modtime would also unexpectedly mutate. Hardlinks are not the same as copies. The bisync tests assume that they can modify a file on one side without affecting a file on the other. This change essentially sets --sftp-copy-is-hardlink to the default of false for the bisync tests. --- cmd/bisync/bisync_test.go | 6 ++++++ fstest/test_all/config.yaml | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/bisync/bisync_test.go b/cmd/bisync/bisync_test.go index d97721139..0bb5e47b3 100644 --- a/cmd/bisync/bisync_test.go +++ b/cmd/bisync/bisync_test.go @@ -953,6 +953,12 @@ func (b *bisyncTest) checkPreReqs(ctx context.Context, opt *bisync.Options) (con b.fs2.Features().Disable("Copy") // API has longstanding bug for conflictBehavior=replace https://github.com/rclone/rclone/issues/4590 b.fs2.Features().Disable("Move") } + if strings.HasPrefix(b.fs1.String(), "sftp") { + b.fs1.Features().Disable("Copy") // disable --sftp-copy-is-hardlink as hardlinks are not truly copies + } + if strings.HasPrefix(b.fs2.String(), "sftp") { + b.fs2.Features().Disable("Copy") // disable --sftp-copy-is-hardlink as hardlinks are not truly copies + } if strings.Contains(strings.ToLower(fs.ConfigString(b.fs1)), "mailru") || strings.Contains(strings.ToLower(fs.ConfigString(b.fs2)), "mailru") { fs.GetConfig(ctx).TPSLimit = 10 // https://github.com/rclone/rclone/issues/7768#issuecomment-2060888980 } diff --git a/fstest/test_all/config.yaml b/fstest/test_all/config.yaml index 8634afaa1..65955e948 100644 --- a/fstest/test_all/config.yaml +++ b/fstest/test_all/config.yaml @@ -322,7 +322,6 @@ backends: remote: "TestSFTPOpenssh:" fastlist: false ignoretests: - - cmd/bisync - cmd/gitannex - backend: "sftp" remote: "TestSFTPRclone:"