Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • W weston
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 349
    • Issues 349
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 131
    • Merge requests 131
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • waylandwayland
  • weston
  • Merge requests
  • !291

Remove static variables from tests

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Pekka Paalanen requested to merge pq/weston:mr/nostatic into master Nov 06, 2019
  • Overview 1
  • Commits 5
  • Pipelines 3
  • Changes 5

Some tests use static variables to cache values for convenience. Sometimes the caching is completely useless in practice, and sometimes there is no reason to use a static variable to begin with. There are also some cases where the caching was useful.

The use of static variables breaks down when the test harness stops fork()ing each test case separately. To make !287 (merged) happen, static variables must be replaced.

Whether or not fork()ing in the test harness is removed, I think it is still good form to avoid using static data for things that are not truly tied to loading DSOs.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: mr/nostatic