Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

bisync: add tests for skipping the check for identical files

nielashff0704b7e2a1
diff --git a/cmd/bisync/bisync_test.go b/cmd/bisync/bisync_test.go
index 799e6a6bd..632b28df8 100644
--- a/cmd/bisync/bisync_test.go
+++ b/cmd/bisync/bisync_test.go
@@ -231,6 +231,7 @@ type bisyncTest struct {
TestFn bisync.TestFunc
ignoreModtime bool // ignore modtimes when comparing final listings, for backends without support
ignoreBlankHash bool // ignore blank hashes for backends where we allow them to be blank
+ ignoreChecksum bool // a step of this test case used --ignore-checksum
}
var color = bisync.Color
@@ -436,6 +437,7 @@ func (b *bisyncTest) cleanupAll() {
func (b *bisyncTest) runTestCase(ctx context.Context, t *testing.T, testCase string) {
b.t = t
b.testCase = testCase
+ b.ignoreChecksum = false
var err error
b.fs1, b.parent1, b.path1, b.canonPath1 = b.makeTempRemote(ctx, b.argRemote1, "path1")
@@ -1197,6 +1199,9 @@ func (b *bisyncTest) runBisync(ctx context.Context, args []string) (err error) {
ci.SizeOnly = true
case "ignore-size":
ci.IgnoreSize = true
+ case "ignore-checksum":
+ ci.IgnoreChecksum = true
+ b.ignoreChecksum = true
case "checksum":
ci.CheckSum = true
opt.Compare.DownloadHash = true // allows us to test crypt and the like
@@ -1767,6 +1772,16 @@ func (b *bisyncTest) mangleResult(dir, file string, golden bool) string {
if b.testCase == "dry_run" {
rep = append(rep, dryrunReplacements...)
}
+ if b.ignoreChecksum && b.fs1.Hashes().Overlap(b.fs2.Hashes()).Count() == 0 {
+ // with no hash in common, --ignore-checksum skips the check for identical files instead of running it
+ rep = append(rep,
+ `^.*Checking potential conflicts\.\.\.$`, dropMe,
+ `^.*: \d+ differences found$`, dropMe,
+ `^.*: \d+ matching files$`, dropMe,
+ `^.*Finished checking the potential conflicts.*$`, dropMe,
+ `^.*Not checking potential conflicts.*$`, dropMe,
+ )
+ }
repFrom := make([]*regexp.Regexp, len(rep)/2)
repTo := make([]string, len(rep)/2)
for i := 0; i < len(rep); i += 2 {
diff --git a/cmd/bisync/checkfn_internal_test.go b/cmd/bisync/checkfn_internal_test.go
index 6a194f19c..6a8f4baba 100644
--- a/cmd/bisync/checkfn_internal_test.go
+++ b/cmd/bisync/checkfn_internal_test.go
@@ -3,8 +3,10 @@ package bisync
import (
"context"
"testing"
+ "time"
"github.com/rclone/rclone/fs"
+ "github.com/rclone/rclone/fs/filter"
"github.com/rclone/rclone/fs/hash"
"github.com/rclone/rclone/fstest/mockfs"
"github.com/rclone/rclone/fstest/mockobject"
@@ -57,3 +59,59 @@ func TestCheckFnMissingHash(t *testing.T) {
})
}
}
+
+func newEmptyFs(ctx context.Context, t *testing.T, fsName string, hashes hash.Set) fs.Fs {
+ f, err := mockfs.NewFs(ctx, fsName, "", nil)
+ require.NoError(t, err)
+ f.(*mockfs.Fs).SetHashes(hashes)
+ return f
+}
+
+func TestCheckConflictsSkipsCheck(t *testing.T) {
+ md5 := hash.NewHashSet(hash.MD5)
+ none := hash.NewHashSet()
+ for _, test := range []struct {
+ name string
+ hashes2 hash.Set
+ flag func(ci *fs.ConfigInfo)
+ wantSkip bool
+ }{
+ {name: "common hash", hashes2: md5},
+ {name: "no common hash", hashes2: none},
+ {name: "size-only with a common hash", hashes2: md5, flag: func(ci *fs.ConfigInfo) { ci.SizeOnly = true }, wantSkip: true},
+ {name: "size-only without a common hash", hashes2: none, flag: func(ci *fs.ConfigInfo) { ci.SizeOnly = true }, wantSkip: true},
+ {name: "ignore-checksum with a common hash", hashes2: md5, flag: func(ci *fs.ConfigInfo) { ci.IgnoreChecksum = true }},
+ {name: "ignore-checksum without a common hash", hashes2: none, flag: func(ci *fs.ConfigInfo) { ci.IgnoreChecksum = true }, wantSkip: true},
+ } {
+ t.Run(test.name, func(t *testing.T) {
+ ctx, ci := fs.AddConfig(context.Background())
+ if test.flag != nil {
+ test.flag(ci)
+ }
+ ctx, fi := filter.AddConfig(ctx)
+ require.NoError(t, fi.AddFile("file.txt"))
+
+ b := &bisyncRun{opt: &Options{}}
+ b.opt.Compare.Size = true
+ b.opt.Compare.Modtime = true
+ modtime := time.Date(2001, 2, 3, 4, 5, 6, 0, time.UTC)
+ b.march.ls1, b.march.ls2 = newFileList(), newFileList()
+ b.march.ls1.put("file.txt", 5, modtime, "", "-", "-")
+ b.march.ls2.put("file.txt", 5, modtime, "", "-", "-")
+
+ fs1 := newEmptyFs(ctx, t, "path1", md5)
+ fs2 := newEmptyFs(ctx, t, "path2", test.hashes2)
+ matches, matches1, matches2, err := b.checkconflicts(ctx, fi, fs1, fs2)
+ require.NoError(t, err)
+
+ assert.Equal(t, test.wantSkip, matches.Has("file.txt"), "matched a file that is on neither path")
+ if test.wantSkip {
+ assert.True(t, b.sameCompared(b.march.ls1, matches1, "file.txt", fs1), "Path1 differs from the listing")
+ assert.True(t, b.sameCompared(b.march.ls2, matches2, "file.txt", fs2), "Path2 differs from the listing")
+ } else {
+ assert.False(t, matches1.has("file.txt"), "Path1 checked")
+ assert.False(t, matches2.has("file.txt"), "Path2 checked")
+ }
+ })
+ }
+}
diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.copy1to2.que
new file mode 100644
index 000000000..8a5f92a1a
--- /dev/null
+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.copy1to2.que
@@ -0,0 +1 @@
+"file3.txt"
diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst
index 080041dd4..a460ba492 100644
--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst
+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst
@@ -2,7 +2,7 @@
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"
- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"
-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"
+- 10 - - 2003-03-04T00:00:00.000000000+0000 "file3.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"
diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-new
index 080041dd4..a460ba492 100644
--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-new
+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-new
@@ -2,7 +2,7 @@
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"
- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"
-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"
+- 10 - - 2003-03-04T00:00:00.000000000+0000 "file3.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"
diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-old b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-old
index 6e7bfe106..080041dd4 100644
--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-old
+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-old
@@ -1,7 +1,7 @@
# bisync listing v1 from test
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"
-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file2.txt"
+- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"
diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst
index 080041dd4..a460ba492 100644
--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst
+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst
@@ -2,7 +2,7 @@
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"
- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"
-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"
+- 10 - - 2003-03-04T00:00:00.000000000+0000 "file3.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"
diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-new
index 080041dd4..c78392d2b 100644
--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-new
+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-new
@@ -2,7 +2,7 @@
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"
- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"
-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"
+- 10 - - 2003-01-02T00:00:00.000000000+0000 "file3.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"
diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-old b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-old
index 6e7bfe106..080041dd4 100644
--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-old
+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-old
@@ -1,7 +1,7 @@
# bisync listing v1 from test
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"
-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file2.txt"
+- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"
- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"
diff --git a/cmd/bisync/testdata/test_conflict_window/golden/test.log b/cmd/bisync/testdata/test_conflict_window/golden/test.log
index 89bb38812..40801ecb2 100644
--- a/cmd/bisync/testdata/test_conflict_window/golden/test.log
+++ b/cmd/bisync/testdata/test_conflict_window/golden/test.log
@@ -235,3 +235,80 @@ INFO : Files are equal! Skipping: file2.txt
INFO : Updating listings
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
INFO : Bisync successful
+
+(32) : test changed on both paths, same size and modtime, different content - file3 (file3A, file3B)
+(33) : touch-glob 2003-01-02 {datadir/} file3*.txt
+(34) : copy-as {datadir/}file3A.txt {path1/} file3.txt
+(35) : copy-as {datadir/}file3B.txt {path2/} file3.txt
+
+(36) : test bisync with Path1 becoming identical to Path2 before the check, with a newer modtime
+(37) : touch-glob 2003-03-04 {datadir/} file3B.txt
+(38) : hook before-check copy-as {datadir/}file3B.txt {path1/} file3.txt
+(39) : bisync
+INFO : Setting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.
+INFO : Bisyncing with Comparison Settings:
+{
+"Modtime": true,
+"Size": true,
+"Checksum": false,
+"NoSlowHash": false,
+"SlowHashSyncOnly": false,
+"DownloadHash": false
+}
+INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
+INFO : Building Path1 and Path2 listings
+INFO : Path1 checking for diffs
+INFO : - Path1 File changed: size (larger), time (newer) - file3.txt
+INFO : Path1: 1 changes:  0 new,  1 modified,  0 deleted
+INFO : (Modified:  1 newer,  0 older,  1 larger,  0 smaller)
+INFO : Path2 checking for diffs
+INFO : - Path2 File changed: size (larger), time (newer) - file3.txt
+INFO : Path2: 1 changes:  0 new,  1 modified,  0 deleted
+INFO : (Modified:  1 newer,  0 older,  1 larger,  0 smaller)
+INFO : Applying changes
+NOTICE: hook before-check: copy-as {datadir/}file3B.txt {path1/} file3.txt
+INFO : Checking potential conflicts...
+NOTICE: {path2String}: 0 differences found
+NOTICE: {path2String}: 1 matching files
+INFO : Finished checking the potential conflicts. %!s(<nil>)
+NOTICE: - WARNING New or changed in both paths - file3.txt
+INFO : Files are equal but changed after the listing was made, so will check again next run: file3.txt
+INFO : Updating listings
+INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
+INFO : Bisync successful
+
+(40) : test bisync after file3 changed before the check
+(41) : bisync
+INFO : Setting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.
+INFO : Bisyncing with Comparison Settings:
+{
+"Modtime": true,
+"Size": true,
+"Checksum": false,
+"NoSlowHash": false,
+"SlowHashSyncOnly": false,
+"DownloadHash": false
+}
+INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
+INFO : Building Path1 and Path2 listings
+INFO : Path1 checking for diffs
+INFO : - Path1 File changed: size (larger), time (newer) - file3.txt
+INFO : Path1: 1 changes:  0 new,  1 modified,  0 deleted
+INFO : (Modified:  1 newer,  0 older,  1 larger,  0 smaller)
+INFO : Path2 checking for diffs
+INFO : - Path2 File changed: size (larger), time (newer) - file3.txt
+INFO : Path2: 1 changes:  0 new,  1 modified,  0 deleted
+INFO : (Modified:  1 newer,  0 older,  1 larger,  0 smaller)
+INFO : Applying changes
+INFO : Checking potential conflicts...
+NOTICE: {path2String}: 0 differences found
+NOTICE: {path2String}: 1 matching files
+INFO : Finished checking the potential conflicts. %!s(<nil>)
+NOTICE: - WARNING New or changed in both paths - file3.txt
+INFO : file3.txt: Files are equal but will copy anyway to update modtime (will not rename)
+INFO : - Path1 Queue copy to Path2 - {path2/}file3.txt
+INFO : - Path1 Do queued copies to - Path2
+INFO : There was nothing to transfer
+INFO : Updating listings
+INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
+INFO : Bisync successful
diff --git a/cmd/bisync/testdata/test_conflict_window/modfiles/file3A.txt b/cmd/bisync/testdata/test_conflict_window/modfiles/file3A.txt
new file mode 100644
index 000000000..72a707eba
--- /dev/null
+++ b/cmd/bisync/testdata/test_conflict_window/modfiles/file3A.txt
@@ -0,0 +1 @@
+Version A
diff --git a/cmd/bisync/testdata/test_conflict_window/modfiles/file3B.txt b/cmd/bisync/testdata/test_conflict_window/modfiles/file3B.txt
new file mode 100644
index 000000000..9084e7c47
--- /dev/null
+++ b/cmd/bisync/testdata/test_conflict_window/modfiles/file3B.txt
@@ -0,0 +1 @@
+Version B
diff --git a/cmd/bisync/testdata/test_conflict_window/scenario.txt b/cmd/bisync/testdata/test_conflict_window/scenario.txt
index da7efbd33..c735cccf6 100644
--- a/cmd/bisync/testdata/test_conflict_window/scenario.txt
+++ b/cmd/bisync/testdata/test_conflict_window/scenario.txt
@@ -2,6 +2,7 @@ test conflict window
# Check identical files when the paths change between the listing snapshot and the check for identical files
# - Path2 becomes identical to Path1 before the check, with a newer modtime file1 (file1A, file1B)
# - Both paths change identically before the check on two runs in a row, then stop file2 (file2A, file2B, file2C)
+# - Path1 becomes identical to Path2 before the check, with a newer modtime file3 (file3A, file3B)
test initial bisync
bisync resync
@@ -41,3 +42,16 @@ bisync
test bisync after file2 stops changing
bisync
+
+test changed on both paths, same size and modtime, different content - file3 (file3A, file3B)
+touch-glob 2003-01-02 {datadir/} file3*.txt
+copy-as {datadir/}file3A.txt {path1/} file3.txt
+copy-as {datadir/}file3B.txt {path2/} file3.txt
+
+test bisync with Path1 becoming identical to Path2 before the check, with a newer modtime
+touch-glob 2003-03-04 {datadir/} file3B.txt
+hook before-check copy-as {datadir/}file3B.txt {path1/} file3.txt
+bisync
+
+test bisync after file3 changed before the check
+bisync
diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.copy1to2.que
index ce7f0ba5c..326617e33 100644
--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.copy1to2.que
+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.copy1to2.que
@@ -1 +1 @@
-"file10.txt"
+"file11.txt"
diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.delete2.que b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.delete2.que
index ce7f0ba5c..326617e33 100644
--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.delete2.que
+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.delete2.que
@@ -1 +1 @@
-"file10.txt"
+"file11.txt"
diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-new
index 6717df151..99e1afa3b 100644
--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-new
+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-new
@@ -1,10 +1,10 @@
# bisync listing v1 from test
-- 109 - - 0001-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
-- 19 - - 0001-01-01T00:00:00.000000000+0000 "file1.txt"
-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file2.txt"
-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file3.txt"
-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file4.txt"
-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file5.txt"
-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file6.txt"
-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file7.txt"
-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file8.txt"
+- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
+- 19 - - 2023-08-26T00:00:00.000000000+0000 "file1.txt"
+- 13 - - 2001-01-02T00:00:00.000000000+0000 "file2.txt"
+- 13 - - 2002-02-02T00:00:00.000000000+0000 "file3.txt"
+- 13 - - 2001-01-02T00:00:00.000000000+0000 "file4.txt"
+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"
+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"
+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file7.txt"
+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file8.txt"
diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-old b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-old
index 7e03bad99..ec4348c31 100644
--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-old
+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-old
@@ -1,7 +1,7 @@
# bisync listing v1 from test
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
- 19 - - 2023-08-26T00:00:00.000000000+0000 "file1.txt"
-- 14 - - 0001-01-01T00:00:00.000000000+0000 "file10.txt"
+- 19 - - 2001-05-06T00:00:00.000000000+0000 "file11.txt"
- 13 - - 2001-01-02T00:00:00.000000000+0000 "file2.txt"
- 13 - - 2002-02-02T00:00:00.000000000+0000 "file3.txt"
- 13 - - 2001-01-02T00:00:00.000000000+0000 "file4.txt"
diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-new
index 33eaa6d6d..ec4348c31 100644
--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-new
+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-new
@@ -1,11 +1,11 @@
# bisync listing v1 from test
-- 109 - - 0001-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
-- 19 - - 0001-01-01T00:00:00.000000000+0000 "file1.txt"
-- 14 - - 0001-01-01T00:00:00.000000000+0000 "file10.txt"
-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file2.txt"
-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file3.txt"
-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file4.txt"
-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file5.txt"
-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file6.txt"
-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file7.txt"
-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file8.txt"
+- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
+- 19 - - 2023-08-26T00:00:00.000000000+0000 "file1.txt"
+- 19 - - 2001-05-06T00:00:00.000000000+0000 "file11.txt"
+- 13 - - 2001-01-02T00:00:00.000000000+0000 "file2.txt"
+- 13 - - 2002-02-02T00:00:00.000000000+0000 "file3.txt"
+- 13 - - 2001-01-02T00:00:00.000000000+0000 "file4.txt"
+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"
+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"
+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file7.txt"
+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file8.txt"
diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-old b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-old
index 7e03bad99..ec4348c31 100644
--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-old
+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-old
@@ -1,7 +1,7 @@
# bisync listing v1 from test
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
- 19 - - 2023-08-26T00:00:00.000000000+0000 "file1.txt"
-- 14 - - 0001-01-01T00:00:00.000000000+0000 "file10.txt"
+- 19 - - 2001-05-06T00:00:00.000000000+0000 "file11.txt"
- 13 - - 2001-01-02T00:00:00.000000000+0000 "file2.txt"
- 13 - - 2002-02-02T00:00:00.000000000+0000 "file3.txt"
- 13 - - 2001-01-02T00:00:00.000000000+0000 "file4.txt"
diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/test.log b/cmd/bisync/testdata/test_equal_skipped/golden/test.log
index ab1af3fa5..812503029 100644
--- a/cmd/bisync/testdata/test_equal_skipped/golden/test.log
+++ b/cmd/bisync/testdata/test_equal_skipped/golden/test.log
@@ -224,3 +224,64 @@ INFO : There was nothing to transfer
INFO : Updating listings
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
INFO : Bisync successful
+
+(38) : test new on both paths with --ignore-checksum and identical - file11
+(39) : touch-glob 2001-05-06 {datadir/} file11.txt
+(40) : copy-as {datadir/}file11.txt {path1/} file11.txt
+(41) : copy-as {datadir/}file11.txt {path2/} file11.txt
+(42) : bisync ignore-checksum
+INFO : Setting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.
+INFO : Bisyncing with Comparison Settings:
+{
+"Modtime": true,
+"Size": true,
+"Checksum": false,
+"NoSlowHash": false,
+"SlowHashSyncOnly": false,
+"DownloadHash": false
+}
+INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
+INFO : Building Path1 and Path2 listings
+INFO : Path1 checking for diffs
+INFO : - Path1 File is new - file11.txt
+INFO : Path1: 1 changes:  1 new,  0 modified,  0 deleted
+INFO : Path2 checking for diffs
+INFO : - Path2 File is new - file11.txt
+INFO : Path2: 1 changes:  1 new,  0 modified,  0 deleted
+INFO : Applying changes
+INFO : Checking potential conflicts...
+NOTICE: {path2String}: 0 differences found
+NOTICE: {path2String}: 1 matching files
+INFO : Finished checking the potential conflicts. %!s(<nil>)
+NOTICE: - WARNING New or changed in both paths - file11.txt
+INFO : Files are equal! Skipping: file11.txt
+INFO : Updating listings
+INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
+INFO : Bisync successful
+
+(43) : test delete file11 on Path1
+(44) : delete-file {path1/}file11.txt
+(45) : bisync ignore-checksum
+INFO : Setting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.
+INFO : Bisyncing with Comparison Settings:
+{
+"Modtime": true,
+"Size": true,
+"Checksum": false,
+"NoSlowHash": false,
+"SlowHashSyncOnly": false,
+"DownloadHash": false
+}
+INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
+INFO : Building Path1 and Path2 listings
+INFO : Path1 checking for diffs
+INFO : - Path1 File was deleted - file11.txt
+INFO : Path1: 1 changes:  0 new,  0 modified,  1 deleted
+INFO : Path2 checking for diffs
+INFO : Applying changes
+INFO : - Path2 Queue delete - {path2/}file11.txt
+INFO : - Path1 Do queued copies to - Path2
+INFO : There was nothing to transfer
+INFO : Updating listings
+INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
+INFO : Bisync successful
diff --git a/cmd/bisync/testdata/test_equal_skipped/modfiles/file11.txt b/cmd/bisync/testdata/test_equal_skipped/modfiles/file11.txt
new file mode 100644
index 000000000..27c89c7bc
--- /dev/null
+++ b/cmd/bisync/testdata/test_equal_skipped/modfiles/file11.txt
@@ -0,0 +1 @@
+Same on both paths
diff --git a/cmd/bisync/testdata/test_equal_skipped/scenario.txt b/cmd/bisync/testdata/test_equal_skipped/scenario.txt
index 321469848..6bc346b63 100644
--- a/cmd/bisync/testdata/test_equal_skipped/scenario.txt
+++ b/cmd/bisync/testdata/test_equal_skipped/scenario.txt
@@ -4,6 +4,7 @@ test equal skipped
# - Changed on both paths and identical, then changed on Path2 during the sync,
# keeping the same size and modtime file3 (file3B)
# - New on both paths with --size-only, same size and different content file10 (file10L, file10R)
+# - New on both paths with --ignore-checksum and identical file11
test initial bisync
bisync resync
@@ -51,3 +52,13 @@ bisync size-only
test delete file10 on Path1
delete-file {path1/}file10.txt
bisync size-only
+
+test new on both paths with --ignore-checksum and identical - file11
+touch-glob 2001-05-06 {datadir/} file11.txt
+copy-as {datadir/}file11.txt {path1/} file11.txt
+copy-as {datadir/}file11.txt {path2/} file11.txt
+bisync ignore-checksum
+
+test delete file11 on Path1
+delete-file {path1/}file11.txt
+bisync ignore-checksum