Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wasm][AOT] System.IO.DirectoryNotFoundException And System.IO.FileNotFoundException #49232

Closed
2 tasks
mdh1418 opened this issue Mar 5, 2021 · 8 comments
Closed
2 tasks
Assignees
Labels

Comments

@mdh1418
Copy link
Member

mdh1418 commented Mar 5, 2021

In effort to run library tests with AOT compilation and EnableAggressiveTrimming enabled on CI #48226 these errors are hit.

Repro:
Check out changes in
4f17c4e without this, many tests are not discovered.
4e7ab85 this one helps avoid some AOT compilation errors with this exception filter. There shouldn't be exception filter issues anymore.

./build.sh -os Browser -arch wasm -c Release
./dotnet.sh build /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true src/libraries/<path-to-test-proj>

@ghost
Copy link

ghost commented Mar 5, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

In effort to run library tests with AOT compilation and EnableAggressiveTrimming enabled on CI #48226 these errors are hit.

  • System.IO.DirectoryNotFoundException : Could not find a part of the path
    System.Xml.Xsl.XslCompiledTransformApi.Tests log
    System.Xml.Xsl.XslTransformApi.Tests log
    System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests log
    System.Data.DataSetExtensions.Tests log
    System.ServiceModel.Syndication.Tests log
    System.IO.Compression.Tests log
    System.Xml.XmlSchemaSet.Tests log
    System.IO.Compression.ZipFile.Tests log
    System.Xml.XmlResolver.Tests log
    System.Xml.RW.XmlSystemPathResolver.Tests log

  • System.IO.FileNotFoundException : Could not find file
    System.Reflection.Metadata.Tests log
    System.IO.Packaging.Tests log
    System.Reflection.MetadataLoadContext.Tests log
    System.Xml.XmlDocument.Tests log

Repro:
Check out changes in https://github.com/steveisok/runtime/tree/build-wasm-aot-helix
./build.sh -os Browser -arch wasm -c Release
./dotnet.sh build /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true src/libraries/<path-to-test-proj>

Author: mdh1418
Assignees: -
Labels:

arch-wasm, area-Infrastructure-libraries

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Mar 5, 2021
@fanyang-mono fanyang-mono self-assigned this Mar 22, 2021
@fanyang-mono fanyang-mono removed the untriaged New issue has not been triaged by the area owner label Mar 23, 2021
@kjpou1
Copy link
Contributor

kjpou1 commented Mar 24, 2021

@fanyang-mono all the test are failing with the above?

It seems some of them are running through now. The System.IO.Compression tests run through to completion

  System.IO.Compression.ZipFile.Tests -> /Users/Jimmy/websharp/projects/runtime/artifacts/bin/System.IO.Compression.ZipFile.Tests/net6.0-Debug/browser-wasm/publish/
  AOT'ing 30 assemblies
  Compiling native assets with emcc. This may take a while ...

--------- ++++  -------

info: Finished:    System.IO.Compression.ZipFile.Tests.dll
  info: 
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 23, Errors: 0, Failed: 0, Skipped: 0, Time: 2.5482839s

  AOT'ing 37 assemblies
  Compiling native assets with emcc. This may take a while ...

-------- ++++ -----

  info: Discovering: System.Data.DataSetExtensions.Tests.dll (method display = ClassAndMethod, method display options = None)
  info: Discovered:  System.Data.DataSetExtensions.Tests.dll (found 63 of 63 test cases)
  info: Starting:    System.Data.DataSetExtensions.Tests.dll
  info: Finished:    System.Data.DataSetExtensions.Tests.dll
  info: 
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 63, Errors: 0, Failed: 0, Skipped: 0, Time: 0.790739s
  info: 
  info: 06:59:41.6709190 Process v8 exited with 0



  System.IO.Packaging.Tests -> /Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.IO.Packaging.Tests/net6.0-Release/browser-wasm/publish/
  AOT'ing 33 assemblies
  Compiling native assets with emcc. This may take a while ...

-------- ++++ -----

  info: 
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 147, Errors: 0, Failed: 0, Skipped: 0, Time: 26.848404s
  info: 
  info: 07:09:29.9729690 Process v8 exited with 0
        
  info: Application has finished with exit code: 0


@kjpou1
Copy link
Contributor

kjpou1 commented Mar 24, 2021

Was looking at this and it seems suspiciously close to the error I fixed with emscripten-core/emscripten#13549. Looks like the same set of tests as well. Looked like it but not the issue

@fanyang-mono
Copy link
Member

@kjpou1 You are right. I am going through every each of them to see which ones are still failing.

@kjpou1
Copy link
Contributor

kjpou1 commented Mar 25, 2021

See #50229 for more information.

This is what I am getting for System.Xml.Xsl.XslCompiledTransformApi.Tests with running the command

From head.

dotnet.sh build /t:Test /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj
  Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  System.Xml.Xsl.XslCompiledTransformApi.Tests -> /Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.Xml.Xsl.XslCompiledTransformApi.Tests/net6.0-Release/browser-wasm/publish/
  AOT'ing 34 assemblies
  Compiling native assets with emcc. This may take a while ...
  XHarness command issued: wasm test --app=. --engine=V8 --engine-arg=--stack-trace-limit=1000 --js-file=runtime.js --output-directory=/Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.Xml.Xsl.XslCompiledTransformApi.Tests/net6.0-Release/browser-wasm/AppBundle/xharness-output -- --run WasmTestRunner.dll System.Xml.Xsl.XslCompiledTransformApi.Tests.dll -notrait category=OuterLoop -notrait category=failing
  info: 07:17:16.4324380 Running v8 --expose_wasm --stack-trace-limit=1000 runtime.js -- --run WasmTestRunner.dll System.Xml.Xsl.XslCompiledTransformApi.Tests.dll -notrait category=OuterLoop -notrait category=failing
        
        
  info: console.info: Arguments: --run,WasmTestRunner.dll,System.Xml.Xsl.XslCompiledTransformApi.Tests.dll,-notrait,category=OuterLoop,-notrait,category=failing
  info: console.debug: MONO_WASM: Initializing mono runtime
  info: console.debug: MONO_WASM: ICU data archive(s) loaded, disabling invariant mode
  info: console.debug: mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28
  info: console.info: Initializing.....
  info: Could not find constructor for 'Xunit.Sdk.CollectionPerAssemblyTestCollectionFactory' with arguments type(s): Xunit.Sdk.TestAssembly
  info: Discovering: System.Xml.Xsl.XslCompiledTransformApi.Tests.dll (method display = ClassAndMethod, method display options = None)
  info: Discovered:  System.Xml.Xsl.XslCompiledTransformApi.Tests.dll (found 84 of 84 test cases)
  info: Could not find constructor for 'Xunit.Sdk.CollectionPerAssemblyTestCollectionFactory' with arguments type(s): Xunit.Sdk.TestAssembly
  info: Starting:    System.Xml.Xsl.XslCompiledTransformApi.Tests.dll
  fail: [FAIL] System.Xml.Tests.CLoadReaderTest.LoadXmlReader5
  info: System.Xml.Tests.VerifyException : GetManifestResourceStream() failed
  info: 
  fail: [FAIL] System.Xml.Tests.CLoadReaderTest.LoadXmlReader2
  info: System.Xml.Tests.VerifyException : GetManifestResourceStream() failed
  info: 
  fail: [FAIL] System.Xml.Tests.CLoadXPathNavigableTest.LoadNavigator4
  info: Assert.Equal() Failure
  info:                    ↓ (pos 9)
  info: Expected: Compiling JScript/CSharp scripts is not supported
  info: Actual:   CompilingScriptsNotSupported
  info:                    ↑ (pos 9)
  info: 
  fail: [FAIL] System.Xml.Tests.XPathNodeIteratorTests.NodeIter2
  info: Assert.Equal() Failure
  info:                    ↓ (pos 9)
  info: Expected: Compiling JScript/CSharp scripts is not supported
  info: Actual:   CompilingScriptsNotSupported
  info:                    ↑ (pos 9)
  info: 
  fail: [FAIL] System.Xml.Tests.XPathNodeIteratorTests.NodeIter1
  info: Assert.Equal() Failure
  info:                    ↓ (pos 9)
  info: Expected: Compiling JScript/CSharp scripts is not supported
  info: Actual:   CompilingScriptsNotSupported
  info:                    ↑ (pos 9)
  info: 
  fail: [FAIL] System.Xml.Tests.CTransformStrStrTest.TransformStrStr9
  info: System.Xml.Tests.VerifyException : GetManifestResourceStream() failed
  info: 
  info: Finished:    System.Xml.Xsl.XslCompiledTransformApi.Tests.dll
  info: 
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 84, Errors: 0, Failed: 6, Skipped: 0, Time: 0.7447028s
  info: 
  info: 07:17:19.2721920 Process v8 exited with 1
        
  fail: Application has finished with exit code 1 but 0 was expected
  XHarness exit code: 71 (GENERAL_FAILURE)
  XHarness artifacts: /Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.Xml.Xsl.XslCompiledTransformApi.Tests/net6.0-Release/browser-wasm/AppBundle/xharness-output

@kjpou1
Copy link
Contributor

kjpou1 commented Mar 25, 2021

System.ServiceModel.Syndication.Tests

From head bcc7e0e

  System.ServiceModel.Syndication.Tests -> /Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.ServiceModel.Syndication.Tests/net6.0-Release/browser-wasm/System.ServiceModel.Syndication.Tests.dll
  System.ServiceModel.Syndication.Tests -> /Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.ServiceModel.Syndication.Tests/net6.0-Release/browser-wasm/publish/
  AOT'ing 179 assemblies
  Compiling native assets with emcc. This may take a while ...
  XHarness command issued: wasm test --app=. --engine=V8 --engine-arg=--stack-trace-limit=1000 --js-file=runtime.js --output-directory=/Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.ServiceModel.Syndication.Tests/net6.0-Release/browser-wasm/AppBundle/xharness-output -- --run WasmTestRunner.dll System.ServiceModel.Syndication.Tests.dll -notrait category=OuterLoop -notrait category=failing
  info: 12:27:16.9268890 Running v8 --expose_wasm --stack-trace-limit=1000 runtime.js -- --run WasmTestRunner.dll System.ServiceModel.Syndication.Tests.dll -notrait category=OuterLoop -notrait category=failing
        
        
  info: console.info: Arguments: --run,WasmTestRunner.dll,System.ServiceModel.Syndication.Tests.dll,-notrait,category=OuterLoop,-notrait,category=failing
  info: console.debug: MONO_WASM: Initializing mono runtime
  info: console.debug: MONO_WASM: ICU data archive(s) loaded, disabling invariant mode
  info: console.debug: mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28
  info: console.info: Initializing.....
  info: Discovering: System.ServiceModel.Syndication.Tests.dll (method display = ClassAndMethod, method display options = None)
  info: Discovered:  System.ServiceModel.Syndication.Tests.dll (found 776 of 776 test cases)
  info: Starting:    System.ServiceModel.Syndication.Tests.dll
  info: Finished:    System.ServiceModel.Syndication.Tests.dll
  info: 
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 1308, Errors: 0, Failed: 0, Skipped: 0, Time: 6.326247s
  info: 
  info: 12:27:26.2675330 Process v8 exited with 0
        
  info: Application has finished with exit code: 0
  XHarness exit code: 0
  XHarness artifacts: /Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.ServiceModel.Syndication.Tests/net6.0-Release/browser-wasm/AppBundle/xharness-output

@kjpou1
Copy link
Contributor

kjpou1 commented Mar 26, 2021

System.Xml.XmlSchemaSet.Tests

After further analysis the failures here seem to be in the Resources again which does not get the Resource failure error but the resource strings are not being retrieved correctly. #50229

  System.Xml.XmlSchemaSet.Tests -> /Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.Xml.XmlSchemaSet.Tests/net6.0-Release/browser-wasm/System.Xml.XmlSchemaSet.Tests.dll
  Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  System.Xml.XmlSchemaSet.Tests -> /Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.Xml.XmlSchemaSet.Tests/net6.0-Release/browser-wasm/publish/
  AOT'ing 32 assemblies
  Compiling native assets with emcc. This may take a while ...
  XHarness command issued: wasm test --app=. --engine=V8 --engine-arg=--stack-trace-limit=1000 --js-file=runtime.js --output-directory=/Users/Jimmy/websharp/projects/runtime-release/artifacts/bin/System.Xml.XmlSchemaSet.Tests/net6.0-Release/browser-wasm/AppBundle/xharness-output -- --run WasmTestRunner.dll System.Xml.XmlSchemaSet.Tests.dll -notrait category=OuterLoop -notrait category=failing
  info: 06:52:53.3630620 Running v8 --expose_wasm --stack-trace-limit=1000 runtime.js -- --run WasmTestRunner.dll System.Xml.XmlSchemaSet.Tests.dll -notrait category=OuterLoop -notrait category=failing
        
        
  info: console.info: Arguments: --run,WasmTestRunner.dll,System.Xml.XmlSchemaSet.Tests.dll,-notrait,category=OuterLoop,-notrait,category=failing
  info: console.debug: MONO_WASM: Initializing mono runtime
  info: console.debug: MONO_WASM: ICU data archive(s) loaded, disabling invariant mode
  info: console.debug: mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28
  info: console.info: Initializing.....
  info: Discovering: System.Xml.XmlSchemaSet.Tests.dll (method display = ClassAndMethod, method display options = None)
  info: Discovered:  System.Xml.XmlSchemaSet.Tests.dll (found 258 of 258 test cases)
  info: Starting:    System.Xml.XmlSchemaSet.Tests.dll
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_Compile.InvalidAllElementMax_Throws
  info: Assert.Contains() Failure
  info: Not found: all
  info: In value:  Sch_InvalidAllElementMax
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_Compile.InvalidExemplar_Throws
  info: Assert.Contains() Failure
  info: Not found: substitutionGroup
  info: In value:  Sch_InvalidExamplar
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_Compile.MaxLengthGtBaseMaxLength_Throws
  info: Assert.Contains() Failure
  info: Not found: maxLength
  info: In value:  Sch_MaxLengthGtBaseMaxLength
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_Compile.MinLengthLtBaseMinLength_Throws
  info: Assert.Contains() Failure
  info: Not found: minLength
  info: In value:  Sch_MinLengthGtBaseMinLength
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_Compile.InvalidAllMax_Throws
  info: Assert.Contains() Failure
  info: Not found: all
  info: In value:  Sch_InvalidAllMax
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_Compile.LengthGtBaseLength_Throws
  info: Assert.Contains() Failure
  info: Not found: length
  info: In value:  Sch_LengthGtBaseLength
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_Compile.FractionDigitsMismatch_Throws
  info: Assert.Contains() Failure
  info: Not found: fractionDigits
  info: In value:  Sch_FractionDigitsMismatch
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_Compile.GroupBaseRestNotEmptiable_Throws
  info: Assert.Contains() Failure
  info: Not found: particle
  info: In value:  Sch_InvalidParticleRestrictionDetailed
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_Compile.MinLengthGtMaxLength_Throws
  info: Assert.Contains() Failure
  info: Not found: minLength
  info: In value:  Sch_MinLengthGtMaxLength
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_Compile.FractionDigitsFacetBaseFixed_Throws
  info: Assert.Contains() Failure
  info: Not found: fixed
  info: In value:  Sch_FacetBaseFixed
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_ProhibitDTD.v1
  info: Assert.Equal() Failure
  info: Expected: True
  info: Actual:   False
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_ProhibitDTD.v2
  info: Assert.Equal() Failure
  info: Expected: True
  info: Actual:   False
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_ProhibitDTD.v14
  info: Assert.Equal() Failure
  info: Expected: True
  info: Actual:   False
  info: 
  fail: [FAIL] System.Xml.Tests.TC_SchemaSet_ProhibitDTD.v15
  info: Assert.Equal() Failure
  info: Expected: True
  info: Actual:   False
  info: 
  info: Finished:    System.Xml.XmlSchemaSet.Tests.dll
  info: 
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 258, Errors: 0, Failed: 14, Skipped: 0, Time: 2.125316s
  info: 
  info: 06:52:57.0908410 Process v8 exited with 1
        
  fail: Application has finished with exit code 1 but 0 was expected

@radical
Copy link
Member

radical commented Jun 24, 2021

Closing this, as this predates the newer set of aot test issues that are tracked with wasm-aot-test label.

@radical radical closed this as completed Jun 24, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jul 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants