Loading cc/cc.go +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ func init() { ctx.TopDown("tsan_deps", sanitizerDepsMutator(tsan)) ctx.BottomUp("tsan", sanitizerMutator(tsan)).Parallel() ctx.TopDown("sanitize_runtime_deps", sanitizerRuntimeDepsMutator) ctx.TopDown("sanitize_runtime_deps", sanitizerRuntimeDepsMutator).Parallel() ctx.BottomUp("sanitize_runtime", sanitizerRuntimeMutator).Parallel() ctx.BottomUp("coverage", coverageMutator).Parallel() Loading cc/sanitize.go +11 −2 Original line number Diff line number Diff line Loading @@ -705,8 +705,8 @@ func sanitizerRuntimeDepsMutator(mctx android.TopDownMutatorContext) { if !isSanitizableDependencyTag(mctx.OtherModuleDependencyTag(child)) { return false } if d, ok := child.(*Module); ok && d.static() && d.sanitize != nil { if d, ok := child.(*Module); ok && d.static() && d.sanitize != nil { if enableMinimalRuntime(d.sanitize) { // If a static dependency is built with the minimal runtime, // make sure we include the ubsan minimal runtime. Loading @@ -717,8 +717,17 @@ func sanitizerRuntimeDepsMutator(mctx android.TopDownMutatorContext) { // make sure we include the ubsan runtime. c.sanitize.Properties.UbsanRuntimeDep = true } if c.sanitize.Properties.MinimalRuntimeDep && c.sanitize.Properties.UbsanRuntimeDep { // both flags that this mutator might set are true, so don't bother recursing return false } return true } else { return false } }) } } Loading finder/finder_test.go +5 −5 Original line number Diff line number Diff line Loading @@ -891,8 +891,8 @@ func TestFileAdded(t *testing.T) { IncludeFiles: []string{"findme.txt"}, }, ) foundPaths := finder.FindNamedAt("/tmp", "findme.txt") filesystem.Clock.Tick() foundPaths := finder.FindNamedAt("/tmp", "findme.txt") finder.Shutdown() // check the response of the first finder assertSameResponse(t, foundPaths, []string{"/tmp/a/findme.txt"}) Loading Loading @@ -1522,8 +1522,8 @@ func TestUpdatingDbIffChanged(t *testing.T) { IncludeFiles: []string{"hi.txt"}, }, ) foundPaths := finder.FindAll() filesystem.Clock.Tick() foundPaths := finder.FindAll() finder.Shutdown() // check results assertSameResponse(t, foundPaths, []string{"/tmp/a/hi.txt"}) Loading Loading @@ -1583,8 +1583,8 @@ func TestDirectoryNotPermitted(t *testing.T) { IncludeFiles: []string{"hi.txt"}, }, ) foundPaths := finder.FindAll() filesystem.Clock.Tick() foundPaths := finder.FindAll() finder.Shutdown() allPaths := []string{"/tmp/hi.txt", "/tmp/a/hi.txt", "/tmp/a/a/hi.txt", "/tmp/b/hi.txt"} // check results Loading Loading @@ -1629,8 +1629,8 @@ func TestFileNotPermitted(t *testing.T) { IncludeFiles: []string{"hi.txt"}, }, ) foundPaths := finder.FindAll() filesystem.Clock.Tick() foundPaths := finder.FindAll() finder.Shutdown() // check results assertSameResponse(t, foundPaths, []string{"/tmp/hi.txt"}) Loading @@ -1650,8 +1650,8 @@ func TestCacheEntryPathUnexpectedError(t *testing.T) { IncludeFiles: []string{"hi.txt"}, }, ) foundPaths := finder.FindAll() filesystem.Clock.Tick() foundPaths := finder.FindAll() finder.Shutdown() // check results assertSameResponse(t, foundPaths, []string{"/tmp/a/hi.txt"}) Loading Loading
cc/cc.go +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ func init() { ctx.TopDown("tsan_deps", sanitizerDepsMutator(tsan)) ctx.BottomUp("tsan", sanitizerMutator(tsan)).Parallel() ctx.TopDown("sanitize_runtime_deps", sanitizerRuntimeDepsMutator) ctx.TopDown("sanitize_runtime_deps", sanitizerRuntimeDepsMutator).Parallel() ctx.BottomUp("sanitize_runtime", sanitizerRuntimeMutator).Parallel() ctx.BottomUp("coverage", coverageMutator).Parallel() Loading
cc/sanitize.go +11 −2 Original line number Diff line number Diff line Loading @@ -705,8 +705,8 @@ func sanitizerRuntimeDepsMutator(mctx android.TopDownMutatorContext) { if !isSanitizableDependencyTag(mctx.OtherModuleDependencyTag(child)) { return false } if d, ok := child.(*Module); ok && d.static() && d.sanitize != nil { if d, ok := child.(*Module); ok && d.static() && d.sanitize != nil { if enableMinimalRuntime(d.sanitize) { // If a static dependency is built with the minimal runtime, // make sure we include the ubsan minimal runtime. Loading @@ -717,8 +717,17 @@ func sanitizerRuntimeDepsMutator(mctx android.TopDownMutatorContext) { // make sure we include the ubsan runtime. c.sanitize.Properties.UbsanRuntimeDep = true } if c.sanitize.Properties.MinimalRuntimeDep && c.sanitize.Properties.UbsanRuntimeDep { // both flags that this mutator might set are true, so don't bother recursing return false } return true } else { return false } }) } } Loading
finder/finder_test.go +5 −5 Original line number Diff line number Diff line Loading @@ -891,8 +891,8 @@ func TestFileAdded(t *testing.T) { IncludeFiles: []string{"findme.txt"}, }, ) foundPaths := finder.FindNamedAt("/tmp", "findme.txt") filesystem.Clock.Tick() foundPaths := finder.FindNamedAt("/tmp", "findme.txt") finder.Shutdown() // check the response of the first finder assertSameResponse(t, foundPaths, []string{"/tmp/a/findme.txt"}) Loading Loading @@ -1522,8 +1522,8 @@ func TestUpdatingDbIffChanged(t *testing.T) { IncludeFiles: []string{"hi.txt"}, }, ) foundPaths := finder.FindAll() filesystem.Clock.Tick() foundPaths := finder.FindAll() finder.Shutdown() // check results assertSameResponse(t, foundPaths, []string{"/tmp/a/hi.txt"}) Loading Loading @@ -1583,8 +1583,8 @@ func TestDirectoryNotPermitted(t *testing.T) { IncludeFiles: []string{"hi.txt"}, }, ) foundPaths := finder.FindAll() filesystem.Clock.Tick() foundPaths := finder.FindAll() finder.Shutdown() allPaths := []string{"/tmp/hi.txt", "/tmp/a/hi.txt", "/tmp/a/a/hi.txt", "/tmp/b/hi.txt"} // check results Loading Loading @@ -1629,8 +1629,8 @@ func TestFileNotPermitted(t *testing.T) { IncludeFiles: []string{"hi.txt"}, }, ) foundPaths := finder.FindAll() filesystem.Clock.Tick() foundPaths := finder.FindAll() finder.Shutdown() // check results assertSameResponse(t, foundPaths, []string{"/tmp/hi.txt"}) Loading @@ -1650,8 +1650,8 @@ func TestCacheEntryPathUnexpectedError(t *testing.T) { IncludeFiles: []string{"hi.txt"}, }, ) foundPaths := finder.FindAll() filesystem.Clock.Tick() foundPaths := finder.FindAll() finder.Shutdown() // check results assertSameResponse(t, foundPaths, []string{"/tmp/a/hi.txt"}) Loading