Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
af4402c
Upgrade emsdk to 5.0.6
akoeplinger Jun 11, 2026
64a07bf
Add general-testing feed
akoeplinger Jun 11, 2026
5c431c3
rebase
pavelsavara May 26, 2026
1cc4928
Remove lbulkmemory
akoeplinger Jun 11, 2026
f0619f9
Update to llvm 23.x
akoeplinger Jun 11, 2026
ea8bd08
Fix llvm version check in src/mono/CMakeLists.txt
akoeplinger Jun 11, 2026
813760c
Fix llvm warnings/errors
akoeplinger Jun 11, 2026
b6e6b73
Don't mark Browser as LowTemporalResolution anymore
akoeplinger Jun 12, 2026
4113f8e
don't node flush streams in a browser
pavelsavara Jun 12, 2026
fa8db40
export memory from Module
pavelsavara Jun 12, 2026
89d50f1
[mono][llvm] Fix sign-extension bug in const_int8/const_int32
akoeplinger Jun 12, 2026
64eaad9
Update llvm
akoeplinger Jun 12, 2026
3bcf4d0
balance clearTimeout
pavelsavara Jun 12, 2026
0dab167
balance runtimeKeepalivePop
pavelsavara Jun 12, 2026
5ad201d
WASM_BIGINT=0 for node testing
pavelsavara Jun 12, 2026
8c992af
fix WasmEnableExceptionHandling=false
pavelsavara Jun 12, 2026
273e1e1
improve sample
pavelsavara Jun 12, 2026
95feacd
Use the standardized Wasm EH proposal (exnref / try_table / throw_ref…
pavelsavara Jun 12, 2026
a374f19
Refine comments regarding millisecond granularity support
akoeplinger Jun 12, 2026
696eb47
[mono][llvm] Fix sign-extension bug in emit_div_check and il_state init
akoeplinger Jun 13, 2026
938a82e
Update llvm
akoeplinger Jun 13, 2026
53a6d16
disable WASM_BIGINT for corerun - NodeJS
pavelsavara Jun 13, 2026
6860d5c
for nodejs: --experimental-wasm-exnref
pavelsavara Jun 13, 2026
d38a699
- change wasm exception instructions detection
pavelsavara Jun 13, 2026
65e869a
bump nodejs
pavelsavara Jun 13, 2026
25cf5ae
kg feedback
pavelsavara Jun 13, 2026
5a9bb28
Merge branch 'main' into emsdk-upgrade
pavelsavara Jun 14, 2026
09623f5
v8 --experimental-wasm-exnref
pavelsavara Jun 14, 2026
7f3a839
Bump FireFox to 140.11.0esr
pavelsavara Jun 14, 2026
720eeb7
Update llvm
akoeplinger Jun 14, 2026
3f12bfc
[mono][llvm] Sign-extend OP_COMPARE_IMM immediate to pointer width
akoeplinger Jun 13, 2026
e844864
Patch WABT dotnet-install script so it can install the CI build
akoeplinger Jun 14, 2026
42c178c
Log output of HasNonZeroNanoseconds
akoeplinger Jun 14, 2026
2d47b4c
Reenable some tests now that emscripten 3.1.74+ supports distinct fil…
akoeplinger Jun 14, 2026
d9a5256
export memory from Module
pavelsavara Jun 12, 2026
a7a8e0d
don't node flush streams in a browser
pavelsavara Jun 12, 2026
0aea51d
WASM_BIGINT=0 for node testing
pavelsavara Jun 12, 2026
3a24a58
balance runtimeKeepalivePop
pavelsavara Jun 12, 2026
c9fa612
balance clearTimeout
pavelsavara Jun 12, 2026
2f3d9c2
disable WASM_BIGINT for corerun - NodeJS
pavelsavara Jun 13, 2026
549e9fd
Bump FireFox to 140.11.0esr
pavelsavara Jun 14, 2026
b37867b
feedback
pavelsavara Jun 14, 2026
26fc32b
Revert eng/common changes, these are unrelated
akoeplinger Jun 14, 2026
f3240db
Copilot feedback
akoeplinger Jun 14, 2026
151ecdd
improve runtimeKeepalivePop()
pavelsavara Jun 14, 2026
10a3963
WASM_BIGINT feedback
pavelsavara Jun 14, 2026
eac18a9
Merge branch 'main' into emsdk-upgrade-prep
pavelsavara Jun 14, 2026
0bc6b22
cleanup
pavelsavara Jun 14, 2026
b65c0a6
Potential fix for pull request finding
pavelsavara Jun 14, 2026
2dde4e9
feedback
pavelsavara Jun 14, 2026
09b3119
Merge branch 'emsdk-upgrade-prep' into emsdk-upgrade
pavelsavara Jun 14, 2026
68e3aef
Fix item syntax in WriteLinesToFile
akoeplinger Jun 14, 2026
bbb9594
Remove obsolete Browser/WASI workaround in SetAccessOrWriteTimeCore
akoeplinger Jun 14, 2026
d285468
Improve handling of various filesystem precisions in tests
akoeplinger Jun 14, 2026
bfcda1d
Merge branch 'emsdk-upgrade' of https://github.com/dotnet/runtime int…
pavelsavara Jun 14, 2026
2c60688
Fix whitespace
akoeplinger Jun 14, 2026
cd4af45
postpone new exception instructions
pavelsavara Jun 14, 2026
4a68a47
apply new exception instructions
pavelsavara Jun 14, 2026
c947bf2
Fix dotnet-install script replacement
akoeplinger Jun 14, 2026
9473803
Merge branch 'emsdk-upgrade' into emsdk-upgrade-wasm_exceptions
pavelsavara Jun 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<add key="dotnet11" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet11/nuget/v3/index.json" />
<add key="dotnet11-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet11-transport/nuget/v3/index.json" />
<add key="dotnet-diagnostics-tests" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-diagnostics-tests/nuget/v3/index.json" />
<add key="general-testing" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
Expand Down
3 changes: 2 additions & 1 deletion docs/workflow/building/coreclr/wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ In config below please replace `/path/to/runtime/` by a **absolute unix path** t
"<node_internals>/**"
],
"runtimeArgs": [
"--stack-trace-limit=1000"
"--stack-trace-limit=10000",
"--experimental-wasm-exnref"
],
"args": [
"HelloWorld.dll"
Expand Down
152 changes: 76 additions & 76 deletions eng/Version.Details.props

Large diffs are not rendered by default.

272 changes: 136 additions & 136 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<EmsdkPackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</EmsdkPackageVersion>
<NodePackageVersion>$(runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)</NodePackageVersion>
<!-- The package path for python in src/mono/mono.proj needs to be updated if this changes-->
<EmsdkVersion>3.1.56</EmsdkVersion>
<EmsdkVersion>5.0.6</EmsdkVersion>
<!-- WiX 5+ dependencies for MSI generation -->
<SwixPackageVersion>1.1.87-gba258badda</SwixPackageVersion>
<WixPackageVersion>1.0.0-v3.14.0.5722</WixPackageVersion>
Expand Down
11 changes: 11 additions & 0 deletions eng/native.wasm.targets
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@
<Target Name="GenerateEmccExports" Condition="'$(TargetsBrowser)' == 'true'">
<ItemGroup>
<EmccExportedRuntimeMethod Include="FS" />
<EmccExportedRuntimeMethod Include="HEAP8" />
<EmccExportedRuntimeMethod Include="HEAP16" />
<EmccExportedRuntimeMethod Include="HEAPU8" />
<EmccExportedRuntimeMethod Include="HEAPU16" />
<EmccExportedRuntimeMethod Include="HEAP32" />
<EmccExportedRuntimeMethod Include="HEAPU32" />
<EmccExportedRuntimeMethod Include="HEAPF32" />
<EmccExportedRuntimeMethod Include="HEAPF64" />
<!-- HEAP64+HEAPU64 are removed for corerun under NodeJS -->
<EmccExportedRuntimeMethod Include="HEAP64" />
<EmccExportedRuntimeMethod Include="HEAPU64" />
<EmccExportedRuntimeMethod Include="out" />
<EmccExportedRuntimeMethod Include="err" />
<EmccExportedRuntimeMethod Include="ccall" />
Expand Down
3 changes: 2 additions & 1 deletion eng/native/configureplatform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -503,11 +503,11 @@ else()
if(CLR_CMAKE_RUNTIME_CORECLR)
if(CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CROSS_COMPONENTS_BUILD)
add_link_options(-fwasm-exceptions)
add_link_options(-sWASM_LEGACY_EXCEPTIONS=0)
add_link_options(-Wno-unused-command-line-argument)
add_link_options(-Wl,--error-limit=0)

add_link_options(-nostdlib)
add_link_options(-lbulkmemory)
add_link_options(-lstubs)
add_link_options(-lc)
add_link_options(-lmalloc)
Expand All @@ -517,6 +517,7 @@ else()
add_link_options(-lunwind)

add_compile_options(-fwasm-exceptions)
add_compile_options(-sWASM_LEGACY_EXCEPTIONS=0)
add_compile_options(-mbulk-memory)
add_compile_options(-msimd128)
endif()
Expand Down
4 changes: 2 additions & 2 deletions eng/native/tryrun.browser.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# IMPORTANT: This file is specific to the Emscripten version and WebAssembly target.
#
# Valid for:
# - Emscripten version: 3.1.56
# - Emscripten version: 5.0.6
# - Target: wasm32-unknown-emscripten (browser-wasm)
# - Architecture: wasm32
# - OS: browser/Emscripten
Expand Down Expand Up @@ -85,7 +85,7 @@
# mv eng/native/tryrun.browser.cmake.bak eng/native/tryrun.browser.cmake

# Version tracking: This cache is valid for the following Emscripten version
set(TRYRUN_BROWSER_EMSCRIPTEN_VERSION "3.1.56" CACHE INTERNAL "Emscripten version this cache was generated for")
set(TRYRUN_BROWSER_EMSCRIPTEN_VERSION "5.0.6" CACHE INTERNAL "Emscripten version this cache was generated for")

# Macro to set cache values (same as eng/native/tryrun.cmake)
macro(set_cache_value)
Expand Down
8 changes: 4 additions & 4 deletions eng/testing/BrowserVersions.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<win_ChromeRevision>1625079</win_ChromeRevision>
<win_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1625123</win_ChromeBaseSnapshotUrl>
<win_V8Version>14.9.207</win_V8Version>
<linux_FirefoxRevision>125.0.1</linux_FirefoxRevision>
<linux_GeckoDriverRevision>0.34.0</linux_GeckoDriverRevision>
<win_FirefoxRevision>125.0.1</win_FirefoxRevision>
<win_GeckoDriverRevision>0.34.0</win_GeckoDriverRevision>
<linux_FirefoxRevision>140.11.0esr</linux_FirefoxRevision>
<linux_GeckoDriverRevision>0.37.0</linux_GeckoDriverRevision>
<win_FirefoxRevision>140.11.0esr</win_FirefoxRevision>
<win_GeckoDriverRevision>0.37.0</win_GeckoDriverRevision>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion eng/testing/WasmRunnerTemplate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if /I [%XHARNESS_COMMAND%] == [test] (
)

if [%JS_ENGINE_ARGS%] == [] (
set "JS_ENGINE_ARGS=--engine-arg^=--stack-trace-limit^=1000"
set "JS_ENGINE_ARGS=--engine-arg^=--stack-trace-limit^=1000 --engine-arg^=--experimental-wasm-exnref"
)
) else (
if /I [%SCENARIO%] == [WasmTestOnChrome] (
Expand Down
2 changes: 1 addition & 1 deletion eng/testing/WasmRunnerTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then
fi

if [[ -z "$JS_ENGINE_ARGS" ]]; then
JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000"
JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000 --engine-arg=--experimental-wasm-exnref"
fi
else
if [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion eng/testing/wasm-provisioning.targets
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<GeckoDriverDir>$(ArtifactsBinDir)geckodriver\</GeckoDriverDir>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('linux'))">
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(linux_FirefoxRevision)/linux-x86_64/en-US/firefox-$(linux_FirefoxRevision).tar.bz2</FirefoxUrl>
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(linux_FirefoxRevision)/linux-x86_64/en-US/firefox-$(linux_FirefoxRevision).tar.xz</FirefoxUrl>
<GeckoDriverUrl>https://github.com/mozilla/geckodriver/releases/download/v$(linux_GeckoDriverRevision)/geckodriver-v$(linux_GeckoDriverRevision)-linux64.tar.gz</GeckoDriverUrl>
<FirefoxBinaryName>firefox</FirefoxBinaryName>
<GeckoDriverBinaryName>geckodriver</GeckoDriverBinaryName>
Expand Down
8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"dotnet": "11.0.100-preview.5.26227.104"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26302.118",
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26302.118",
"Microsoft.DotNet.SharedFramework.Sdk": "11.0.0-beta.26302.118",
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26311.101",
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26311.101",
"Microsoft.DotNet.SharedFramework.Sdk": "11.0.0-beta.26311.101",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0",
"Microsoft.NET.Sdk.IL": "11.0.0-preview.6.26302.118"
"Microsoft.NET.Sdk.IL": "11.0.0-preview.6.26311.101"
}
}
39 changes: 18 additions & 21 deletions src/coreclr/hosts/corerun/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,24 @@ else()
LINK_DEPENDS "${JS_CORE_RUN};${JS_CORE_RUN_EXTPOST};${JS_SYSTEM_NATIVE_BROWSER};${JS_SYSTEM_BROWSER_UTILS};"
LINK_FLAGS "--js-library ${JS_SYSTEM_NATIVE_BROWSER} --js-library ${JS_SYSTEM_BROWSER_UTILS} --js-library ${JS_CORE_RUN} --extern-post-js ${JS_CORE_RUN_EXTPOST}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
if (CORERUN_IN_BROWSER)
target_link_options(corerun PRIVATE -sWASM_BIGINT=1)
# Include the virtual file system data for the browser scenario.
set(WASM_PRELOAD_DIR "${CMAKE_INSTALL_PREFIX}/IL")
if (EXISTS "${WASM_PRELOAD_DIR}")
target_link_options(corerun PRIVATE --preload-file ${WASM_PRELOAD_DIR}@/)
endif()
else()
# Node.js doesn't have good support for WASM_BIGINT, so disable it for the Node/shell.
target_link_options(corerun PRIVATE -sWASM_BIGINT=0)

# remove HEAP64 and HEAPU64 from CMAKE_EMCC_EXPORTED_RUNTIME_METHODS
string(REPLACE "HEAP64," "" CMAKE_EMCC_EXPORTED_RUNTIME_METHODS "${CMAKE_EMCC_EXPORTED_RUNTIME_METHODS}")
string(REPLACE "HEAPU64," "" CMAKE_EMCC_EXPORTED_RUNTIME_METHODS "${CMAKE_EMCC_EXPORTED_RUNTIME_METHODS}")

# Add Node.js host file system support.
target_link_options(corerun PRIVATE -sNODERAWFS=1 -lnodefs.js)
endif()
target_link_options(corerun PRIVATE
-sINITIAL_MEMORY=134217728
-sMAXIMUM_MEMORY=4294967296
Expand All @@ -96,27 +114,6 @@ else()
-Wl,--export=__stack_pointer
-Wl,--export=__coreclr_wasm_rtlrestorecontext_tag
-Wl,--error-limit=0)

if (CORERUN_IN_BROWSER)
# Node.js doesn't have good support for WASM_BIGINT
# so it only is added when running in the browser.
target_link_options(corerun PRIVATE
-sWASM_BIGINT=1)

# Include the virtual file system data for the
# browser scenario.
set(WASM_PRELOAD_DIR "${CMAKE_INSTALL_PREFIX}/IL")
if (EXISTS "${WASM_PRELOAD_DIR}")
target_link_options(corerun PRIVATE
--preload-file ${WASM_PRELOAD_DIR}@/)
endif()
else()
# If not running in the browser, add
# Node.js file system support.
target_link_options(corerun PRIVATE
-sNODERAWFS=1
-lnodefs.js)
endif()
endif()

if (CORERUN_IN_BROWSER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,6 @@ private unsafe void SetAccessOrWriteTimeCore(SafeFileHandle? handle, string? pat
long seconds = time.ToUnixTimeSeconds();
long nanoseconds = UnixTimeSecondsToNanoseconds(time, seconds);

#if TARGET_BROWSER || TARGET_WASI
buf[0].TvSec = seconds;
buf[0].TvNsec = nanoseconds;
buf[1].TvSec = seconds;
buf[1].TvNsec = nanoseconds;
#else
if (isAccessTime)
{
buf[0].TvSec = seconds;
Expand All @@ -414,7 +408,6 @@ private unsafe void SetAccessOrWriteTimeCore(SafeFileHandle? handle, string? pat
buf[1].TvSec = seconds;
buf[1].TvNsec = nanoseconds;
}
#endif
int rv = handle is not null
? Interop.Sys.FUTimens(handle, buf)
: Interop.Sys.UTimensat(path!, buf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,18 @@ namespace System.IO.Tests
{
public abstract class BaseGetSetTimes<T> : FileSystemTest
{
protected const string HFS = "hfs";
public delegate void SetTime(T item, DateTime time);
public delegate DateTime GetTime(T item);
// AppContainer restricts access to DriveFormat (::GetVolumeInformation)
private static string driveFormat = PlatformDetection.IsInAppContainer ? string.Empty : new DriveInfo(Path.GetTempPath()).DriveFormat;

protected static bool isHFS => driveFormat != null && driveFormat.Equals(HFS, StringComparison.InvariantCultureIgnoreCase);
private static bool isHFS => driveFormat != null && driveFormat.Equals("hfs", StringComparison.InvariantCultureIgnoreCase);

protected static bool LowTemporalResolution => PlatformDetection.IsBrowser || isHFS;
protected static bool HighTemporalResolution => !LowTemporalResolution;

private static void CheckHighTemporalResolution()
{
if (!HighTemporalResolution)
throw new SkipTestException(nameof(HighTemporalResolution));
}

private static void CheckLowTemporalResolution()
{
if (!LowTemporalResolution)
throw new SkipTestException(nameof(LowTemporalResolution));
}
protected static bool SecondTemporalResolution => true;
protected static bool MilliSecondTemporalResolution => SecondTemporalResolution && !isHFS; // HFS only supports temporal resolution of 1 second
protected static bool NanoSecondTemporalResolution => MilliSecondTemporalResolution && !PlatformDetection.IsBrowser; // Browser does not support nanosecond resolution
protected static bool NotMilliSecondTemporalResolution => !MilliSecondTemporalResolution;
protected static bool NotNanoSecondTemporalResolution => !NanoSecondTemporalResolution;

protected abstract bool CanBeReadOnly { get; }

Expand Down Expand Up @@ -83,8 +73,7 @@ private void SettingUpdatesPropertiesCore(T item, T? linkTarget = default)
bool isLink = linkTarget is not null;

// Checking that milliseconds are not dropped after setter.
// Emscripten drops milliseconds in Browser
DateTime dt = new DateTime(2014, 12, 1, 12, 3, 3, LowTemporalResolution ? 0 : 321, function.Kind);
DateTime dt = new DateTime(2014, 12, 1, 12, 3, 3, NotMilliSecondTemporalResolution ? 0 : 321, function.Kind);
function.Setter(item, dt);

T getTarget = !isLink || ApiTargetsLink ? item : linkTarget;
Expand Down Expand Up @@ -181,7 +170,6 @@ public void SettingPropertiesOnSymlink(bool targetExists)
}

[Fact]
[PlatformSpecific(~TestPlatforms.Browser)] // Browser is excluded as there is only 1 effective time store.
public void SettingUpdatesPropertiesAfterAnother()
{
T item = GetExistingItem();
Expand Down Expand Up @@ -219,9 +207,9 @@ public void SettingUpdatesPropertiesAfterAnother()
bool reverse = functions.reverse;

// Checking that milliseconds are not dropped after setter.
DateTime dt1 = new DateTime(2002, 12, 1, 12, 3, 3, LowTemporalResolution ? 0 : 321, DateTimeKind.Utc);
DateTime dt2 = new DateTime(2001, 12, 1, 12, 3, 3, LowTemporalResolution ? 0 : 321, DateTimeKind.Utc);
DateTime dt3 = new DateTime(2000, 12, 1, 12, 3, 3, LowTemporalResolution ? 0 : 321, DateTimeKind.Utc);
DateTime dt1 = new DateTime(2002, 12, 1, 12, 3, 3, NotMilliSecondTemporalResolution ? 0 : 321, DateTimeKind.Utc);
DateTime dt2 = new DateTime(2001, 12, 1, 12, 3, 3, NotMilliSecondTemporalResolution ? 0 : 321, DateTimeKind.Utc);
DateTime dt3 = new DateTime(2000, 12, 1, 12, 3, 3, NotMilliSecondTemporalResolution ? 0 : 321, DateTimeKind.Utc);
if (reverse) //reverse the order of setting dates
{
(dt1, dt3) = (dt3, dt1);
Expand All @@ -245,10 +233,12 @@ public void CanGetAllTimesAfterCreation()
ValidateSetTimes(item, beforeTime, afterTime);
}

[ConditionalFact] // OSX HFS driver format and Browser platform do not support millisec granularity
[ConditionalFact]
public void TimesIncludeMillisecondPart()
{
CheckHighTemporalResolution();
if (!MilliSecondTemporalResolution)
throw new SkipTestException(nameof(MilliSecondTemporalResolution));

T item = GetExistingItem();
Assert.All(TimeFunctions(), (function) =>
{
Expand Down Expand Up @@ -279,11 +269,12 @@ public void TimesIncludeMillisecondPart()
}

[ConditionalFact]
public void TimesIncludeMillisecondPart_LowTempRes()
public void TimesNotIncludeMillisecondPart()
{
CheckLowTemporalResolution();
if (MilliSecondTemporalResolution)
throw new SkipTestException(nameof(MilliSecondTemporalResolution));

T item = GetExistingItem();
// OSX HFS driver format and Browser do not support millisec granularity
Assert.All(TimeFunctions(), (function) =>
{
DateTime time = function.Getter(item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,7 @@ public void CopyFileWithData(char[] data, bool readOnly)
}

// Ensure last write/access time on the new file is appropriate
//
// For browser, there is technically only 1 time. It's the max
// of LastWrite and LastAccess. On browser, File.SetLastWriteTime
// overwrites LastWrite and LastAccess, and File.Copy
// overwrites LastWrite , so this check doesn't apply.
if (PlatformDetection.IsNotBrowser)
{
Assert.InRange(File.GetLastWriteTimeUtc(testFileDest), lastWriteTime.AddSeconds(-1), lastWriteTime.AddSeconds(1));
}
Assert.InRange(File.GetLastWriteTimeUtc(testFileDest), lastWriteTime.AddSeconds(-1), lastWriteTime.AddSeconds(1));

Assert.Equal(readOnly, (File.GetAttributes(testFileDest) & FileAttributes.ReadOnly) != 0);
if (readOnly)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public override IEnumerable<TimeFunction> TimeFunctions(bool requiresRoundtrippi
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/83197", TestPlatforms.Browser)]
public void SetLastWriteTimeTicks()
{
string firstFile = GetTestFilePath();
Expand All @@ -153,7 +152,7 @@ public void SetLastWriteTimeTicks()
Assert.True(firstFileTicks <= secondFileTicks, $"First File Ticks\t{firstFileTicks}\nSecond File Ticks\t{secondFileTicks}");
}

[ConditionalFact(typeof(File_GetSetTimes), nameof(HighTemporalResolution))] // OSX HFS driver format/Browser Platform do not support nanosecond granularity.
[ConditionalFact(typeof(File_GetSetTimes), nameof(NanoSecondTemporalResolution))]
public void SetUptoNanoseconds()
{
string file = GetTestFilePath();
Expand Down Expand Up @@ -185,7 +184,6 @@ public void SetDateTimeMax()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/83197", TestPlatforms.Browser)]
public void SetLastAccessTimeTicks()
{
string firstFile = GetTestFilePath();
Expand Down
Loading
Loading