Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/plugintest: Switch from (os.File).Readdir() to os.ReadDir() #1056

Merged
merged 1 commit into from Sep 14, 2022

Commits on Sep 12, 2022

  1. internal/plugintest: Switch from (os.File).Readdir() to os.ReadDir()

    Reference: https://pkg.go.dev/os#File.Readdir
    Reference: https://pkg.go.dev/os#ReadDir
    
    While attempting to troubleshoot macOS kernel panic behaviors while running acceptance testing, I was able to capture a log whose last entry was `Symlinking source directories to work directory`. Since that operation tends to occur in temporary directory space, there is at least some potential there for strange macOS and Go behaviors.
    
    The `(os.File).Readdir()` method does make this mention in particular:
    
    > Most clients are better served by the more efficient ReadDir method.
    
    Making this a branch so others potentially affected by macOS kernel panics can try this out. This may not be the root cause, as there is a lot more process-oriented logic that occurs to start and stop providers in the testing framework, but if nothing else it could help.
    bflad committed Sep 12, 2022
    Copy the full SHA
    b5a05d4 View commit details
    Browse the repository at this point in the history