aboutsummaryrefslogtreecommitdiffstats
path: root/executor/style_test.go
Commit message (Collapse)AuthorAgeFilesLines
* sys/syz-sysgen: generate possibly missing __NR/SYS definesAleksandr Nogikh2022-01-131-0/+1
| | | | | | | | | As the comiling machine may have a kernel version different from the tested one, not all definitions might be present. Generate sequences of ifndef in defs.h to avoid potential issues. Restrict __NR-related style checking rules to only checking common*.h files.
* executor: add an ifdef SYZ_* style checkAleksandr Nogikh2021-11-301-0/+8
| | | | | | SYZ_* constants are always defined and one must not check them via ifdef. Add a check to prevent such problems during development (inspired by the discussion in #2882).
* executor: check for single-line compound statementsDmitry Vyukov2021-10-011-2/+24
| | | | | | Historically the code base does not use single-line compound statements ({} around single-line blocks). But there are few precedents creeped into already. Add a check to keep the code base consistent.
* pkg/report: detect executor failuresDmitry Vyukov2021-02-211-1/+9
| | | | | | | | | | | | Currently all executor fail errors go into "lost connection" bucket. This is not very useful. First, there are different executor failures. Second, it's not possible to understand what failures happen how frequently. Third, there are not authentic lost connection. Create separate SYZFAIL: bugs for them. Update #573 Update #502 Update #318
* executor: check for \n in fail/exitf messagesDmitry Vyukov2020-09-281-0/+7
|
* executor: fix definition of __NR_io_uring_setupDmitry Vyukov2020-09-151-0/+18
| | | | | | | | | | Sone syzbot instances broke with: <stdin>: In function ‘syz_io_uring_setup’: <stdin>:476:33: error: ‘__NR_io_uring_setup’ undeclared (first use in this function) <stdin>:476:33: note: each undeclared identifier is reported only once for each function it appears in pkg/csource resolves #ifdef's at generation time.
* executor: warn about C89-style var declarationsDmitry Vyukov2020-08-141-5/+48
| | | | | | | | | | | | | | | | | We generally use the newer C99 var declarations combined with initialization because: - declarations are more local, reduced scope - fewer lines of code - less potential for using uninit vars and other bugs However, we have some relic code from times when we did not understand if we need to stick with C89 or not. Also some external contributions that don't follow style around. Add a static check for C89-style declarations and fix existing precedents. Akaros toolchain uses -std=gnu89 (or something) and does not allow variable declarations inside of for init statement. And we can't switch it to -std=c99 because Akaros headers are C89 themselves. So in common.h we need to declare loop counters outside of for.
* executor: fix style checking testDmitry Vyukov2020-08-131-3/+3
| | | | | The regexp for empty suppressions matches _everything_... Don't match suppression if it's empty.
* executor: add some code style checksDmitry Vyukov2020-08-061-0/+107
Move the test from pkg/csource to executor/ in order to be able to (1) run it on *.cc files, (2) run on unprocessed *.h files, (3) produce line numbers. Add a check for missed space after //.