Commit c090f136 authored by Aaron Jacobs's avatar Aaron Jacobs

Implemented getFlushes and getFsyncs.

parent cab543fa
...@@ -106,18 +106,26 @@ func (t *flushFSTest) TearDown() { ...@@ -106,18 +106,26 @@ func (t *flushFSTest) TearDown() {
// Helpers // Helpers
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
func readReports(f *os.File) (reports []string, err error)
// Return a copy of the current contents of t.flushes. // Return a copy of the current contents of t.flushes.
//
// LOCKS_EXCLUDED(t.mu)
func (t *flushFSTest) getFlushes() (p []string) { func (t *flushFSTest) getFlushes() (p []string) {
panic("TODO") var err error
if p, err = readReports(t.flushes); err != nil {
panic(err)
}
return
} }
// Return a copy of the current contents of t.fsyncs. // Return a copy of the current contents of t.fsyncs.
//
// LOCKS_EXCLUDED(t.mu)
func (t *flushFSTest) getFsyncs() (p []string) { func (t *flushFSTest) getFsyncs() (p []string) {
panic("TODO") var err error
if p, err = readReports(t.fsyncs); err != nil {
panic(err)
}
return
} }
// Like syscall.Dup2, but correctly annotates the syscall as blocking. See here // Like syscall.Dup2, but correctly annotates the syscall as blocking. See here
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment