diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-11-11 14:36:02 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-11-11 15:52:41 +0000 |
| commit | 75bb1b32609dc8e20e442a992f648e465c66cdf3 (patch) | |
| tree | 1c75ebd221e0c8340233fbfcbc043e3cab79e256 | |
| parent | 1c02d27c7282177961e3d317bb677cbe5e33ae42 (diff) | |
tools/syz-reprolist: rename tool to syz-db-export
| -rw-r--r-- | dashboard/app/batch_main.go | 2 | ||||
| -rw-r--r-- | dashboard/app/batch_reproexport.go | 8 | ||||
| -rw-r--r-- | dashboard/app/cron.yaml | 2 | ||||
| -rw-r--r-- | tools/syz-db-export/README.md (renamed from tools/syz-reprolist/README.md) | 12 | ||||
| -rw-r--r-- | tools/syz-db-export/reprolist.go (renamed from tools/syz-reprolist/reprolist.go) | 2 |
5 files changed, 13 insertions, 13 deletions
diff --git a/dashboard/app/batch_main.go b/dashboard/app/batch_main.go index acf37ee8f..e1b514a26 100644 --- a/dashboard/app/batch_main.go +++ b/dashboard/app/batch_main.go @@ -17,7 +17,7 @@ import ( func initBatchProcessors() { http.HandleFunc("/cron/batch_coverage", handleBatchCoverage) - http.HandleFunc("/cron/batch_reproexport", handleBatchReproExport) + http.HandleFunc("/cron/batch_db_export", handleBatchDBExport) } // from https://cloud.google.com/batch/docs/samples/batch-create-script-job diff --git a/dashboard/app/batch_reproexport.go b/dashboard/app/batch_reproexport.go index 05e366544..b0361379f 100644 --- a/dashboard/app/batch_reproexport.go +++ b/dashboard/app/batch_reproexport.go @@ -13,7 +13,7 @@ import ( const exportTimeoutSeconds = 60 * 60 * 6 -func handleBatchReproExport(w http.ResponseWriter, r *http.Request) { +func handleBatchDBExport(w http.ResponseWriter, r *http.Request) { ctx := appengine.NewContext(r) for ns, nsConfig := range getConfig(ctx).Namespaces { if nsConfig.ReproExportPath == "" { @@ -23,19 +23,19 @@ func handleBatchReproExport(w http.ResponseWriter, r *http.Request) { Scopes: []string{"https://www.googleapis.com/auth/userinfo.email"}, } if err := createScriptJob(ctx, "syzkaller", "export-repro", - exportReproScript(ns, nsConfig.ReproExportPath), exportTimeoutSeconds, serviceAccount); err != nil { + exportDBScript(ns, nsConfig.ReproExportPath), exportTimeoutSeconds, serviceAccount); err != nil { log.Errorf(ctx, "createScriptJob: %s", err.Error()) } } } -func exportReproScript(srcNamespace, archivePath string) string { +func exportDBScript(srcNamespace, archivePath string) string { return "\n" + "git clone -q --depth 1 --branch master --single-branch https://github.com/google/syzkaller\n" + "cd syzkaller\n" + "token=$(gcloud auth print-access-token)\n" + "CI=1 ./tools/syz-env \"" + // CI=1 to suppress "The input device is not a TTY". - "go run ./tools/syz-reprolist/... -namespace " + srcNamespace + " -output export -token $token -j 10 && " + + "go run ./tools/syz-db-export/... -namespace " + srcNamespace + " -output export -token $token -j 10 && " + "tar -czf export.tar.gz ./export/ && " + "gsutil -q -m cp export.tar.gz " + archivePath + "\"" diff --git a/dashboard/app/cron.yaml b/dashboard/app/cron.yaml index 1bb7717bc..a0acdf7d2 100644 --- a/dashboard/app/cron.yaml +++ b/dashboard/app/cron.yaml @@ -26,5 +26,5 @@ cron: - url: /cron/batch_coverage?days=true&months=true&steps=10 schedule: every 24 hours # Export reproducers every week. -- url: /cron/batch_reproexport +- url: /cron/batch_db_export schedule: every saturday 00:00 diff --git a/tools/syz-reprolist/README.md b/tools/syz-db-export/README.md index ecaa09d2c..47b3248c9 100644 --- a/tools/syz-reprolist/README.md +++ b/tools/syz-db-export/README.md @@ -1,18 +1,18 @@ # Syzbot DB export -Every week syzbot runs syz-reprolist to export its databases: +Every week syzbot runs syz-db-export to export its databases: 1. [Upstream Linux](https://syzkaller.appspot.com/upstream) db is [here](https://storage.googleapis.com/artifacts.syzkaller.appspot.com/shared-files/repro-export/upstream.tar.gz). 2. Contact us if you want see others. ## Export structure DB currently includes: -1. First C-Reproducer for every bug. +1. Bugs descriptions. +2. First C-Reproducer for every bug. It doesn't include: 1. Second+ C-Reproducers for every bug. 2. Syz-Reproducers. -3. Bugs description itself. -4. Any reproducer related metadata (like triggering requirements). +3. Any reproducer related metadata (like triggering requirements). ## How to export more data @@ -20,6 +20,6 @@ The best way to see more data exported is to modify the tool and send us PR with To reproduce locally what syzbot is doing for upstream Linux: ```golang -go run ./tools/syz-reprolist/... -namespace upstream +go run ./tools/syz-db-export/... -namespace upstream ``` -Extending tools/syz-reprolist you can teach syzbot to export more. +Extending tools/syz-db-export you can teach syzbot to export more. diff --git a/tools/syz-reprolist/reprolist.go b/tools/syz-db-export/reprolist.go index ca90536ba..24a548423 100644 --- a/tools/syz-reprolist/reprolist.go +++ b/tools/syz-db-export/reprolist.go @@ -22,7 +22,7 @@ var ( flagOutputDir = flag.String("output", "export", "output dir") flagNamespace = flag.String("namespace", "upstream", "target namespace") flagToken = flag.String("token", "", "gcp bearer token to disable throttling (contact syzbot first)\n"+ - "usage example: ./tools/syz-bot-export -namespace upstream -token $(gcloud auth print-access-token)") + "usage example: ./tools/syz-db-export -namespace upstream -token $(gcloud auth print-access-token)") flagParallel = flag.Int("j", 2, "number of parallel threads") flagVerbose = flag.Bool("v", false, "verbose output") ) |
