cts: statsd: distinguish between file not found and tracing disabled

Due to an unfortunate combination of 3a66ccefb265a375357582258ff1708a263d0023
and d1eb665ac73ca16c5443666dc2de3f7e49951768 , we ended up in the state
where if debugfs is not available, we would never check if tracefs is
available because tracing would be assumed to be disabled.

Change the behaviour to return -1 instead of 0 when the file is not
found - we should always have one of tracefs and debugfs available as
it is mandated by the CDD so if both paths are not found, this is a
genuine failure and should not be hidden.

Also change the behaviour to look at tracefs first as going forward, it
will be the default as debugfs is heading towards removal.

Bug: 157433028
Change-Id: I1f75c4b935868e95c6100e4a7e279dfc404df179
Merged-In: I91e6552d0b5ab241144df8805ffb05a47ac812b4
1 file changed
tree: 03b59aa45faf56d19add72ab1b0cfd99f2220cf7
  1. tests/