Bug 9881 - patchtest-oe: check patch's subject length
Summary: patchtest-oe: check patch's subject length
Status: RESOLVED FIXED
Alias: None
Product: Patchwork/Patchtest
Classification: Yocto Project Subprojects
Component: Patchtest (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 2.2 M2
Assignee: Leonardo Sandoval Gonzalez
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-07-05 21:09 UTC by Leonardo Sandoval Gonzalez
Modified: 2017-12-06 17:02 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo Sandoval Gonzalez 2016-07-05 21:09:11 UTC
Long subjects should be avoided, so the suite must trigger an assertion if length is > MAX. MAX should be an general or open-embedded standard (80?)
Comment 1 Leonardo Sandoval Gonzalez 2016-07-21 16:26:47 UTC
This check is already implemented on the patchtest-oe suite. The max length set is 80. There are two ways to validate this test:

1. Manual 
    1.1 Create a patch with git-format-patch and on the created patch, increase the message summary length to more that 80 chars.
    1.2 clone patchtest and patchtest-oe (right now these are not public), follow patchtest-oe setup instructions
    1.3 run the following cmd:
        cat $newpatch | patchtest - --test-dir $path-to-patchtest-oe/tests/mbox/subject
    1.4 expected output: you should see the FAIL on the particular testid

2. Selftest

   2.1 follow step 1.2, the run the following cmd:
       cd $patchtest-oe/selftest; ./selftest
   2.2 expected output: no output should be seen on console