Skip to content
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

issues: improve random syntax test crash reports #64490

Merged
merged 1 commit into from
May 5, 2021

Conversation

mgartner
Copy link
Collaborator

@mgartner mgartner commented Apr 30, 2021

Crashes during random syntax tests now report more useful information to
the issue including the error message, the SQL that produced the error,
and the database schema.

The report will be formatted as:

Random syntax error:

    rsg_test.go:755: Crash detected: server panic: pq: internal error: something bad

Query:

		SELECT
			foo
		FROM
			bar
		LIMIT
			33:::INT8;

Schema:

    rsg_test.go:575: To reproduce, use schema:
    rsg_test.go:577:
        	CREATE TABLE table1 (col1_0 BOOL);
        ;
    rsg_test.go:577:

        CREATE TYPE greeting AS ENUM ('hello', 'howdy', 'hi', 'good day', 'morning');
        ;
    rsg_test.go:579:
    rsg_test.go:580: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith460792454
--- FAIL: TestRandomSyntaxSQLSmith (300.69s)

Release note: None

@mgartner mgartner requested review from tbg and a team April 30, 2021 20:05
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg
Copy link
Member

tbg commented May 1, 2021

Nice, I'll take a look on Tuesday (off on Monday)!

@tbg
Copy link
Member

tbg commented May 1, 2021

Cc @cockroachdb/test-eng

Copy link
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: wonderful

Reviewed 9 of 9 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner)

@mgartner mgartner force-pushed the improve-rsg-test-failure-report branch from 02cb403 to 09e5a35 Compare May 4, 2021 17:06
Crashes during random syntax tests now report more useful information to
the issue including the error message, the SQL that produced the error,
and the database schema.

The report will be formatted as:

> Random syntax error:
>
> ```
>     rsg_test.go:755: Crash detected: server panic: pq: internal error: something bad
> ```
> Query:
>
> ```
> 		SELECT
> 			foo
> 		FROM
> 			bar
> 		LIMIT
> 			33:::INT8;
> ```
> Schema:
>
> ```
>     rsg_test.go:575: To reproduce, use schema:
>     rsg_test.go:577:
>         	CREATE TABLE table1 (col1_0 BOOL);
>         ;
>     rsg_test.go:577:
>
>         CREATE TYPE greeting AS ENUM ('hello', 'howdy', 'hi', 'good day', 'morning');
>         ;
>     rsg_test.go:579:
>     rsg_test.go:580: -- test log scope end --
> test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith460792454
> --- FAIL: TestRandomSyntaxSQLSmith (300.69s)
> ```

Release note: None
@mgartner mgartner force-pushed the improve-rsg-test-failure-report branch from 09e5a35 to dd708c7 Compare May 5, 2021 01:45
@mgartner
Copy link
Collaborator Author

mgartner commented May 5, 2021

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented May 5, 2021

Build succeeded:

@craig craig bot merged commit 43a079d into cockroachdb:master May 5, 2021
@mgartner mgartner deleted the improve-rsg-test-failure-report branch May 5, 2021 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants