<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/128477/">https://git.reviewboard.kde.org/r/128477/</a>
     </td>
    </tr>
   </table>
   <br />



<p>

Ship it!

</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Wow, it never occured to me that someone might run this test as root. I thought it was well known that development should not be done as root ;)
But I can see how it might happen when creating packages with unittests enabled or something.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The patch looks fine to me, not sure why you say "it probably still needs some more work" ?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Unfortunately I see no other way to test files owned by other users. But of course as long as this is tested once, the other tests could change permissions on a temp file to get into "missing permissions" error cases.</p></pre>
 <br />









<p>- David Faure</p>


<br />
<p>On July 18th, 2016, 5:10 p.m. UTC, Tobias Berner wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KDE Frameworks and David Faure.</div>
<div>By Tobias Berner.</div>


<p style="color: grey;"><i>Updated July 18, 2016, 5:10 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kio
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Some tests for kio try to move system relevant files&paths with the blind assumption that 
the permissions to touch these files is not present. 
The files are 
- /etc/passwd
- /etc/cups
- /etc
- /boot
[sic!].</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Check that the process does not actually have the rights to touch system
relevant files when running the
- TestTrash::trashDirectoryOwnedByRoot
- TestTrash::trashFileOwnedByRoot
- JobTest::moveFileNoPermissions
- JobTest::moveDirectoryNoPermissions
tests -- and bail out of them if so.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This patch probably still needs some more work [maybe I also missed another naughty test?],
and I welcome every kind of input on it (apart from the straw man <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">don't run tests as root</em> ;) ).</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Without patch:
- enjoying two hours of restoring a system without /etc & /boot</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With patch:
- grep 'must not' Testing/Temporary/LastTest.log.tmp
     SKIP   : TestTrash::trashFileOwnedByRoot() Test must not be run by root.
     SKIP   : TestTrash::trashDirectoryOwnedByRoot() Test must not be run by root.
     SKIP   : JobTest::moveFileNoPermissions() Test must not be run by root.
     SKIP   : JobTest::moveDirectoryNoPermissions() Test must not be run by root.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>autotests/jobtest.cpp <span style="color: grey">(579c507)</span></li>

 <li>src/ioslaves/trash/tests/testtrash.cpp <span style="color: grey">(c71df13)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/128477/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>