gtramontina / ooze Goto Github PK
View Code? Open in Web Editor NEW🧬 Go Mutation Testing
License: MIT License
🧬 Go Mutation Testing
License: MIT License
Output shows, that the virus arithmetic.New()
has been applied to a string concatenation, which causes a build failure.
internal/service/routing.go:168:9: invalid operation: operator - not defined on "/" (constant of type string)
This was the code:
func HealthPath() string {
return "/" + path.Join(BasePathInternalCases(), "health")
}
I am assuming this is not intended behaviour.
After introducing #5, running mutation tests against Ooze itself (and I think it is safe to assume that other projects too) fails with the following (or similar) error:
https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:26
Error: panic: failed type checking for file 'internal/cmdtestrunner/cmdtestrunner.go': internal/cmdtestrunner/cmdtestrunner.go:7:2: could not import github.com/gtramontina/ooze/internal/ooze (can't find import: "github.com/gtramontina/ooze/internal/ooze")
goroutine 6 [running]:
testing.tRunner.func1.2({0x6ef2c0, 0xc000202d20})
/opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1389 +0x[24](https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:25)e
testing.tRunner.func1()
/opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1392 +0x39f
panic({0x6ef2c0, 0xc000202d20})
/opt/hostedtoolcache/go/1.18.10/x64/src/runtime/panic.go:838 +0x207
github.com/gtramontina/ooze/internal/gosourcefile.(*GoSourceFile).Incubate(0xc000124bd0, {0x7ab3e0?, 0xc000010078})
/home/runner/work/ooze/ooze/internal/gosourcefile/gosourcefile.go:46 +0x453
github.com/gtramontina/ooze/internal/ooze.(*Ooze).Release(0xc0001dfe50, {0x95f6e0, 0xe, 0xc0000b7e30?})
/home/runner/work/ooze/ooze/internal/ooze/ooze.go:83 +0x2[25](https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:26)
github.com/gtramontina/ooze.Release(0xc000097860, {0xc0000b7f[30](https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:31), 0x6, 0x3a?})
/home/runner/work/ooze/ooze/release.go:138 +0xa3a
github.com/gtramontina/ooze_test.TestMutation(0x0?)
/home/runner/work/ooze/ooze/ooze_mutation_test.go:12 +0xeb
testing.tRunner(0xc000097860, 0x75a558)
/opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
/opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1486 +0x[35](https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:36)f
There are calls to syscall.Umask
, which isn't supported on Windows. That test could be moved to a !windows only file.
Title says it all. Which would be the preferred approach? Personally I'd even opt for both.
I'd potentially make a PR for this.
I am not sure if this is a problem on our end but when running the tests with mutations after some time (usually around 10 mins) we get these types of errors:
goroutine 651 [chan send, 4 minutes]:
github.com/gtramontina/ooze/internal/future.(*DeferredFuture[...]).Resolve.func1.1()
/Users/vardex/go/pkg/mod/github.com/gtramontina/[email protected]/internal/future/deferred.go:28 +0x2c
created by github.com/gtramontina/ooze/internal/future.(*DeferredFuture[...]).Resolve.func1
/Users/vardex/go/pkg/mod/github.com/gtramontina/[email protected]/internal/future/deferred.go:27 +0xb8
...
goroutine 1157 [chan send]:
github.com/gtramontina/ooze/internal/future.(*DeferredFuture[...]).Resolve.func1.1()
/Users/vardex/go/pkg/mod/github.com/gtramontina/[email protected]/internal/future/deferred.go:28 +0x2c
created by github.com/gtramontina/ooze/internal/future.(*DeferredFuture[...]).Resolve.func1
/Users/vardex/go/pkg/mod/github.com/gtramontina/[email protected]/internal/future/deferred.go:27 +0xb8
The mutations test eventually fails
exit status 2
FAIL <repository/package> 600.244s
Our tests (without mutations) run perfectly fine
Go version
go version go1.20.3 darwin/arm64
Reproduce:
git clone git@github.com:Bios-Marcel/ooze_deadlock.git
cd ooze_deadlock
go test -v -tags=mutation ./mutation
Calls to os.Symlink
can error on windows, due to lack of "certain permissions". Can we just replace this with hardlinking? If so, only for Windows, or for all systems?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.