<div dir="ltr">For some reason sudo is not allowed. For example, I try using<span class="gmail-Apple-converted-space"> </span><i>system "sudo -u svacchanda ./VidaliaTestSuite"</i><span class="gmail-Apple-converted-space"> </span>(just for the sake of testing, since it works when running manually), but get:<div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">[100%] Built target VidaliaTestSuite</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">make[1]: Leaving directory `/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_security_Vidalia/Vidalia/work/build'</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">/opt/local/bin/cmake -E cmake_progress_start /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_security_Vidalia/Vidalia/work/build/CMakeFiles 0</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">make: Leaving directory `/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_security_Vidalia/Vidalia/work/build'</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">---> <span class="gmail-Apple-converted-space"> </span>Testing Vidalia</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">sh: /usr/bin/sudo: Operation not permitted</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">Command failed: sudo -u svacchanda ./VidaliaTestSuite</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">Exit code: 126</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p></div>I tried a few other ways of adding <i>sudo -u</i><span class="gmail-Apple-converted-space"> </span>via the portfile, and get the same error.<div><br></div><div>P. S. Both cmake 1.0 and cmake 1.1 fail identically with regard to running tests.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 24, 2024 at 2:28 PM Joshua Root <<a href="mailto:jmr@macports.org">jmr@macports.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On 24/2/2024 17:27, Sergey Fedorov wrote:<br>
> If Macports is running as root, but tests require non-root user, how to <br>
> do that?<br>
> There is no test.asroot no, apparently.<br>
<br>
All the usual ways you can run something as another user when you are <br>
root. You could prefix your build.cmd with 'sudo -u $macportsuser' for <br>
example.<br>
<br>
- Josh<br>
</blockquote></div>