tests: tests/test_sanity.py::test_dotnet_trace[False-dotnet] fails on aarch64
- Dominant language
- Python
- Stars
- 826
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
```
in_container = False, command_line = ['dotnet', '/tmp/pytest-of-root/pytest-38/artifacts0/dotnet/Fibonacci/Fibonacci.dll', '--project', '/tmp/pytest-of-root/pytest-38/artifacts0/dotnet/Fibonacci'], check_app_exited = True
@fixture
def application_process(
in_container: bool, command_line: List[str], check_app_exited: bool ) -> Iterator[Optional[subprocess.Popen]]:
if in_container: yield None
return
else:
> with _application_process(command_line, check_app_exited) as popen:
tests/conftest.py:217:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/contextlib.py:135: in __enter__
return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
command_line = ['dotnet', '/tmp/pytest-of-root/pytest-27/artifacts0/dotnet/Fibonacci/Fibonacci.dll', '--project', '/tmp/pytest-of-root/pytest-27/artifacts0/dotnet/Fibonacci'], check_app_exited = True
@contextmanager
def _application_process(command_line: List[str], check_app_exited: bool) -> Iterator[subprocess.Popen]:
# run as non-root to catch permission errors, etc.
def lower_privs() -> None:
os.setgid(1000)
os.setuid(1000)
popen = subprocess.Popen(
command_line, preexec_fn=lower_privs, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd="/tmp"
)
try:
# wait 2 seconds to ensure it starts
popen.wait(2)
except subprocess.TimeoutExpired:
pass
else:
_print_process_output(popen)
> raise Exception(f"Command {command_line} exited unexpectedly with {popen.returncode}")
E Exception: Command ['dotnet', '/tmp/pytest-of-root/pytest-27/artifacts0/dotnet/Fibonacci/Fibonacci.dll', '--project', '/tmp/pytest-of-root/pytest-27/artifacts0/dotnet/Fibonacci'] exited unexpectedly with 1
tests/utils.py:318: Exception
----------------------------------------------------------------------------------------------------------------------------- Captured stdout setup ------------------------------------------------------------------------------------------------------------------------------
stdout:
stderr: System.UnauthorizedAccessException: Access to the path '/root/.dotnet' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at Microsoft.Extensions.EnvironmentAbstractions.DirectoryWrapper.CreateDirectory(String path)
at Microsoft.DotNet.Configurer.FileSystemExtensions.<>c__DisplayClass0_0.b__0()
at Microsoft.DotNet.Cli.Utils.FileAccessRetrier.RetryOnIOException(Action action)
at Microsoft.DotNet.Configurer.FileSystemExtensions.CreateIfNotExists(IFileSystem fileSystem, String filePath)
at Microsoft.DotNet.Configurer.FileSentinel.Create()
at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
at Microsoft.DotNet.Cli.Program.Main(String[] args)
----------------------------------------------------------------------------------------------------------------------------- Captured stderr setup ------------------------------------------------------------------------------------------------------------------------------
No usable version of libssl was found
rm: cannot remove 'Program.cs': No such file or directory
No usable version of libssl was found
================================================================================================================================ warnings summary ================================================================================================================================
test_sanity.py::test_dotnet_trace[False-dotnet]
/usr/local/lib/python3.10/dist-packages/docker/utils/utils.py:52: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
s1 = StrictVersion(v1)
test_sanity.py::test_dotnet_trace[False-dotnet]
/usr/local/lib/python3.10/dist-packages/docker/utils/utils.py:53: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
s2 = StrictVersion(v2)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
```
Contributor guide
Assessment
This issue has not been assessed yet.