Skip to content

Conversation

@darioush
Copy link

@darioush darioush commented Apr 11, 2024

Hi. I understand that in #28461 these sleeps were replaced with Chtimes to reduce test execution time.
However, I noticed this test sometimes fails on linux with the race detector enabled, eg:
go test -timeout 900s github.com/ethereum/go-ethereum/accounts/keystore -cover -count=10 -race -shuffle=on

I believe updating the mod time to a past time does not work due to the way the fileCache tracks lastMod:

modified := info.ModTime()
if modified.After(fc.lastMod) {
mods.Add(path)
}
if modified.After(newLastMod) {
newLastMod = modified
}

The sleeps seem preferable to modifying the file cache for testing, or alternatively resetting the lastMod field in the test. Thanks for your consideration.

@fjl
Copy link
Contributor

fjl commented May 29, 2024

Test was fixed in #29867

@fjl fjl closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants