-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fuzz testing local step and CI integration #1768
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, next step would be running against a populated graph and increasing the chances of generating a query which will pass query validations.
.circleci/config.yml
Outdated
- run: | ||
name: Run 30-second fuzz test | ||
command: | | ||
make fuzz # Run the fuzz tester |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests/requirements.txt
Outdated
@@ -3,3 +3,4 @@ redisgraph>=1.5 | |||
redisgraph-bulk-loader | |||
click>=6.7 | |||
behave>=1.2 | |||
git+https://github.com/jeffreylovitz/grammarinator.git@master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than rely on master pin to the hash.
tests/fuzz/process.py
Outdated
start = time() | ||
while time() - start < timeout: | ||
# Capture generated queries | ||
query = subprocess.check_output(cmd, env=env, shell=True, encoding="utf8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catch and handle the CalledProcessError if check_output fails?
tests/fuzz/process.py
Outdated
|
||
|
||
def issue_queries(graph, timeout): | ||
working_dir = os.path.dirname(os.path.abspath(__file__)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: wrap abspath around dirname instead of dirname around abspath since dirname just removes the last segment of the path. It's more stable on symlinked directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, small comments only!
b0c4c41
to
f903f9d
Compare
@jeffreylovitz please look into CI |
bcfc6e6
to
78b7f37
Compare
Codecov Report
@@ Coverage Diff @@
## master #1768 +/- ##
=========================================
Coverage ? 85.86%
=========================================
Files ? 230
Lines ? 21011
Branches ? 0
=========================================
Hits ? 18042
Misses ? 2969
Partials ? 0 Continue to review full report at Codecov.
|
* Add fuzz testing local step and CI integration * Address PR comments * Use upstream repo of Grammarinator Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> (cherry picked from commit ec7fdb6)
* update RE QA versions (#1750) * Support updating properties with map referenced by parameter or variable (#1749) * Support updating properties with map referenced by parameter or variable * Unify logic for updating property maps * refactor, simplified update construction logic * reply with error on cleanup * tidy up Co-authored-by: swilly22 <roi@redislabs.com> * circleci context (#1753) access to the variables in the organization context * map should return volatile data (#1754) * Reduce edge count optimization 3 (#1756) * Use the statistics to determine edge count. * amend to prev. * Added edge_count optimization benchmark * benchmark both node and edge count Co-authored-by: swilly22 <roi@redislabs.com> * Fix edge_count.yml benchmark name and init_commands (#1765) * updating to redis 6.2.4 (#1762) Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * [fix] Added missing common context to nightly perf automation (#1770) Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * rce package (#1775) * Updated readies and CircleCI config (#1774) * Updated readies * fixes 1 * fixes 2 * fixes 3 * fixes 4 * Coverage analysis (#1777) * [WIP] Coverage analysis * fixes 1 * fixes 2 * fixes 3 * fixes 4 Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * fixed bug in load time config in which config subscribers missed them… (#1764) * fixed bug in load time config in which config subscribers missed them and also enabled run time configuration of multiple fields at once. * refactor * amend to prev. * amend to prev * amend to prev * refactor configuration dryrun * validate configuration wasn't changed * amend to prev - extended the test * init thread pools Co-authored-by: swilly22 <roi@redislabs.com> Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * array refactor - use do while(0) instead of compound expression. (#1776) * array refactor - use do while(0) instead of compound expression. * array_append - refactor, change to do while(0) * indentation Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> Co-authored-by: swilly22 <roi@redislabs.com> * matrix resize doesn't set both rows and columns atomicly (#1773) * Add fuzz testing local step and CI integration (#1768) * Add fuzz testing local step and CI integration * Address PR comments * Use upstream repo of Grammarinator Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * multi property index support. (#1782) * multi property index support. * amend to prev * amend to prev. Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * use individual edge deletion when number of edges to delete is small (#1783) * use individual edge deletion when number of edges to delete is small * Add edge deletion benchmark Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com> * On CondVarLenTraverseOptimizedConsume init allNeighborsCtx instead of… (#1784) * On CondVarLenTraverseOptimizedConsume init allNeighborsCtx instead of realloc on each iteration. * reset assume context already created Co-authored-by: swilly22 <roi@redislabs.com> Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * Add documentation for startNode() and endNode() (#1792) * Fix memory leak on AllNeighborsCtx_Reset (#1791) Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * Add 10-minute nightly fuzz test (#1790) Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * CentOS8/RHEL8 builds (#1797) * CentOS8/RHEL8 builds * fixes 1 * fixes 2 * fixes 3 * fixes 4 * fixes 5 * Don't use bulk routine for implicit edge deletion <= 4 (#1793) * Don't use bulk routine for implicit edge deletion <= 4 * avoid tuple iterator, switch to matrix export * Minimize number of Apply calls in deletion * Explicitly label node in Graph_CreateNode, fix memory leaks Co-authored-by: swilly22 <roi@redislabs.com> * unzipping just the !rce now that there are dupes (#1803) * removing docker curl and executing, relying on the contents of github directly (#1802) Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * setting matrix sparse on new relationship type. (#1799) * setting matrix sparse on new relationship type. * amend to prev * amend to prev Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * perf clone fix (#1807) * AllNeighborsCtx should hold array of GxB_MatrixTupleIter and not arra… (#1794) * AllNeighborsCtx should hold array of GxB_MatrixTupleIter and not array of GxB_MatrixTupleIter* * amend to prev * amend to prev. * Update GxB_Matrix_tuple_iter.c Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * Tuple iter race (#1788) * Resolve race condition in GxB_MatrixTupleIter * Temporarily modify GraphBLAS README * Always set sparsity on RG_Matrix objects * set sparsity control on creation * tuple iterator set sparsity control * Disable GraphBLAS build parallelism Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> Co-authored-by: swilly22 <roi@redislabs.com> * Add codecov badge (#1789) Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * adding more indexes to test_persistency (#1760) * adding more indexes to test_persistency * amend to prev * refactor test Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> Co-authored-by: swilly22 <roi@redislabs.com> * Build: allow specification of parallel jobs (#1809) By default, do not exceed 8 jobs, so we don't OOM in CI. Override (e.g. make JOBS=32) is possible. Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * fixed aggregate ambigous grouping. (#1787) * fixed aggregate ambigous grouping. * add group_hash * fixed a bug in prev commit. * Update op_aggregate.c Co-authored-by: swilly22 <roi@redislabs.com> Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * fixing peg to install man pages into local tree (#1815) Given that we don't use the man pages, but the make install target requires it, this ensures it won't break, and doesn't pollute the filesystem * Arm platform build (#1810) * Arm platform build * fixes 1 * fixes 2 * fixes 3 * fixes 4 Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * Release drafter (#1800) * Create release-drafter-config.yml * Create release-drafter.yml * Create codeql-analysis.yml (#1795) * Create codeql-analysis.yml * Update codeql-analysis.yml * Update codeql-analysis.yml * Update codeql-analysis.yml Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * Fix build issue on macos 11 and treat misleading indentation as warning (#1820) * fix build * fix build Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com> Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: OfirMos <82366525+OfirMos@users.noreply.github.com> Co-authored-by: filipe oliveira <filipecosta.90@gmail.com> Co-authored-by: Rafi Einstein <raffapen@outlook.com> Co-authored-by: Guy Korland <gkorland@gmail.com> Co-authored-by: Avi Avni <avi.avni@gmail.com>
* Add fuzz testing local step and CI integration * Address PR comments * Use upstream repo of Grammarinator Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Run fuzz test for 30 seconds in CI and adds
make fuzz
rule.The test fails if the server crashes during its execution.