Bug 9881

Summary: patchtest-oe: check patch's subject length
Product: [Yocto Project Subprojects] Patchwork/Patchtest Reporter: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Component: PatchtestAssignee: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium+ CC: bluelightning, sgw
Version: 2.1   
Target Milestone: 2.2 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

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