Skip to content

Jest support: List fuzz test names#606

Merged
zgtm merged 2 commits intomainfrom
FUZZ-785-list-fuzztest-names
Sep 27, 2023
Merged

Jest support: List fuzz test names#606
zgtm merged 2 commits intomainfrom
FUZZ-785-list-fuzztest-names

Conversation

@zgtm
Copy link
Contributor

@zgtm zgtm commented Sep 21, 2023

Lists fuzz test names if JAZZER_LIST_FUZZTEST_NAMES is set. Futhermore, will filter the list by regex if JAZZER_LIST_FUZZTEST_NAMES_PATTERN is set.

Copy link
Contributor

@bertschneider bertschneider left a comment

Choose a reason for hiding this comment

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

Thank for the PR! It seems it's too small. 5 lines -> 5 comments, 500 lines -> LGTM 😅

Could you please add an integration test checking that the expected test names are actually printed?

@zgtm zgtm force-pushed the FUZZ-785-list-fuzztest-names branch from e29c26d to e6eb745 Compare September 25, 2023 16:07
if (process.env.JAZZER_LIST_FUZZTEST_NAMES) {
if (
process.env.JAZZER_LIST_FUZZTEST_NAMES_PATTERN == undefined ||
full_name.match(process.env.JAZZER_LIST_FUZZTEST_NAMES_PATTERN)

Check failure

Code scanning / CodeQL

Regular expression injection

This regular expression is constructed from a [environment variable](1).
@zgtm zgtm requested a review from bertschneider September 25, 2023 16:09
@zgtm zgtm force-pushed the FUZZ-785-list-fuzztest-names branch from e6eb745 to 6c30c36 Compare September 25, 2023 21:15
Copy link
Contributor

@bertschneider bertschneider left a comment

Choose a reason for hiding this comment

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

Looks good, thx!

Come to think of it, this breaks with our plan to support all settings via environment variables, CLI parameters and configuration file entries. As it's a quite specific use-case IMHO it's ok to only support env vars here.

… set

Futhermore will filter the list by regex if 'JAZZER_LIST_FUZZTEST_NAMES_PATTERN' is set.
@zgtm zgtm force-pushed the FUZZ-785-list-fuzztest-names branch from 6c30c36 to d79d871 Compare September 27, 2023 08:15
@zgtm zgtm merged commit d4ba342 into main Sep 27, 2023
@zgtm zgtm deleted the FUZZ-785-list-fuzztest-names branch September 27, 2023 09:37
karfau referenced this pull request in xmldom/xmldom Oct 28, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@jazzer.js/core](https://togithub.com/CodeIntelligenceTesting/jazzer.js)
| [`2.0.0` ->
`2.1.0`](https://renovatebot.com/diffs/npm/@jazzer.js%2fcore/2.0.0/2.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@jazzer.js%2fcore/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@jazzer.js%2fcore/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@jazzer.js%2fcore/2.0.0/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@jazzer.js%2fcore/2.0.0/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>CodeIntelligenceTesting/jazzer.js
(@&#8203;jazzer.js/core)</summary>

###
[`v2.1.0`](https://togithub.com/CodeIntelligenceTesting/jazzer.js/releases/tag/v2.1.0):
Release 2.1.0

[Compare
Source](https://togithub.com/CodeIntelligenceTesting/jazzer.js/compare/v2.0.0...v2.1.0)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

- **Feature**: Jest support: List fuzz test names by
[@&#8203;zgtm](https://togithub.com/zgtm) in
[https://github.com/CodeIntelligenceTesting/jazzer.js/pull/606](https://togithub.com/CodeIntelligenceTesting/jazzer.js/pull/606)
- **Feature**: Handle real segfaults in fuzz targets by
[@&#8203;br-lewis](https://togithub.com/br-lewis) in
[https://github.com/CodeIntelligenceTesting/jazzer.js/pull/602](https://togithub.com/CodeIntelligenceTesting/jazzer.js/pull/602)
- **Feature**: Provide consistent exit codes by
[@&#8203;bertschneider](https://togithub.com/bertschneider) in
[https://github.com/CodeIntelligenceTesting/jazzer.js/pull/617](https://togithub.com/CodeIntelligenceTesting/jazzer.js/pull/617)
- **Bugfix**: Patch coverage of implicit else branches by
[@&#8203;bertschneider](https://togithub.com/bertschneider) in
[https://github.com/CodeIntelligenceTesting/jazzer.js/pull/635](https://togithub.com/CodeIntelligenceTesting/jazzer.js/pull/635)

**Full Changelog**:
CodeIntelligenceTesting/jazzer.js@v2.0.0...v2.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/xmldom/xmldom).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
karfau referenced this pull request in xmldom/xmldom Oct 28, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@jazzer.js/jest-runner](https://togithub.com/CodeIntelligenceTesting/jazzer.js)
| [`2.0.0` ->
`2.1.0`](https://renovatebot.com/diffs/npm/@jazzer.js%2fjest-runner/2.0.0/2.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@jazzer.js%2fjest-runner/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@jazzer.js%2fjest-runner/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@jazzer.js%2fjest-runner/2.0.0/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@jazzer.js%2fjest-runner/2.0.0/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>CodeIntelligenceTesting/jazzer.js
(@&#8203;jazzer.js/jest-runner)</summary>

###
[`v2.1.0`](https://togithub.com/CodeIntelligenceTesting/jazzer.js/releases/tag/v2.1.0):
Release 2.1.0

[Compare
Source](https://togithub.com/CodeIntelligenceTesting/jazzer.js/compare/v2.0.0...v2.1.0)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

- **Feature**: Jest support: List fuzz test names by
[@&#8203;zgtm](https://togithub.com/zgtm) in
[https://github.com/CodeIntelligenceTesting/jazzer.js/pull/606](https://togithub.com/CodeIntelligenceTesting/jazzer.js/pull/606)
- **Feature**: Handle real segfaults in fuzz targets by
[@&#8203;br-lewis](https://togithub.com/br-lewis) in
[https://github.com/CodeIntelligenceTesting/jazzer.js/pull/602](https://togithub.com/CodeIntelligenceTesting/jazzer.js/pull/602)
- **Feature**: Provide consistent exit codes by
[@&#8203;bertschneider](https://togithub.com/bertschneider) in
[https://github.com/CodeIntelligenceTesting/jazzer.js/pull/617](https://togithub.com/CodeIntelligenceTesting/jazzer.js/pull/617)
- **Bugfix**: Patch coverage of implicit else branches by
[@&#8203;bertschneider](https://togithub.com/bertschneider) in
[https://github.com/CodeIntelligenceTesting/jazzer.js/pull/635](https://togithub.com/CodeIntelligenceTesting/jazzer.js/pull/635)

**Full Changelog**:
CodeIntelligenceTesting/jazzer.js@v2.0.0...v2.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/xmldom/xmldom).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

2 participants

Comments