<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10383</bug_id>
          
          <creation_ts>2016-10-05 19:27:30 +0000</creation_ts>
          <short_desc>create test for subprocess calls to identify problems</short_desc>
          <delta_ts>2017-12-06 17:10:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=9342</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.4</target_milestone>
          <dependson>10411</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stephano Cetola">stephano</reporter>
          <assigned_to name="Stephano Cetola">stephano</assigned_to>
          <cc>benjamin.esquivel</cc>
    
    <cc>bluelightning</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66959</commentid>
    <comment_count>0</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2016-10-05 19:27:30 +0000</bug_when>
    <thetext>There should be a test for subprocess calls so that once all the strings have been cleaned up and turned into arrays, regressions do not occur. Also, this will be a handy tool to identify places where subprocess still needs to be cleaned up.  See Bug 9342 for more info on this subject.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66992</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-06 15:15:29 +0000</bug_when>
    <thetext>is this something like git grep subprocess?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68282</commentid>
    <comment_count>2</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2016-11-14 18:27:49 +0000</bug_when>
    <thetext>It&apos;s a little more comprehensive than that.

If we want to avoid the use of shell=True, there should be some way of tracking how often this is used. If not, then any efforts to clean this up will be competing with the slow influx of shell=True in new code.

The goal is that we would like to avoid (whenever possible) unwieldy shell commands that could be prone to breaking. We currently don&apos;t have any check to see how many of these commands exist, and if that number is increasing. We&apos;d like to be able to keep an eye on this going forward, but I don&apos;t know enough about our test infrastructure to know if there are any tools in place to do this currently.

Do you know of a way we could keep an eye on this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68306</commentid>
    <comment_count>3</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-11-14 23:35:37 +0000</bug_when>
    <thetext>We currently have no static analysis extensions written, but adding a custom checker to pylint [1] should cover the case you&apos;re describing.

Now that doesn&apos;t solve everything, it would still be required:

1. to have a defined codebase where to run this checker against (is it the entire poky repo? I don&apos;t think so.)
2. to have a regular execution scheduled for these types of checks, I would suggest the odd milestones (M1, M3)

[1] https://pylint.readthedocs.io/en/latest/reference_guide/custom_checkers.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68383</commentid>
    <comment_count>4</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-11-16 21:05:02 +0000</bug_when>
    <thetext>Just found out that the pylint checkers will be run as a part of patchtest testing. Adding the dependency of the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69043</commentid>
    <comment_count>5</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2016-12-12 17:31:52 +0000</bug_when>
    <thetext>Moving this to M2 since I won&apos;t have time today to close this out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75723</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-08-08 14:36:35 +0000</bug_when>
    <thetext>Several patches for this have landed, any future work should be filed as a new bug with specific changes required.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>