Skip to content

Request: guidance for adding tests #588

@hainest

Description

@hainest

I would like to port the decoder tests I recently added to Capstone to here. Based on the main GitHub CI workflow, I see there are a set of regression tests in tests/cases and fuzzing is done with tools/ZydisFuzzDecoder.c. Am I missing any for the decoder?

A few questions:

  1. Is there interest in having "full" parameter space tests like Update read/written registers for x86 string instructions capstone-engine/capstone#2790?
  2. The naming convention for regression tests is currently <type>_XXX.{in,out}. The stringop tests I created will eat up more than 10% of the available namespace for default. Would it be ok to extend the number of digits? I was also considering using a convention with a more specific type based on the instruction's category (ZydisInstructionCategory) like stringops_XXX instead of default_XXX to avoid jostling the naming conventions too much.
  3. Is there interest in having configuration-driven testing for the decoder like there is for the encoder (e.g., tests/enc_test_cases.json)? The current diffing of the output from ZydisInfo effectively precludes certain types of updates to its output. Although clearly hasn't been an issue since they were added four years ago. I'd be happy to put in some serious cycles into building the needed testing framework for a big update like this.

Many thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions