Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !3448

i#3387 memquery: add unit test for unix/memquery.c

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge i3387-unit-test into master Mar 15, 2019
  • Overview 76
  • Commits 15
  • Pipelines 0
  • Changes 8

Created by: Carrotman42

This relies on fake maps data retrieved from the DR test suite using the included record_memquery_library_bounds_by_iterator function, and then manually curating a set of interesting examples. I did not spend a lot of time curating so there may be some repetition in the tests, but I figure it's not a huge deal since it executes faster than a blink of an eye (even with all 600-some test cases I originally ended up with).

I included some convenience macros for testing which were more convenient than the existing ones; in particular, mine support arbitrary format strings in error messages and print out more verbose results even in release mode.

Please feel free to pick apart exactly how I implemented this (e.g. using macros to swap out dependency logic during standalone unit tests, how data/tests are placed in headers and directly included from the middle of other files). I am happy to make any changes you'd like.

Issue: #3387

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i3387-unit-test