Skip to content

Fix recog verify external example support#5

Merged
hdm merged 1 commit intorunZeroInc:mainfrom
mkienow-r7:bug/fix-recog-verify-external-example-support
Nov 8, 2021
Merged

Fix recog verify external example support#5
hdm merged 1 commit intorunZeroInc:mainfrom
mkienow-r7:bug/fix-recog-verify-external-example-support

Conversation

@mkienow-r7
Copy link
Copy Markdown

@mkienow-r7 mkienow-r7 commented Nov 8, 2021

Description

Fixes recog_verify external example support (_filename).

Example

Data

$ tree external-example-files
external-example-files
├── thingA
│   ├── file1
│   └── file2.txt
└── thingA.xml

thingA.xml:

<?xml version='1.0' encoding='UTF-8'?>
<fingerprints matches="thing">
  <fingerprint pattern="x64|amd64|x86_64">
    <description>x64 (x86_x64)</description>
    <example _filename="file1"></example>
    <example _filename="file2.txt"></example>
    <param pos="0" name="os.arch" value="x86_64"/>
  </fingerprint>
</fingerprints

thingA/file1:

Linux claw 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

thingA/file2.txt:

Linux dev 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux

Before Fix

$ ./bin/recog_verify external-example-files/*.xml
external-example-files/thingA.xml: FAIL: 'x64 (x86_x64)' failed to find expected capture group _filename 'file1'. Result was
external-example-files/thingA.xml: FAIL: 'x64 (x86_x64)' failed to find expected capture group _filename 'file2.txt'. Result was
external-example-files/thingA.xml: SUMMARY: Test completed with 0 successful, 0 warnings, and 2 failures

After Fix

$ ./bin/recog_verify external-example-files/*.xml
external-example-files/thingA.xml: SUMMARY: Test completed with 2 successful, 0 warnings, and 0 failures

Motivation and Context

Fixing an issue

How Has This Been Tested?

  • ./bin/recog_verify on the example data described above
  • rake tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have updated the documentation accordingly (or changes are not required).
  • I have added tests to cover my changes (or new tests are not required).
  • All new and existing tests passed.

@hdm
Copy link
Copy Markdown
Collaborator

hdm commented Nov 8, 2021

Thank you!

@hdm hdm merged commit e69086f into runZeroInc:main Nov 8, 2021
@mkienow-r7 mkienow-r7 deleted the bug/fix-recog-verify-external-example-support branch November 9, 2021 14:52
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