Implemented getFlushes and getFsyncs.
parent
cab543fa8c
commit
c090f136cd
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue