* Queued inotify events could have been read by the test before max_queued_events was hit
"os"
"path/filepath"
"strings"
+ "sync"
"testing"
"time"
)
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)
continue
}
}
+ wg.Done()
}()
}
+ wg.Wait()
creates := 0
overflows := 0