oniony / TMSU

TMSU lets you tags your files and then access them through a nifty virtual filesystem from any other application.
Other
2.01k stars 115 forks source link

Unit tests are shaky: Fingerprint incorrect #281

Open Hellseher opened 2 months ago

Hellseher commented 2 months ago

Hi

During refreshing tmsu on Guix I've faced with tests are shaky during the multiple build cycles some of them passed and fail in next build cycle.

Round 1

RUNNING UNIT TESTS

go test github.com/oniony/TMSU/...
?       github.com/oniony/TMSU  [no test files]
?       github.com/oniony/TMSU/common/filesystem        [no test files]
?       github.com/oniony/TMSU/common/log       [no test files]
?       github.com/oniony/TMSU/common/terminal  [no test files]
?       github.com/oniony/TMSU/common/terminal/ansi     [no test files]
ok      github.com/oniony/TMSU/cli      0.004s
ok      github.com/oniony/TMSU/common   0.003s
?       github.com/oniony/TMSU/storage  [no test files]
?       github.com/oniony/TMSU/storage/database [no test files]
?       github.com/oniony/TMSU/version  [no test files]
?       github.com/oniony/TMSU/vfs      [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/filesystem     [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/log    [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/terminal       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/terminal/ansi  [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/storage       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/storage/database      [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/version       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/vfs   [no test files]
--- FAIL: TestSHA256Generation (0.01s)
    fingerprinter_test.go:93: Fingerprint incorrect: expected 'a4bd6407e40326c126f10412e245e4491c511636dbeddc3d2b16b41700017bc9' but was 'a990175100e72ee106726b8b7c1529749cfcca7c0628bcb59fb34f62922b52a3'
--- FAIL: TestDynamicMD5Generation (0.00s)
    fingerprinter_test.go:93: Fingerprint incorrect: expected 'a758071b3c2fe43c9a9b91db5077cd12' but was 'd41d8cd98f00b204e9800998ecf8427e'
FAIL
FAIL    github.com/oniony/TMSU/common/fingerprint       0.076s
ok      github.com/oniony/TMSU/common/path      0.003s
ok      github.com/oniony/TMSU/common/text      0.002s
ok      github.com/oniony/TMSU/entities 0.003s
ok      github.com/oniony/TMSU/query    0.003s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/cli   0.004s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/common        0.002s
--- FAIL: TestDefaultGeneration (0.00s)
    fingerprinter_test.go:89: lstat /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
FAIL
FAIL    github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/fingerprint    0.078s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/path   0.002s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/text   0.003s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/entities      0.002s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/query 0.002s
FAIL

Round 2

RUNNING UNIT TESTS

go test github.com/oniony/TMSU/...
?       github.com/oniony/TMSU  [no test files]
?       github.com/oniony/TMSU/common/filesystem        [no test files]
?       github.com/oniony/TMSU/common/log       [no test files]
?       github.com/oniony/TMSU/common/terminal  [no test files]
?       github.com/oniony/TMSU/common/terminal/ansi     [no test files]
ok      github.com/oniony/TMSU/cli      0.004s
ok      github.com/oniony/TMSU/common   0.002s
?       github.com/oniony/TMSU/storage  [no test files]
?       github.com/oniony/TMSU/storage/database [no test files]
?       github.com/oniony/TMSU/version  [no test files]
?       github.com/oniony/TMSU/vfs      [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/filesystem     [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/log    [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/terminal       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/terminal/ansi  [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/storage       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/storage/database      [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/version       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/vfs   [no test files]
--- FAIL: TestSHA256Generation (0.01s)
    fingerprinter_test.go:93: Fingerprint incorrect: expected 'a4bd6407e40326c126f10412e245e4491c511636dbeddc3d2b16b41700017bc9' but was 'bbd6e314b700c9a60afb649f99c4f1af58b93df58e5f0d8c0bb3aa3cb1d25e3b'
--- FAIL: TestDynamicMD5Generation (0.01s)
    fingerprinter_test.go:89: open /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
--- FAIL: TestDynamicSHA1Generation (0.00s)
    fingerprinter_test.go:89: lstat /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
--- FAIL: TestDynamicSHA256Generation (0.00s)
    fingerprinter_test.go:89: open /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
--- FAIL: TestNoneGeneration (0.00s)
    fingerprinter_test.go:89: lstat /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
FAIL
FAIL    github.com/oniony/TMSU/common/fingerprint       0.064s
ok      github.com/oniony/TMSU/common/path      0.002s
ok      github.com/oniony/TMSU/common/text      0.003s
ok      github.com/oniony/TMSU/entities 0.002s
ok      github.com/oniony/TMSU/query    0.003s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/cli   0.004s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/common        0.002s
--- FAIL: TestDefaultGeneration (0.00s)
    fingerprinter_test.go:89: lstat /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
--- FAIL: TestMD5Generation (0.01s)
    fingerprinter_test.go:89: lstat /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
--- FAIL: TestSHA1Generation (0.00s)
    fingerprinter_test.go:93: Fingerprint incorrect: expected '09bc65c6f6588b802177632a81b3afbe3358b7f3' but was '60cacbf3d72e1e7834203da608037b1bf83b40e8'
--- FAIL: TestSHA256Generation (0.00s)
    fingerprinter_test.go:93: Fingerprint incorrect: expected 'cdf701ac9e4258a8efec453930c73d698d12d7e83c38a049a1f1a64375fbf776' but was 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
--- FAIL: TestDynamicMD5Generation (0.00s)
    fingerprinter_test.go:89: open /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
FAIL
FAIL    github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/fingerprint    0.021s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/path   0.002s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/text   0.002s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/entities      0.002s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/query 0.003s
FAIL

Round 3

RUNNING UNIT TESTS

go test github.com/oniony/TMSU/...
?       github.com/oniony/TMSU  [no test files]
?       github.com/oniony/TMSU/common/filesystem        [no test files]
?       github.com/oniony/TMSU/common/log       [no test files]
?       github.com/oniony/TMSU/common/terminal  [no test files]
?       github.com/oniony/TMSU/common/terminal/ansi     [no test files]
ok      github.com/oniony/TMSU/cli      0.004s
ok      github.com/oniony/TMSU/common   0.003s
?       github.com/oniony/TMSU/storage  [no test files]
?       github.com/oniony/TMSU/storage/database [no test files]
?       github.com/oniony/TMSU/version  [no test files]
?       github.com/oniony/TMSU/vfs      [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/filesystem     [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/log    [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/terminal       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/terminal/ansi  [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/storage       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/storage/database      [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/version       [no test files]
?       github.com/oniony/TMSU/src/github.com/oniony/TMSU/vfs   [no test files]
--- FAIL: TestSHA256Generation (0.01s)
    fingerprinter_test.go:93: Fingerprint incorrect: expected 'a4bd6407e40326c126f10412e245e4491c511636dbeddc3d2b16b41700017bc9' but was '4fe9c1cfe20e96f740bb37758e2a1719a3d95bfccb6c50d7d2d6c8468935a3d7'
--- FAIL: TestDynamicMD5Generation (0.01s)
    fingerprinter_test.go:89: open /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
FAIL
FAIL    github.com/oniony/TMSU/common/fingerprint       0.080s
ok      github.com/oniony/TMSU/common/path      0.002s
ok      github.com/oniony/TMSU/common/text      0.002s
ok      github.com/oniony/TMSU/entities 0.002s
ok      github.com/oniony/TMSU/query    0.003s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/cli   0.004s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/common        0.002s
--- FAIL: TestDefaultGeneration (0.00s)
    fingerprinter_test.go:89: lstat /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
--- FAIL: TestMD5Generation (0.01s)
    fingerprinter_test.go:93: Fingerprint incorrect: expected '40cb0a2f629169e30c2ef707255b33d5' but was 'd41d8cd98f00b204e9800998ecf8427e'
--- FAIL: TestSHA1Generation (0.00s)
    fingerprinter_test.go:89: lstat /tmp/guix-build-tmsu-0.7.5.drv-0/tmsu-fingerprint: no such file or directory
FAIL
FAIL    github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/fingerprint    0.044s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/path   0.002s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/common/text   0.002s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/entities      0.002s
ok      github.com/oniony/TMSU/src/github.com/oniony/TMSU/query 0.003s
FAIL