-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[tests] Disables tests on Apple mobile platforms #95757
Changes from 1 commit
b72e916
63f0e6a
bc70d4f
40bc3bf
1fca9cf
34ab825
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -268,22 +268,25 @@ public void UnseekableStreams_RoundTrip(TestTarFormat testFormat) | |
|
||
[Theory] | ||
[MemberData(nameof(GetExactRootDirMatchCases))] | ||
[ActiveIssue("https://github.com/dotnet/runtime/issues/88049", TestPlatforms.iOS | TestPlatforms.tvOS)] | ||
public void ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws(TarEntryFormat format, TarEntryType entryType, string fileName) | ||
{ | ||
ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws_Internal(format, entryType, fileName, inverted: false); | ||
ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws_Internal(format, entryType, fileName, inverted: true); | ||
} | ||
|
||
[Fact] | ||
[ActiveIssue("https://github.com/dotnet/runtime/issues/88049", TestPlatforms.iOS | TestPlatforms.tvOS)] | ||
public void ExtractToDirectory_ExactRootDirMatch_Directory_Relative_Throws() | ||
{ | ||
string entryFolderName = "folder"; | ||
string destinationFolderName = "folderSibling"; | ||
|
||
#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS | ||
// the folder used to store files needs to have a shorter path on Apple mobile platforms, | ||
// because the TempDirectory gets created in folder with a path longer than 100 bytes | ||
using TempDirectory root = new TempDirectory("/Users/helix-runner/Library/Developer/CoreSimulator/Devices/tempDir"); | ||
#else | ||
using TempDirectory root = new TempDirectory(); | ||
|
||
#endif | ||
string entryFolderPath = Path.Join(root.Path, entryFolderName); | ||
string destinationFolderPath = Path.Join(root.Path, destinationFolderName); | ||
|
||
|
@@ -303,7 +306,6 @@ public void ExtractToDirectory_ExactRootDirMatch_Directory_Relative_Throws() | |
[InlineData(TarEntryFormat.Ustar)] | ||
[InlineData(TarEntryFormat.Pax)] | ||
[InlineData(TarEntryFormat.Gnu)] | ||
[ActiveIssue("https://github.com/dotnet/runtime/issues/88049", TestPlatforms.iOS | TestPlatforms.tvOS)] | ||
public void ExtractToDirectory_ExactRootDirMatch_HardLinks_Throws(TarEntryFormat format) | ||
{ | ||
ExtractToDirectory_ExactRootDirMatch_Links_Throws(format, TarEntryType.HardLink, inverted: false); | ||
|
@@ -359,8 +361,13 @@ private void ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Thro | |
string entryFolderName = inverted ? "folderSibling" : "folder"; | ||
string destinationFolderName = inverted ? "folder" : "folderSibling"; | ||
|
||
#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS | ||
// the folder used to store files needs to have a shorter path on Apple mobile platforms, | ||
// because the TempDirectory gets created in folder with a path longer than 100 bytes | ||
using TempDirectory root = new TempDirectory("/Users/helix-runner/Library/Developer/CoreSimulator/Devices/tempDir"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will try to shrink the path even more. One concern regarding this is permissions and possibility to create a particular directory. |
||
#else | ||
using TempDirectory root = new TempDirectory(); | ||
|
||
#endif | ||
string entryFolderPath = Path.Join(root.Path, entryFolderName); | ||
string destinationFolderPath = Path.Join(root.Path, destinationFolderName); | ||
|
||
|
@@ -390,8 +397,13 @@ private void ExtractToDirectory_ExactRootDirMatch_Links_Throws(TarEntryFormat fo | |
string linkTargetFileName = "file.txt"; | ||
string linkFileName = "link"; | ||
|
||
#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS | ||
// the folder used to store files needs to have a shorter path on Apple mobile platforms, | ||
// because the TempDirectory gets created in folder with a path longer than 100 bytes | ||
using TempDirectory root = new TempDirectory("/Users/helix-runner/Library/Developer/CoreSimulator/Devices/tempDir"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you have control over There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is an arbitrary name and probably we can set even shorter name. |
||
#else | ||
using TempDirectory root = new TempDirectory(); | ||
|
||
#endif | ||
string entryFolderPath = Path.Join(root.Path, entryFolderName); | ||
string destinationFolderPath = Path.Join(root.Path, destinationFolderName); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -333,22 +333,25 @@ public async Task UnseekableStreams_RoundTrip_Async(TestTarFormat testFormat) | |
|
||
[Theory] | ||
[MemberData(nameof(GetExactRootDirMatchCases))] | ||
[ActiveIssue("https://github.com/dotnet/runtime/issues/88049", TestPlatforms.iOS | TestPlatforms.tvOS)] | ||
public async Task ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws_Async(TarEntryFormat format, TarEntryType entryType, string fileName) | ||
{ | ||
await ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws_Internal_Async(format, entryType, fileName, inverted: false); | ||
await ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws_Internal_Async(format, entryType, fileName, inverted: true); | ||
} | ||
|
||
[Fact] | ||
[ActiveIssue("https://github.com/dotnet/runtime/issues/88049", TestPlatforms.iOS | TestPlatforms.tvOS)] | ||
public async Task ExtractToDirectory_ExactRootDirMatch_Directory_Relative_Throws_Async() | ||
{ | ||
string entryFolderName = "folder"; | ||
string destinationFolderName = "folderSibling"; | ||
|
||
#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS | ||
// the folder used to store files needs to have a shorter path on Apple mobile platforms, | ||
// because the TempDirectory gets created in folder with a path longer than 100 bytes | ||
using TempDirectory root = new TempDirectory("/Users/helix-runner/Library/Developer/CoreSimulator/Devices/tempDir"); | ||
#else | ||
using TempDirectory root = new TempDirectory(); | ||
|
||
#endif | ||
string entryFolderPath = Path.Join(root.Path, entryFolderName); | ||
string destinationFolderPath = Path.Join(root.Path, destinationFolderName); | ||
|
||
|
@@ -368,7 +371,6 @@ public async Task ExtractToDirectory_ExactRootDirMatch_Directory_Relative_Throws | |
[InlineData(TarEntryFormat.Ustar)] | ||
[InlineData(TarEntryFormat.Pax)] | ||
[InlineData(TarEntryFormat.Gnu)] | ||
[ActiveIssue("https://github.com/dotnet/runtime/issues/88049", TestPlatforms.iOS | TestPlatforms.tvOS)] | ||
public async Task ExtractToDirectory_ExactRootDirMatch_HardLinks_Throws_Async(TarEntryFormat format) | ||
{ | ||
await ExtractToDirectory_ExactRootDirMatch_Links_Throws_Async(format, TarEntryType.HardLink, inverted: false); | ||
|
@@ -424,8 +426,13 @@ private async Task ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Director | |
string entryFolderName = inverted ? "folderSibling" : "folder"; | ||
string destinationFolderName = inverted ? "folder" : "folderSibling"; | ||
|
||
#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS | ||
// the folder used to store files needs to have a shorter path on Apple mobile platforms, | ||
// because the TempDirectory gets created in folder with a path longer than 100 bytes | ||
using TempDirectory root = new TempDirectory("/Users/helix-runner/Library/Developer/CoreSimulator/Devices/tempDir"); | ||
#else | ||
using TempDirectory root = new TempDirectory(); | ||
|
||
#endif | ||
string entryFolderPath = Path.Join(root.Path, entryFolderName); | ||
string destinationFolderPath = Path.Join(root.Path, destinationFolderName); | ||
|
||
|
@@ -455,8 +462,13 @@ private Task ExtractToDirectory_ExactRootDirMatch_Links_Throws_Async(TarEntryFor | |
string linkTargetFileName = "file.txt"; | ||
string linkFileName = "link"; | ||
|
||
#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS | ||
// the folder used to store files needs to have a shorter path on Apple mobile platforms, | ||
// because the TempDirectory gets created in folder with a path longer than 100 bytes | ||
using TempDirectory root = new TempDirectory("/Users/helix-runner/Library/Developer/CoreSimulator/Devices/tempDir"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please store the string |
||
#else | ||
using TempDirectory root = new TempDirectory(); | ||
|
||
#endif | ||
string entryFolderPath = Path.Join(root.Path, entryFolderName); | ||
string destinationFolderPath = Path.Join(root.Path, destinationFolderName); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work on simulator and maybe catalyst, but should fail on device. As far as I know, there's no way to shrink the app bundle path (where your app gets a tmp directory).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the
TempDirectory
class, it is possible to specify the full path:One concern regarding this is permissions and possibility to create a particular directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the
#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS
condition in the library test is evaluated asFALSE
on Apple mobile targets. Without the macro condition and with shorter temporary directoryusing TempDirectory root = new TempDirectory("/Users/helix-runner/tmp");
the tests seem to work on Apple mobile targets.