Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Linux] Make unit tests abort on critical errors, and fix two such errors#32348

Merged
fluttergithubbot merged 4 commits intoflutter:mainfrom
dkwingsmt:linux-eliminate-critical-errors
Apr 28, 2022
Merged

[Linux] Make unit tests abort on critical errors, and fix two such errors#32348
fluttergithubbot merged 4 commits intoflutter:mainfrom
dkwingsmt:linux-eliminate-critical-errors

Conversation

@dkwingsmt
Copy link
Contributor

@dkwingsmt dkwingsmt commented Mar 31, 2022

This PR makes GTK unit tests abort on GTK critical errors. This including GTK internal errors and g_return_if_fail statements added by Flutter. This PR also fixes three such critical errors that have been ignored.

These g_return_if_fail statements have been used as (and practically are) the GTK version of asserts. However, currently these statements only logs to stderr, while the process goes on with a return value 0, making them pretty much ignored.

I've tried to look for a way to only return a non-zero value instead of aborting, but in vain.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@dkwingsmt dkwingsmt force-pushed the linux-eliminate-critical-errors branch from bd1fd33 to 5cc721e Compare April 28, 2022 21:19
@dkwingsmt dkwingsmt added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Apr 28, 2022
@fluttergithubbot fluttergithubbot merged commit 649fe10 into flutter:main Apr 28, 2022
@dkwingsmt dkwingsmt deleted the linux-eliminate-critical-errors branch April 28, 2022 23:06
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

affects: tests platform-linux waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants