Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code coverage #35

Open
paulp opened this issue Jul 17, 2015 · 3 comments
Open

code coverage #35

paulp opened this issue Jul 17, 2015 · 3 comments

Comments

@paulp
Copy link
Contributor

paulp commented Jul 17, 2015

This should help in identifying more methods to delete alongside the normal reasons for code coverage. Happily it just worked. Would be great to see it integrated.

% go get github.com/axw/gocov/gocov && ( cd suffuse && gocov test | gocov report )
OK: 12 passed
PASS
coverage: 66.5% of statements
ok      github.com/suffuse/go-suffuse/suffuse   0.961s

github.com/suffuse/go-suffuse/suffuse/sys.go         GoFileInfoToFuseAttr        100.00% (11/11)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Attr             100.00% (8/8)
github.com/suffuse/go-suffuse/suffuse/rule.go        IdRule.MetaData         100.00% (5/5)
github.com/suffuse/go-suffuse/suffuse/util.go        ScratchFile             100.00% (5/5)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Getxattr         100.00% (5/5)
github.com/suffuse/go-suffuse/suffuse/util.go        ScratchDir          100.00% (5/5)
github.com/suffuse/go-suffuse/suffuse/rule.go        FileCommand.split       100.00% (5/5)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Listxattr        100.00% (5/5)
github.com/suffuse/go-suffuse/suffuse/platform_darwin.go SetSysAttributes        100.00% (4/4)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.SlurpBytes         100.00% (4/4)
github.com/suffuse/go-suffuse/suffuse/log.go         level               100.00% (4/4)
github.com/suffuse/go-suffuse/suffuse/lines.go       Lines.Map           100.00% (4/4)
github.com/suffuse/go-suffuse/suffuse/lines.go       Lines.FlatMap           100.00% (4/4)
github.com/suffuse/go-suffuse/suffuse/lines.go       Lines.Fold          100.00% (4/4)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Join           100.00% (4/4)
github.com/suffuse/go-suffuse/suffuse/path.go        Paths               100.00% (4/4)
github.com/suffuse/go-suffuse/suffuse/sys.go         Path.SysStatFile        100.00% (3/3)
github.com/suffuse/go-suffuse/suffuse/sys.go         TrapExit            100.00% (3/3)
github.com/suffuse/go-suffuse/suffuse/opts.go        @63:13              100.00% (3/3)
github.com/suffuse/go-suffuse/suffuse/path.go        MaybePath           100.00% (3/3)
github.com/suffuse/go-suffuse/suffuse/sys.go         Path.SysStatLink        100.00% (3/3)
github.com/suffuse/go-suffuse/suffuse/node.go        childDirent             100.00% (2/2)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Setxattr         100.00% (2/2)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Removexattr      100.00% (2/2)
github.com/suffuse/go-suffuse/suffuse/sys.go         @28:6               100.00% (2/2)
github.com/suffuse/go-suffuse/suffuse/sfs.go         Sfs.Serve           100.00% (2/2)
github.com/suffuse/go-suffuse/suffuse/lines.go       StripMargin             100.00% (2/2)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Setattr          100.00% (2/2)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Access           100.00% (2/2)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.FileExists         100.00% (2/2)
github.com/suffuse/go-suffuse/suffuse/process.go     psutilHostDump          100.00% (2/2)
github.com/suffuse/go-suffuse/suffuse/config.go      @8:22               100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/config.go      @9:22               100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/idnode.go      NewIdNode           100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/json.go        JsonPretty          100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/lines.go       NewLines            100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/lines.go       BytesToLines            100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/lines.go       Lines.Join          100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/lines.go       Lines.JoinWords         100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/lines.go       Lines.Len           100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/lines.go       Lines.String            100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/lines.go       Lines.TrimAll           100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/lines.go       @25:47              100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/lines.go       SplitLines          100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/log.go         logI                100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/log.go         logD                100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/log.go         SetLogLevel             100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/node.go        NewFilePerms            100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/opts.go        sfsOpts.newError        100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Absolute           100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Parent             100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.EvalSymlinks       100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.IsEmpty            100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsChdir            100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsChtimes          100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsMkdirAll         100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsSymlink          100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsCreate           100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsLstat            100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsOpen             100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsStat             100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Walk           100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/platform_darwin.go PlatformOptions         100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/platform_darwin.go SysAtimeMtime           100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/platform_darwin.go Path.SysUnmount         100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/process.go     cwd                 100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/process.go     ExecResult.OneLine      100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/process.go     ExecResult.Lines        100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/process.go     ExecResult.Slurp        100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/process.go     ExecResult.Success      100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/process.go     Exec                100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/process.go     ExecBashIn          100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/rule.go        IdRule.FileData         100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/rule.go        IdRule.DirData          100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/rule.go        FileConversion.real         100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/sfs.go         Sfs.Root            100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/sfs.go         Sfs.Unmount             100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/sys.go         TimespecToGoTime        100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/util.go        Println             100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/util.go        Printfln            100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/util.go        Sprintf             100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/process.go     GitWordDiff             100.00% (1/1)
github.com/suffuse/go-suffuse/suffuse/opts.go        optsFromArgs            93.33% (14/15)
github.com/suffuse/go-suffuse/suffuse/rule.go        FileConversion.MetaData     90.00% (9/10)
github.com/suffuse/go-suffuse/suffuse/node.go        DirChildren             90.00% (9/10)
github.com/suffuse/go-suffuse/suffuse/rule.go        FileCommand.FileData        90.00% (9/10)
github.com/suffuse/go-suffuse/suffuse/config.go      entriesToRules          87.50% (7/8)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Lookup           87.50% (7/8)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Readlink         85.71% (6/7)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.ReadAll          85.71% (6/7)
github.com/suffuse/go-suffuse/suffuse/rule.go        FileCommand.MetaData        83.33% (10/12)
github.com/suffuse/go-suffuse/suffuse/opts.go        configFromOpts          83.33% (5/6)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.ReadDirAll       83.33% (5/6)
github.com/suffuse/go-suffuse/suffuse/rule.go        FileConversion.FileData     83.33% (5/6)
github.com/suffuse/go-suffuse/suffuse/process.go     ExecIn              80.00% (8/10)
github.com/suffuse/go-suffuse/suffuse/suffuse.go     parseRules          80.00% (4/5)
github.com/suffuse/go-suffuse/suffuse/sfs.go         getFuseMountOptions         80.00% (4/5)
github.com/suffuse/go-suffuse/suffuse/config.go      CreateRules             80.00% (4/5)
github.com/suffuse/go-suffuse/suffuse/lines.go       @63:14              80.00% (4/5)
github.com/suffuse/go-suffuse/suffuse/rule.go        IdRule.LinkData         80.00% (4/5)
github.com/suffuse/go-suffuse/suffuse/sfs.go         NewSfs              76.92% (10/13)
github.com/suffuse/go-suffuse/suffuse/util.go        FindError           75.00% (3/4)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsStatAtimeMtime       75.00% (3/4)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Ino            75.00% (3/4)
github.com/suffuse/go-suffuse/suffuse/node.go        direntType          75.00% (3/4)
github.com/suffuse/go-suffuse/suffuse/idnode.go      setattrChtimes          71.43% (10/14)
github.com/suffuse/go-suffuse/suffuse/opts.go        CreateSfsConfig         71.43% (5/7)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.ReadDirnames       71.43% (5/7)
github.com/suffuse/go-suffuse/suffuse/util.go        maybeByteString         66.67% (2/3)
github.com/suffuse/go-suffuse/suffuse/idnode.go      setattrTruncate         66.67% (2/3)
github.com/suffuse/go-suffuse/suffuse/idnode.go      setattrChmod            66.67% (2/3)
github.com/suffuse/go-suffuse/suffuse/opts.go        validate            63.64% (7/11)
github.com/suffuse/go-suffuse/suffuse/sys.go         StatModeToGoMode        50.00% (7/14)
github.com/suffuse/go-suffuse/suffuse/sys.go         GoModeToDirentType      50.00% (5/10)
github.com/suffuse/go-suffuse/suffuse/opts.go        @92:24              50.00% (2/4)
github.com/suffuse/go-suffuse/suffuse/opts.go        @84:26              50.00% (2/4)
github.com/suffuse/go-suffuse/suffuse/util.go        MaybeLog            50.00% (1/2)
github.com/suffuse/go-suffuse/suffuse/util.go        MaybeFatal          50.00% (1/2)
github.com/suffuse/go-suffuse/suffuse/util.go        MaybePanic          50.00% (1/2)
github.com/suffuse/go-suffuse/suffuse/util.go        AssertEq            50.00% (1/2)
github.com/suffuse/go-suffuse/suffuse/idnode.go      setattrChown            40.00% (4/10)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Mkdir            0.00% (0/10)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Read             0.00% (0/8)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.ReadDirnodes       0.00% (0/7)
github.com/suffuse/go-suffuse/suffuse/node.go        HandleRead          0.00% (0/7)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Glob           0.00% (0/4)
github.com/suffuse/go-suffuse/suffuse/node.go        Path.ModePermBits       0.00% (0/4)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.SplitAround        0.00% (0/4)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Slurp          0.00% (0/4)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.FollowAll          0.00% (0/4)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Size           0.00% (0/4)
github.com/suffuse/go-suffuse/suffuse/json.go        readJsonFile            0.00% (0/4)
github.com/suffuse/go-suffuse/suffuse/sys.go         Path.SysStatfs          0.00% (0/3)
github.com/suffuse/go-suffuse/suffuse/opts.go        SfsConfigError.PrintUsage   0.00% (0/3)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.MaybePath          0.00% (0/3)
github.com/suffuse/go-suffuse/suffuse/sfs.go         @52:11              0.00% (0/2)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Split          0.00% (0/2)
github.com/suffuse/go-suffuse/suffuse/node.go        attrString          0.00% (0/2)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.Create           0.00% (0/2)
github.com/suffuse/go-suffuse/suffuse/opts.go        @37:14              0.00% (0/2)
github.com/suffuse/go-suffuse/suffuse/process.go     ExecBash            0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/idnode.go      IdNode.String           0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsRename           0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.FollowOnce         0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.IoReadFile         0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/log.go         logC                0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.IoReadDir          0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.WriteString        0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.WriteBytes         0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/log.go         logE                0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Slice          0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.IndexOfByte        0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsReadLink         0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsOpenFile         0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/opts.go        SfsConfigError.Error        0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsChown            0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/log.go         logW                0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsTruncate         0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsLchown           0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Name           0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Extension          0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsRemoveAll        0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Relative           0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Clean          0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsRemove           0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.Segments           0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsMkdir            0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.IsAbs          0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsLink             0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/path.go        Path.OsChmod            0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/rule.go        BaseRule.FileData       0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/rule.go        BaseRule.DirData        0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/rule.go        BaseRule.LinkData       0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/util.go        Printf              0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/util.go        Echoerr             0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/util.go        NewErr              0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse/sys.go         SysStatfsToFuseStatfs       0.00% (0/1)
github.com/suffuse/go-suffuse/suffuse            -------------------------   66.55% (366/550)
@EECOLOR
Copy link
Contributor

EECOLOR commented Jul 17, 2015

That's great! What do you think about the unused Path methods? They do not bother me that much although they are not used. I tend to think we should keep them around for future easiness.

@paulp
Copy link
Contributor Author

paulp commented Jul 17, 2015

The ones which are mechanical translations of go methods should mostly be kept around, especially as there's no way to avoid using them as soon as we write the corresponding FUSE method. I'm using code coverage diffs to delete more stuff and trim down my Inode pull request.

@EECOLOR
Copy link
Contributor

EECOLOR commented Jul 17, 2015

Ok great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants