jacereda / fsatrace

Filesystem access tracer
ISC License
78 stars 12 forks source link

Notes on the test suite #10

Open ndmitchell opened 8 years ago

ndmitchell commented 8 years ago

I had a look through the test suite. A couple of questions:

jacereda commented 8 years ago

RR = Relative Read

I made a mistake in the suite, the upper case variants mean fsatrace was unable to determine the full absolute path for the access. Should be fixed now.

As for the os thing, yes, it also left me wondering why it reports "mingw32". I was aware of isWindows, just decided to go with that to avoid another dependency just for the tests.

ndmitchell commented 8 years ago

So is the upper-case R relative thing something Shake should handle? And what is it relative to - the current directory at the time it was captured? Under which circumstances is it generated?

Yep, depending on an extra dependency is always annoying.

jacereda commented 8 years ago

I don't think Shake should handle it. It's something that should disappear as soon as everything is working properly. It's there mainly to help figuring out if some tool is using an unimplemented feature.

It's mainly related to the usage of xxxat() function variants, like:

https://github.com/jacereda/fsatrace/blob/master/src/unix/fsatraceso.c#L267

I've never used them and haven't seen them used in any of the major compilers, so I didn't bother to implement them. Those could be asserts, but I decided to report them anyways.

They can also be reported on Windows if obtaining the path associated with a handle fails for some reason. I haven't seen it so far.

droundy commented 8 years ago

The "at" variants of functions are wonderful system calls, and it seems well worth supporting them! (And they aren't that hard. Here is how I do it in bigbro:

https://github.com/droundy/bigbro/blob/master/linux-proc.h#L3