Skip to content

Commit 382ccf0

Browse files
authored
Fix UnsupportedOS issue (#2408)
This was introduced by dotnet/runtime#68432. We need to mark the test as not runnable on the platforms where we are missing this property
1 parent 7b11416 commit 382ccf0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/benchmarks/micro/libraries/System.Net.NetworkInformation/NetworkInterfaceTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ public class NetworkInterfaceTests
1515
public NetworkInterface[] GetAllNetworkInterfaces() => NetworkInterface.GetAllNetworkInterfaces();
1616

1717
[Benchmark]
18+
#if NET5_0_OR_GREATER
19+
[System.Runtime.Versioning.UnsupportedOSPlatform("osx")]
20+
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
21+
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
22+
[System.Runtime.Versioning.UnsupportedOSPlatform("freebsd")]
23+
#endif
1824
public void GetAllNetworkInterfacesProperties()
1925
{
2026
foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())

0 commit comments

Comments
 (0)