Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Work around known issues in "Ubuntu on Windows" #11574

Merged
merged 5 commits into from
Sep 10, 2016

Conversation

ericeil
Copy link
Contributor

@ericeil ericeil commented Sep 9, 2016

The latest Windows 10 preview builds contain enough functionality in Ubuntu/Bash on Windows (a.k.a. Windows Subsystem for Linux, or WSL) that .NET Core mostly works now. With the fix for #11058, we can even build/test the CoreFx tree in this environment. Currently there are a few test failures; I've been working on identifying the causes of these, and filing bugs in the appropriate repos.

This change implements workarounds for all of the current known issues in the "inner loop" tests. Mostly, I've just conditionally disabled tests when running in the WSL environment.

There is still an issue, under investigation, causing non-deterministic failures in the System.Net.Http tests (microsoft/WSL#1068). And I haven't tried OuterLoop runs of anything but the networking tests.

Hopefully getting this merged will unblock other folks from trying Ubuntu on Windows in their own CoreFx workflows.

@ericeil
Copy link
Contributor Author

ericeil commented Sep 9, 2016

Forgot to mention that I'm tracking all issues in https://github.com/dotnet/corefx/issues/11057.

@stephentoub
Copy link
Member

The latest Windows 10 preview builds contain enough functionality in Ubuntu/Bash on Windows (a.k.a. Linux Subsystem for Windows, or WSL) that .NET Core mostly works now

Woo hoo!

@@ -191,7 +191,7 @@ internal static bool TryReadStatFile(int pid, out ParsedStat result, ReusableTex
internal static bool TryReadStatFile(int pid, int tid, out ParsedStat result, ReusableTextReader reusableReader)
{
bool b = TryParseStatFile(GetStatFilePathForThread(pid, tid), out result, reusableReader);
Debug.Assert(!b || result.pid == tid, "Expected thread ID from stat file to match supplied tid");
//Debug.Assert(!b || result.pid == tid, "Expected thread ID from stat file to match supplied tid");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out? If it's necessary, could you add a comment explaining and linking to whatever the associated issue # is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this; I thought I'd already added a comment here. Fixed.

@stephentoub
Copy link
Member

A few comments/questions, but generally LGTM. It'll be nice to see these disabled tests get reenabled as the necessary support/fixes arrive.

{
var s = File.ReadAllText(versionFile);

if (s.Contains("Microsoft") || s.Contains("WSL"))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the chance that some Linux distribution will contain WSL as a substring in its /proc/version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure...WSL sounds like an uncommon sequence of characters to me, but that's hard to predict. We could maybe do a little more rigorous parsing here, but I'm not sure it's worth the additional risk of getting things wrong. The worst-case scenario is that we stop running some tests on a distro where they should run, but at least there's a chance that whoever is porting to that distro will notice, since xunit prints messages about tests that were skipped conditionally.

@ericeil
Copy link
Contributor Author

ericeil commented Sep 10, 2016

@dotnet-bot test Innerloop OSX Release Build and Test please.
Previous failure has no obvious reason for the failure.

@ericeil ericeil merged commit d9aa92f into dotnet:master Sep 10, 2016
@karelz karelz modified the milestone: 1.2.0 Dec 3, 2016
@karelz karelz added os-linux Linux OS (any supported distro) and removed X-Plat labels Mar 8, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
The latest Windows 10 preview builds contain enough functionality in Ubuntu/Bash on Windows (a.k.a. Windows Subsystem for Linux, or WSL) that .NET Core mostly works now. With the fix for dotnet/corefx#11058, we can even build/test the CoreFx tree in this environment. Currently there are a few test failures; I've been working on identifying the causes of these, and filing bugs in the appropriate repos. 
This change implements workarounds for all of the current known issues in the "inner loop" tests. Mostly, I've just conditionally disabled tests when running in the WSL environment. 
There is still an issue, under investigation, causing non-deterministic failures in the System.Net.Http tests (Microsoft/BashOnWindowsdotnet/corefx#1068). And I haven't tried OuterLoop runs of anything but the networking tests. 

Commit migrated from dotnet/corefx@d9aa92f
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
os-linux Linux OS (any supported distro)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants