aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-testbed
Commit message (Collapse)AuthorAgeFilesLines
* all: use any instead of interface{}Dmitry Vyukov2025-12-225-6/+6
| | | | Any is the preferred over interface{} now in Go.
* all: fix recvcheck errorsTaras Madan2025-02-074-34/+34
|
* all: replace Walk with WalkDir to reduce os.Lstat callsGofastasf2025-01-301-2/+3
| | | | | | | | filepath.Walk calls os.Lstat for every file or directory to retrieve os.FileInfo. filepath.WalkDir avoids unnecessary system calls since it provides a fs.DirEntry, which includes file type information without requiring a stat call. This improves performance by reducing redundant system calls.
* all: use min/max functionsDmitry Vyukov2025-01-171-4/+1
| | | | They are shorter, more readable, and don't require temp vars.
* all: fix HTML file formattingDmitry Vyukov2024-11-072-18/+18
| | | | Fix inconsistent HTML file formatting with both tabs and spaces.
* pkg/manager: factor out the crash storage functionalityAleksandr Nogikh2024-10-111-25/+7
| | | | | | It reduces the size of the syz-manager/ code and makes it testable. Use it in syz-testbed.
* pkg/stat: rename package name to singular formDmitry Vyukov2024-07-243-3/+3
| | | | | | | | Go package names should generally be singular form: https://go.dev/blog/package-names https://rakyll.org/style-packages https://groups.google.com/g/golang-nuts/c/buBwLar1gNw
* pkg/stats: split out pkg/stats/sampleAleksandr Nogikh2024-06-143-21/+21
| | | | | This will reduce the number of dependencies needed for the main syzkaller tools.
* syz-manager: add corpus triage modeDmitry Vyukov2024-06-033-10/+19
| | | | | | | | Add corpus triage mode and support it in testbed. This is useful to benchmark just the triage phase w/o any subsequent fuzzing. First, fuzzing is more random. Second, if triage duration is different in different versions, then they will do different amount of fuzzing in fixed testbed time.
* tools/syz-testbed: allow to view unaligned recordsDmitry Vyukov2024-06-032-4/+23
| | | | | This is useful if instances run for different amount of time. It's hard to make any sense out of aligned records in that case.
* tools/syz-testbed: add default value for benchcmpDmitry Vyukov2024-06-031-3/+6
| | | | In case it's installed.
* tools/syz-testbed: remove unused variableDmitry Vyukov2024-06-031-4/+0
|
* tools/syz-testbed: limit the number of graph data pointsAleksandr Nogikh2024-04-291-1/+13
| | | | | In long runs, it can be thousands of points for every single graph that we render. It's much more than is actually needed.
* tools/syz-testbed: fix html table columnsAleksandr Nogikh2024-03-211-14/+4
| | | | | | | | If the column value is not present, but compute relative value changes, we still need to add two cells. Also, there's no need in the PrintValue template -- the String() method does the same computation.
* tools/syz-testbed: fix relative value change computationAleksandr Nogikh2024-03-212-1/+28
| | | | | It's perfectly normal for a column value not to be present -- e.g. when we compare syzkaller branches that don't use the same statistics.
* all: use special placeholder for errorsTaras Madan2023-07-245-12/+12
|
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-234-10/+6
|
* tools/syz-testbed: consider the resulting bug titlesAleksandr Nogikh2022-11-252-4/+21
| | | | | | | | It's more correct to evaluate whether we managed to reproduce the original bug rather than just any bug. Retrieve the title information from syz-repro and pretent that the reproduction failed if the title does not match.
* pkg/html: move some functions to sub-packageDmitry Vyukov2022-05-231-2/+2
| | | | | Move functions that need embed assets to a separate package. In preparation for the next change.
* tools/syz-testbed: accept syzkaller workdir as crash log sourceAleksandr Nogikh2022-02-253-12/+90
|
* tools/syz-testbed: support experiments with syz-reproAleksandr Nogikh2022-02-256-7/+359
| | | | | | | Add a "syz-repro" target and 3 tables: - List of all performed (and ongoing) reproductions. - Comparison of repro rate for different bugs on different checkouts. - Comparison of the share of C reproducers.
* tools/syz-testbed: support multiple targetsAleksandr Nogikh2022-02-256-173/+312
| | | | | | | | | | | | | | | Refactor the code of syz-testbed to enable support of different targets. This required the following changes: - Instead of doing mass start and mass restart of instances, let them be more independent. - Support different types of instances, which may have different expectations of the target behavior. E.g. syz-manager normally never exits, while syz-repro is expected to exit after a certain time. - Factor out stats management, as stat entries may be different for different targets. - Introduce locking to TestbedCtx and Checkout, as slices there can be modified at arbitrary times.
* tools/syz-testbed: store html templates in filesAleksandr Nogikh2022-02-253-151/+151
|
* tools/syz-testbed: add table footersAleksandr Nogikh2022-02-252-7/+80
|
* tools/syz-testbed: introduce BoolCell cell typeAleksandr Nogikh2022-02-252-1/+18
|
* tools/syz-testbed: add a special cell type for ratiosAleksandr Nogikh2022-02-251-0/+13
|
* tools/syz-testbed: do Start()/Wait() instead of Run()Aleksandr Nogikh2022-02-251-1/+2
| | | | | | Otherwise there's a risk that the instance is stopped before Run() has had a chance to be executed. This leads to a panic while doing cmd.Signal().
* tools/syz-testbed: don't parse configsAleksandr Nogikh2022-02-253-19/+18
| | | | | | | | | | It's not practical to parse configs from tools/syz-testbed because it limits the tool to using only those configuration options, which are supported by the syzkaller version at the moment of tools/syz-testbed compilation. Operate with manager configs as if they were just some JSON objects. Introduce a PatchJSON method to update their fields in a convenient way.
* tools/syz-testbed: refactor uiTableTypeAleksandr Nogikh2022-02-251-36/+50
| | | | Make it easier to do uiTableType filtering later.
* tools/syz-testbed: make Instance.Stop() nonblockingAleksandr Nogikh2022-02-251-1/+4
|
* tools/syz-testbed: add a bug count tableAleksandr Nogikh2021-12-062-6/+42
| | | | | This table does not just collect YES/NO, but also shows the number of test runs in which syz-manager has discovered the given bug.
* tools/syz-testbed: add switching between tables to the web interfaceAleksandr Nogikh2021-12-061-47/+96
| | | | | | | | | Formalise HTML table management - introduce the map, which lists the available stat tables and their generators. Render only one page at a time and let the user switch them. Implement the generation of the bug table.
* tools/syz-testbed: respond 404 to favicon requestsAleksandr Nogikh2021-12-061-0/+5
| | | | | | Otherwise the page is requested two times by Chrome. See https://bugs.chromium.org/p/chromium/issues/detail?id=39402
* tools/syz-testbed: align table per particular rowsAleksandr Nogikh2021-12-062-9/+61
| | | | | | | | | | It turns out that we often want to see the data aligned on some specific property - e.g. align all checkouts by "exec total" and see how other parameters differ. Add a preliminary support of such a feature. On a row title click, pick the minimal value in the row and wind the history of each column back until the target row value is closest to the minimal one.
* tools/syz-testbed: show diffs and p-valuesAleksandr Nogikh2021-12-062-24/+131
| | | | | | | | | | Enable the user to specify the pivot column for the stats table. If such a column is set, calculate and print the relative difference between checkouts and p-values for the estimation of statistical significance of the experimental data. For the p-value calculation use the existing implementation from the go-benchstat tool.
* tools/syz-testbed: show one stat view at a timeAleksandr Nogikh2021-12-063-47/+109
| | | | | In the HTML form, show only one stat view at a time. Let user switch between the views.
* tools/syz-testbed: introduce a special type for tableAleksandr Nogikh2021-12-064-63/+150
| | | | | This simplifies table generation and will let us more easily implement relative difference and p-value calculation and printing.
* tools/syz-testbed: use median instead of meanAleksandr Nogikh2021-12-061-36/+61
| | | | | | | Data generated in experiments indicates that the distribution for most (all?) syzkaller parameters is not perfectly normal - it is skewed and there are many outliers. Median seems like a more adequate statistic in this case.
* tools/syz-testbed: support per-checkout syz-manager configsAleksandr Nogikh2021-11-193-25/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Let the user of the tool specify individual syz-manager configs for checkouts. A base config is specified as previously and then individual parts of jsons are applied to that base config, e.g. <...> "checkouts": [ { "name": "first", "repo": "https://github.com/google/syzkaller.git", }, { "name": "second", "repo": "https://github.com/google/syzkaller.git", "manager_config": { "kernel_obj": "/tmp/linux-stable2" } } ], "manager_config": { "target": "linux/amd64", "kernel_obj": "/tmp/linux-stable", <...> } <...>
* tools/syz-testbed: align checkout stats to the same timeAleksandr Nogikh2021-11-121-6/+16
| | | | | | | | | | If `max_instances` is smaller than the total number of checkouts in the testbed configuration file, the averaged per checkout statistics was inconsistend with respect to the point in time. Checkouts with running instances were winded back to the current uptime, while others used to show the complete data. Fix that inconsistency.
* tools/syz-testbed: add a simple web interfaceAleksandr Nogikh2021-11-123-10/+221
| | | | For now, just display the avg stats and generate graphs on demand.
* tools/syz-testbed: produce results indefinitelyAleksandr Nogikh2021-11-124-221/+478
| | | | | | | | | | | | | | | | | | Creation of instances only at the start of the tool limits the scale of the experiments. Instead of setting up instances at the beginning, create, start and stop them dynamically. This allows to conduct much larger experiments while keeping the maximal resource consuption under control. When an instance has been executing for the specified time, it is stopped and replaced by another one. Introduce two new parameters: - max_instances - the maximal number of simultaneously running instances. - run_hours - the lifetime (in hours) of a single instance. The longer the tool runs, the more test results will be accumulated for each checkout specified in the configuration file.
* docs: describe syz-testbedAleksandr Nogikh2021-10-201-0/+1
|
* tools/syz-testbed: do not send SIGKILL to syz-managersAleksandr Nogikh2021-10-201-3/+1
| | | | | Doing so can result in syz-manager leaking GCE instances. Set PDEATHSIG to SIGTERM instead, so that syz-manager has a change to exit gracefully.
* tools: introduce the syz-testbed toolAleksandr Nogikh2021-10-202-0/+517
The tool automates check-out, compilation, config generation and a simultaneous startup of a number of syz-manager instances. Also, it can collect and output the combined statistics from these managers in order to simplify further analysis of the results.