2
2
mirror of https://github.com/octoleo/restic.git synced 2024-05-30 07:30:50 +00:00
restic/cmd/restic
Michael Eischer dc060356c2 mount: only start next test after mount command cleanup is complete
The test did not wait for the mount command to fully shutdown all
running goroutines. This caused the go race detector to report a data
race related to lock refreshes.

==================
WARNING: DATA RACE
Write at 0x0000021bdfdb by goroutine 667:
  github.com/restic/restic/internal/backend/retry.TestFastRetries()
      /restic/restic/internal/backend/retry/testing.go:7 +0x18f
  github.com/restic/restic/cmd/restic.withTestEnvironment()
      /restic/restic/cmd/restic/integration_helpers_test.go:175 +0x183
  github.com/restic/restic/cmd/restic.TestMountSameTimestamps()
      /restic/restic/cmd/restic/integration_fuse_test.go:202 +0xac
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      /usr/lib/go/src/testing/testing.go:1493 +0x47

Previous read at 0x0000021bdfdb by goroutine 609:
  github.com/restic/restic/internal/backend/retry.(*Backend).retry()
      /restic/restic/internal/backend/retry/backend_retry.go:72 +0x9e
  github.com/restic/restic/internal/backend/retry.(*Backend).Remove()
      /restic/restic/internal/backend/retry/backend_retry.go:149 +0x17d
  github.com/restic/restic/internal/cache.(*Backend).Remove()
      /restic/restic/internal/cache/backend.go:38 +0x11d
  github.com/restic/restic/internal/restic.(*Lock).Unlock()
      /restic/restic/internal/restic/lock.go:190 +0x249
  github.com/restic/restic/cmd/restic.refreshLocks.func1()
      /restic/restic/cmd/restic/lock.go:86 +0xae
  runtime.deferreturn()
      /usr/lib/go/src/runtime/panic.go:476 +0x32
  github.com/restic/restic/cmd/restic.lockRepository.func2()
      /restic/restic/cmd/restic/lock.go:61 +0x71

[...]

Goroutine 609 (finished) created at:
  github.com/restic/restic/cmd/restic.lockRepository()
      /restic/restic/cmd/restic/lock.go:61 +0x488
  github.com/restic/restic/cmd/restic.lockRepo()
      /restic/restic/cmd/restic/lock.go:25 +0x219
  github.com/restic/restic/cmd/restic.runMount()
      /restic/restic/cmd/restic/cmd_mount.go:126 +0x1f8
  github.com/restic/restic/cmd/restic.testRunMount()
      /restic/restic/cmd/restic/integration_fuse_test.go:61 +0x1ce
  github.com/restic/restic/cmd/restic.checkSnapshots.func1()
      /restic/restic/cmd/restic/integration_fuse_test.go:90 +0x124
==================
2022-11-11 21:43:01 +01:00
..
testdata copy: test that trees with unstable json encoding are properly copied 2021-03-08 22:16:48 +01:00
.gitignore Moves files 2017-07-23 14:19:13 +02:00
cleanup.go Allow cleanup handlers to filter the exit code 2022-08-26 23:04:59 +02:00
cmd_backup_test.go Add more error checks 2021-01-30 20:02:37 +01:00
cmd_backup.go Merge pull request #3977 from greatroar/progress 2022-10-29 21:33:04 +02:00
cmd_cache.go cmd, ui: Deduplicate formatting utilities 2022-10-23 13:40:07 +02:00
cmd_cat.go identify keys by ID and not name 2022-10-15 16:07:43 +02:00
cmd_check_test.go [#issue 3490] Support for specifying file size in read-data-subset 2021-11-02 15:25:46 +05:30
cmd_check.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_copy.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_debug.go debug: fix crash in debug examine --reupload-blobs 2022-11-09 22:13:17 +01:00
cmd_diff.go cmd, ui: Deduplicate formatting utilities 2022-10-23 13:40:07 +02:00
cmd_dump_test.go dump: Add test for splitPath 2020-08-30 16:00:48 +02:00
cmd_dump.go restic: Change FindSnapshot functions to return the snapshot 2022-10-15 13:34:04 +02:00
cmd_find.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_forget.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_generate.go Add powershell completion 2022-09-11 00:44:12 +02:00
cmd_init.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_key.go parallelize more List usages 2022-10-21 21:26:45 +02:00
cmd_list.go repository: split index into a separate package 2022-10-08 21:15:34 +02:00
cmd_ls_test.go Add file mode in symbolic notation to ls --json 2021-11-16 19:45:50 +02:00
cmd_ls.go restic: Change FindSnapshot functions to return the snapshot 2022-10-15 13:34:04 +02:00
cmd_migrate.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_mount.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_options.go Some options fixes 2020-12-23 23:26:04 +03:00
cmd_prune.go Merge pull request #3983 from greatroar/formatting 2022-10-31 18:52:24 +01:00
cmd_rebuild_index.go repository: split index into a separate package 2022-10-08 21:15:34 +02:00
cmd_recover.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_restore.go restic: Change FindSnapshot functions to return the snapshot 2022-10-15 13:34:04 +02:00
cmd_self_update.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_snapshots_test.go Add more error checks 2021-01-30 20:02:37 +01:00
cmd_snapshots.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_stats.go cmd, ui: Deduplicate formatting utilities 2022-10-23 13:40:07 +02:00
cmd_tag.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_unlock.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_version.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
delete.go Remove ctx from globalOptions 2022-10-03 00:19:46 +02:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
exclude_test.go Add tests 2020-11-28 17:00:31 +01:00
exclude.go backup: extract exclude pattern options 2022-10-21 21:40:59 +02:00
find.go add comment 2022-10-15 13:34:21 +02:00
flags_test.go Moves files 2017-07-23 14:19:13 +02:00
format.go cmd, ui: Deduplicate formatting utilities 2022-10-23 13:40:07 +02:00
global_debug.go Allow cleanup handlers to filter the exit code 2022-08-26 23:04:59 +02:00
global_release.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
global_test.go Fix issues reported by staticcheck 2021-01-30 20:43:53 +01:00
global.go only print compression level starting from repository version 2 2022-11-04 22:40:07 +01:00
integration_filter_pattern_test.go backup: extract exclude pattern options 2022-10-21 21:40:59 +02:00
integration_fuse_test.go mount: only start next test after mount command cleanup is complete 2022-11-11 21:43:01 +01:00
integration_helpers_test.go backend: Split RetryBackend into own package 2022-10-21 21:38:17 +02:00
integration_helpers_unix_test.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
integration_helpers_windows_test.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
integration_test.go repository: split index into a separate package 2022-10-08 21:15:34 +02:00
local_layout_test.go Support specifying multiple host flags for various commands 2020-02-26 22:17:59 +01:00
lock_test.go lock: Tweak timeouts for lock refresh test 2022-11-04 22:48:18 +01:00
lock.go fix Unix to UnixNano 2022-10-23 23:40:21 +03:00
main.go pass global context through cobra 2022-10-03 00:19:46 +02:00
progress.go cmd, ui: Deduplicate formatting utilities 2022-10-23 13:40:07 +02:00
secondary_repo_test.go gofmt all files 2022-08-19 19:12:26 +02:00
secondary_repo.go Do not include the actual values of environment variables in help output 2022-08-26 20:39:54 +02:00