Skip to content

Commit a04c89a

Browse files
authored
Revert "Prepare for pr" (google#6)
1 parent 65b09a0 commit a04c89a

File tree

557 files changed

+18682
-37963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

557 files changed

+18682
-37963
lines changed

.github/workflows/gemini-pr-review.yml

Lines changed: 0 additions & 477 deletions
This file was deleted.

CONTRIBUTORS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,5 @@ Rivos Inc.
142142
Jeongjun Park
143143
Nikita Zhandarovich
144144
Jiacheng Xu
145-
Kuzey Arda Bulut
146145
Daniel Bransky
147146
Matan Kalina

Makefile

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ ifeq ("$(TARGETOS)", "trusty")
104104
endif
105105

106106
.PHONY: all clean host target \
107-
manager executor kfuzztest ci hub \
107+
manager executor ci hub \
108108
execprog mutate prog2c trace2syz repro upgrade db \
109109
usbgen symbolize cover kconf syz-build crush \
110110
bin/syz-extract bin/syz-fmt \
@@ -118,7 +118,7 @@ endif
118118

119119
all: host target
120120
host: manager repro mutate prog2c db upgrade
121-
target: execprog executor check_syzos
121+
target: execprog executor
122122

123123
executor: descriptions
124124
ifeq ($(TARGETOS),fuchsia)
@@ -217,14 +217,6 @@ syz-build:
217217
bisect: descriptions
218218
GOOS=$(HOSTOS) GOARCH=$(HOSTARCH) $(HOSTGO) build $(GOHOSTFLAGS) -o ./bin/syz-bisect github.com/google/syzkaller/tools/syz-bisect
219219

220-
ifeq ($(HOSTOS), linux)
221-
kfuzztest: descriptions
222-
GOOS=$(HOSTOS) GOARCH=$(HOSTARCH) $(HOSTGO) build $(GOHOSTFLAGS) -o ./bin/syz-kfuzztest github.com/google/syzkaller/syz-kfuzztest
223-
else
224-
kfuzztest:
225-
@echo "Skipping kfuzztest build (it's Linux-only)"
226-
endif
227-
228220
verifier: descriptions
229221
GOOS=$(HOSTOS) GOARCH=$(HOSTARCH) $(HOSTGO) build $(GOHOSTFLAGS) -o ./bin/syz-verifier github.com/google/syzkaller/syz-verifier
230222

@@ -271,9 +263,7 @@ format_cpp:
271263
clang-format --style=file -i executor/*.cc executor/*.h \
272264
executor/android/android_seccomp.h \
273265
tools/kcovtrace/*.c tools/kcovfuzzer/*.c tools/fops_probe/*.cc \
274-
tools/clang/*.h \
275-
tools/clang/declextract/*.h tools/clang/declextract/*.cpp \
276-
tools/clang/codesearch/*.h tools/clang/codesearch/*.cpp
266+
tools/syz-declextract/clangtool/*.cpp tools/syz-declextract/clangtool/*.h
277267

278268
format_sys: bin/syz-fmt
279269
bin/syz-fmt all
@@ -282,7 +272,7 @@ bin/syz-fmt:
282272
$(HOSTGO) build $(GOHOSTFLAGS) -o $@ ./tools/syz-fmt
283273

284274
configs: kconf
285-
bin/syz-kconf -config dashboard/config/linux/main.yml -sourcedir $(SOURCEDIR) -instance=$(INSTANCE)
275+
bin/syz-kconf -config dashboard/config/linux/main.yml -sourcedir $(SOURCEDIR)
286276

287277
tidy: descriptions
288278
clang-tidy -quiet -header-filter=executor/[^_].* -warnings-as-errors=* \
@@ -294,7 +284,7 @@ tidy: descriptions
294284
executor/*.cc
295285

296286
lint:
297-
CGO_ENABLED=1 $(HOSTGO) install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.2
287+
CGO_ENABLED=1 $(HOSTGO) install github.com/golangci/golangci-lint/v2/cmd/golangci-lint
298288
CGO_ENABLED=1 $(HOSTGO) build -buildmode=plugin -o bin/syz-linter.so ./tools/syz-linter
299289
bin/golangci-lint run ./...
300290

@@ -436,9 +426,6 @@ check_links:
436426
check_html:
437427
./tools/check-html.sh
438428

439-
check_syzos: executor
440-
./tools/check-syzos.sh 2>/dev/null
441-
442429
# Check that the diff is empty. This is meant to be executed after generating
443430
# and formatting the code to make sure that everything is committed.
444431
check_diff:

dashboard/app/config.go

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
package main
55

66
import (
7+
"bytes"
78
"context"
89
"encoding/json"
910
"fmt"
1011
"net/mail"
11-
"net/url"
1212
"regexp"
1313
"strings"
1414
"time"
@@ -366,10 +366,12 @@ type CCConfig struct {
366366
type KcidbConfig struct {
367367
// Origin is how this system identified in Kcidb, e.g. "syzbot_foobar".
368368
Origin string
369-
// RestURI is the REST API endpoint to which the Kcidb client will send data.
370-
RestURI string
371-
// Token is the authorization token to use for the Kcidb client.
372-
Token string
369+
// Project is Kcidb GCE project name, e.g. "kernelci-production".
370+
Project string
371+
// Topic is pubsub topic to publish messages to, e.g. "playground_kernelci_new".
372+
Topic string
373+
// Credentials is Google application credentials file contents to use for authorization.
374+
Credentials []byte
373375
}
374376

375377
// ThrottleConfig determines how many requests a single client can make in a period of time.
@@ -811,15 +813,14 @@ func checkKcidb(ns string, kcidb *KcidbConfig) {
811813
if !regexp.MustCompile("^[a-z0-9_]+$").MatchString(kcidb.Origin) {
812814
panic(fmt.Sprintf("%v: bad Kcidb origin %q", ns, kcidb.Origin))
813815
}
814-
if kcidb.RestURI == "" {
815-
panic(fmt.Sprintf("%v: empty Kcidb RestURI", ns))
816+
if kcidb.Project == "" {
817+
panic(fmt.Sprintf("%v: empty Kcidb project", ns))
816818
}
817-
// Validate RestURI must be a valid URL.
818-
if _, err := url.ParseRequestURI(kcidb.RestURI); err != nil {
819-
panic(fmt.Sprintf("%v: invalid Kcidb RestURI %q: %v", ns, kcidb.RestURI, err))
819+
if kcidb.Topic == "" {
820+
panic(fmt.Sprintf("%v: empty Kcidb topic", ns))
820821
}
821-
if kcidb.Token == "" || len(kcidb.Token) < 8 {
822-
panic(fmt.Sprintf("%v: bad Kcidb token %q", ns, kcidb.Token))
822+
if !bytes.Contains(kcidb.Credentials, []byte("private_key")) {
823+
panic(fmt.Sprintf("%v: empty Kcidb credentials", ns))
823824
}
824825
}
825826

dashboard/app/jobs_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,13 @@ func TestJob(t *testing.T) {
6666
c.incomingEmail(sender, "#syz test: repo",
6767
EmailOptFrom("test@requester.com"), EmailOptSubject("my-subject"), EmailOptCC([]string{mailingList}))
6868
msg := c.pollEmailBug()
69-
70-
c.expectEQ(strings.Contains(msg.Body, replyMalformedSyzTest), true)
69+
c.expectEQ(strings.Contains(msg.Body, "want either no args or 2 args"), true)
7170
c.expectEQ(msg.Subject, "Re: my-subject")
7271

7372
c.incomingEmail(sender, "#syz test: repo branch commit",
7473
EmailOptFrom("test@requester.com"), EmailOptSubject("Re: my-subject"), EmailOptCC([]string{mailingList}))
7574
msg = c.pollEmailBug()
76-
c.expectEQ(strings.Contains(msg.Body, replyMalformedSyzTest), true)
75+
c.expectEQ(strings.Contains(msg.Body, "want either no args or 2 args"), true)
7776
c.expectEQ(msg.Subject, "Re: my-subject")
7877

7978
c.incomingEmail(sender, "#syz test: repo branch",

dashboard/app/kcidb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func handleKcidbPoll(w http.ResponseWriter, r *http.Request) {
3232
}
3333

3434
func handleKcidbNamespce(c context.Context, ns string, cfg *KcidbConfig) error {
35-
client, err := kcidb.NewClient(c, cfg.Origin, cfg.RestURI, cfg.Token)
35+
client, err := kcidb.NewClient(c, cfg.Origin, cfg.Project, cfg.Topic, cfg.Credentials)
3636
if err != nil {
3737
return err
3838
}

dashboard/app/reporting_email.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ const (
7474
"The email is sent to %[1]v address\n" +
7575
"but the HASH does not correspond to any known bug.\n" +
7676
"Please double check the address."
77-
replyMalformedSyzTest = "I've failed to parse your command.\n" +
78-
"Did you perhaps forget to provide the branch name, or added an extra ':'?\n" +
79-
"Please use one of the two supported formats:\n" +
80-
"1. #syz test\n" +
81-
"2. #syz test: repo branch-or-commit-hash\n" +
82-
"Note the lack of ':' in option 1."
8377
)
8478

8579
var mailingLists map[string]bool
@@ -187,7 +181,7 @@ func sendNsCoverageReport(ctx context.Context, ns, email string,
187181
coveragePageLink(ns, period[1].Type, period[1].DateTo.String(), minDrop, 2, true)),
188182
Table: table,
189183
}
190-
title := fmt.Sprintf("%s coverage regression in %s", ns, periodTo)
184+
title := fmt.Sprintf("%s coverage regression (%s)->(%s)", ns, periodFrom, periodTo)
191185
err = sendMailTemplate(ctx, &mailSendParams{
192186
templateName: "mail_ns_coverage.txt",
193187
templateArg: args,
@@ -903,7 +897,7 @@ func handleTestCommand(c context.Context, info *bugInfoResult,
903897
msg *email.Email, command *email.SingleCommand) string {
904898
args := strings.Fields(command.Args)
905899
if len(args) != 0 && len(args) != 2 {
906-
return replyMalformedSyzTest
900+
return fmt.Sprintf("want either no args or 2 args (repo, branch), got %v", len(args))
907901
}
908902
repo, branch := "", ""
909903
if len(args) == 2 {

dashboard/app/reporting_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ func TestCoverageRegression(t *testing.T) {
14061406
assert.Equal(t, 1, len(c.emailSink))
14071407
msg := <-c.emailSink
14081408
assert.Equal(t, []string{"test@test.test"}, msg.To)
1409-
assert.Equal(t, "coverage-tests coverage regression in December 1999", msg.Subject)
1409+
assert.Equal(t, "coverage-tests coverage regression (November 1999)->(December 1999)", msg.Subject)
14101410
wantLink := "https://testapp.appspot.com/coverage-tests/coverage?" +
14111411
"dateto=1999-12-31&min-cover-lines-drop=1&order-by-cover-lines-drop=1&period=month&period_count=2"
14121412
assert.Equal(t, `Regressions happened in 'coverage-tests' from November 1999 (30 days) to December 1999 (31 days).

dashboard/app/templates/templates.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ <h1>{{.Caption}}:</h1>
631631
<td class="stat">{{link $item.KernelCommitLink (formatTagHash $item.KernelCommit)}}</td>
632632
<td>
633633
{{if $item.ReproCLink}}<a href="{{$item.ReproCLink}}">C</a>
634-
{{else if $item.ReproSyzLink}}<a href="{{$item.ReproSyzLink}}">syz</a>{{end}}
634+
{{else if $item.ReproSyzLink}}<a href="{{$item.ReproSyzLink}}">C</a>{{end}}
635635
</td>
636636
{{if ne $item.CrashTitle ""}}
637637
<td class="status-crashed">

dashboard/app/util_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ func NewCtx(t *testing.T) *Ctx {
6363
}
6464
t.Parallel()
6565
inst, err := aetest.NewInstance(&aetest.Options{
66-
StartupTimeout: 120 * time.Second,
6766
// Without this option datastore queries return data with slight delay,
6867
// which fails reporting tests.
6968
StronglyConsistentDatastore: true,

0 commit comments

Comments
 (0)