aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/db/db_test.go
Commit message (Collapse)AuthorAgeFilesLines
* syz-manager: don't keep corpus in memoryDmitry Vyukov2024-07-101-0/+59
| | | | | | | | Add DB mode when it does not keep records in memory, instead it re-reads them from disk on compaction. On my instance this saves 466MB (14.3%) of heap, which reduces RSS by 900MB (2x due to GC).
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-231-4/+3
|
* pkg/db: make repair of the db file optionalDmitry Vyukov2022-02-011-10/+10
| | | | | | | | | | | It was too radical to repair and overwrite db file unconditionally. syz-execprog probes if a given file is a database. Usually it's a crash log or a single program, but db.Open started to overwrite it. And an explicit repair flag in db.Open and enable it only in syz-manager and syz-hub. Fixes #2997
* pkg/db: fix test under rootDmitry Vyukov2022-01-241-0/+3
| | | | | Opening inaccessible file won't fail under root. Skip the test.
* pkg/db: treat deserialization errors as softDmitry Vyukov2022-01-241-1/+54
| | | | | | | | corpus.db may get corrupted on an unexpected reset, etc. Commit a254b0f5 ("pkg/db: properly handle errors when loading a DB") made these errors fatal and manager never recovers on its own. Restore the previous behavior when we still recovered some records from the db. But (1) ensure that the file is at least writable and (2) add tests.
* pkg/db: properly handle errors when loading a DBDmitry Vyukov2021-12-091-0/+17
| | | | Properly return errors to caller instead of logging them.
* pkg/osutil: introduce TempFile helperDmitry Vyukov2018-05-141-5/+5
| | | | Introduce TempFile helper and use it in several packages.
* pkg/db: remove code duplication in testDmitry Vyukov2018-05-061-55/+31
| | | | Update #538
* pkg/db: move from dbDmitry Vyukov2017-06-031-0/+151