Projects
Eulaceura:Factory
golang-github-fsnotify-fsnotify
_service:obs_scm:70cc4a11de4adb99aa24da1e7b1782...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:70cc4a11de4adb99aa24da1e7b1782da5535beaa.patch of Package golang-github-fsnotify-fsnotify
From 70cc4a11de4adb99aa24da1e7b1782da5535beaa Mon Sep 17 00:00:00 2001 From: Matthias Stone <matthias@bellstone.ca> Date: Thu, 30 Aug 2018 14:03:37 -0600 Subject: [PATCH] Fix TestInotifyOverflow (#265) * Queued inotify events could have been read by the test before max_queued_events was hit --- inotify_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inotify_test.go b/inotify_test.go index 54f3f00..2c11d2e 100644 --- a/inotify_test.go +++ b/inotify_test.go @@ -11,6 +11,7 @@ import ( "os" "path/filepath" "strings" + "sync" "testing" "time" ) @@ -390,9 +391,12 @@ func TestInotifyOverflow(t *testing.T) { errChan := make(chan error, numDirs*numFiles) + // All events need to be in the inotify queue before pulling events off it to trigger this error. + wg := sync.WaitGroup{} for dn := 0; dn < numDirs; dn++ { testSubdir := fmt.Sprintf("%s/%d", testDir, dn) + wg.Add(1) go func() { for fn := 0; fn < numFiles; fn++ { testFile := fmt.Sprintf("%s/%d", testSubdir, fn) @@ -409,8 +413,10 @@ func TestInotifyOverflow(t *testing.T) { continue } } + wg.Done() }() } + wg.Wait() creates := 0 overflows := 0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2