Skip to content

Commit eea9eb6

Browse files
author
agoloman
committed
Revert "Bug 1906827 part 3 - make cppunittests run on AArch64 r=ci-and-tooling,taskgraph-reviewers,jmaher,yjuglaret" for causing snap failures.
This reverts commit a22f558. Revert "Bug 1906827 part 2 - add tests and make all cppunittests pass on ARM64 r=yjuglaret" This reverts commit ad7e8a0. Revert "Bug 1906827 part 1 - correctly handle BR instructions for patching in ARM64 r=yjuglaret,win-reviewers" This reverts commit 803b433.
1 parent edf2a79 commit eea9eb6

File tree

9 files changed

+13
-86
lines changed

9 files changed

+13
-86
lines changed

taskcluster/gecko_taskgraph/transforms/test/worker.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@
9090
"virtual": "win11-64-24h2",
9191
"virtual-with-gpu": "win11-64-24h2-gpu",
9292
},
93-
"windows11-aarch64-24h2": {
94-
"virtual": "win11-a64-24h2",
95-
},
9693
}
9794

9895
# os x worker types keyed by test-platform

taskcluster/kinds/build/windows.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,6 @@ win64-aarch64/debug:
14501450
max-run-time: 7200
14511451
env:
14521452
PERFHERDER_EXTRA_OPTIONS: aarch64
1453-
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
14541453
run:
14551454
actions: [get-secrets, build]
14561455
options: [append-env-variables-from-configs]
@@ -1503,7 +1502,6 @@ win64-aarch64/opt:
15031502
max-run-time: 7200
15041503
env:
15051504
PERFHERDER_EXTRA_OPTIONS: aarch64
1506-
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
15071505
run:
15081506
actions: [get-secrets, build]
15091507
options: [append-env-variables-from-configs]

taskcluster/test_configs/test-platforms.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -295,17 +295,6 @@ windows11-64-24h2-nightlyasrelease/opt:
295295
test-sets:
296296
- browsertime
297297

298-
# windows11-64-aarch64
299-
windows11-aarch64-24h2/opt:
300-
build-platform: win64-aarch64/opt
301-
test-sets:
302-
- windows-aarch64-tests
303-
304-
windows11-aarch64-24h2/debug:
305-
build-platform: win64-aarch64/debug
306-
test-sets:
307-
- windows-aarch64-tests
308-
309298
##
310299
# MacOS X platforms (matching /macosx.*/)
311300

taskcluster/test_configs/test-sets.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,6 @@ windows32-tests:
296296
- web-platform-tests
297297
- web-platform-tests-crashtest
298298

299-
windows-aarch64-tests:
300-
- cppunittest
301-
302299
windows10-2009-tests:
303300
- cppunittest
304301
- gtest

testing/cppunittest.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
["TestAlgorithm"]
66

7-
["TestArm64Disassembler"]
8-
run-if = ["os == 'win' && processor == 'aarch64'"]
9-
107
["TestArray"]
118

129
["TestArrayUtils"]
@@ -50,7 +47,10 @@ run-if = ["os == 'win'"]
5047
run-if = ["os == 'win'"]
5148

5249
["TestDllInterceptorCrossProcess"]
53-
run-if = ["os == 'win' && processor != 'aarch64'"]
50+
run-if = [
51+
"os == 'win' && processor == 'x86'",
52+
"os == 'win' && processor == 'x86_64'",
53+
]
5454

5555
["TestDoublyLinkedList"]
5656

@@ -75,7 +75,6 @@ run-if = ["os == 'win' && processor != 'aarch64'"]
7575
["TestIATPatcher"]
7676
run-if = ["os == 'win'"]
7777
skip-if = [
78-
"processor == 'aarch64'", # requires administrator permission on aarch64
7978
"win11_2009 && bits == 32", # fails on windows10x32
8079
"os == 'win' && os_version == '11.26100' && processor == 'x86'", # fails on win/x86
8180
]

toolkit/xre/dllservices/mozglue/interceptor/Arm64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ MFBT_API LoadOrBranch BUncondImmDecode(const uintptr_t aPC,
5050
// Order is important here; more specific encoding tests must be placed before
5151
// less specific encoding tests.
5252
static const PCRelativeLoadTest gPCRelTests[] = {
53-
{0xFEFF0000, 0xD63F0000, nullptr}, // BLR branch w/ link (reg)
5453
{0x9F000000, 0x10000000, nullptr}, // ADR
5554
{0x9F000000, 0x90000000, &ADRPDecode}, // ADRP
5655
{0xFF000000, 0x58000000, nullptr}, // LDR (literal) 64-bit GPR
@@ -59,6 +58,7 @@ static const PCRelativeLoadTest gPCRelTests[] = {
5958
{0xFE000000, 0x54000000, nullptr}, // B.Cond
6059
{0x7E000000, 0x34000000, nullptr}, // Compare and branch (imm)
6160
{0x7E000000, 0x36000000, nullptr}, // Test and branch (imm)
61+
{0xFE000000, 0xD6000000, nullptr} // Unconditional branch (reg)
6262
};
6363

6464
/**

toolkit/xre/dllservices/tests/TestArm64Disassembler.cpp

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@
2626
using namespace mozilla;
2727
using namespace mozilla::interceptor::arm64;
2828

29-
constexpr uintptr_t kExamplePCValue = 0x7ff959a7ea80;
30-
3129
bool TestCheckForPCRelAdrp() {
3230
// A real-world example from bug 1964688 comment 5:
3331
// 00007ff9`59a7ea80 d0dfff11 adrp xip1,00007ff9`19a60000
3432
Result<LoadOrBranch, PCRelCheckError> result =
35-
CheckForPCRel(kExamplePCValue, 0xd0dfff11);
33+
CheckForPCRel(0x7ff959a7ea80, 0xd0dfff11);
3634
if (result.isErr()) {
3735
auto error = result.unwrapErr();
3836
TEST_FAILED(
@@ -67,7 +65,7 @@ bool TestCheckForPCRelAdr() {
6765
// Fictional example with adr:
6866
// 00007ff959a7ea80 50dfff11 adr x17, #0x7ff959a3ea62
6967
Result<LoadOrBranch, PCRelCheckError> result =
70-
CheckForPCRel(kExamplePCValue, 0x50dfff11);
68+
CheckForPCRel(0x7ff959a7ea80, 0x50dfff11);
7169

7270
// For the moment we expect to recognize adr instructions but we don't have
7371
// a decoder
@@ -92,56 +90,8 @@ bool TestCheckForPCRelAdr() {
9290
return true;
9391
}
9492

95-
bool TestCheckForPCRelBlr() {
96-
// blr x16
97-
Result<LoadOrBranch, PCRelCheckError> result =
98-
CheckForPCRel(kExamplePCValue, 0xd63f0200);
99-
100-
if (!result.isErr()) {
101-
TEST_FAILED(
102-
"Unexpectedly recognized blr as a PC-relative instruction with a "
103-
"decoder. If you have implemented a decoder for this instruction, "
104-
"please update TestArm64Disassembler.cpp.\n");
105-
}
106-
107-
auto error = result.unwrapErr();
108-
if (error != PCRelCheckError::NoDecoderAvailable) {
109-
TEST_FAILED(
110-
"Failed to recognize blr as a PC-relative instruction, got "
111-
"PCRelCheckError %d.\n",
112-
error);
113-
}
114-
115-
TEST_PASS(
116-
"Properly recognized blr as a PC-relative instruction without a "
117-
"decoder.\n");
118-
return true;
119-
}
120-
121-
bool TestCheckForPCRelBr() {
122-
// br x16
123-
Result<LoadOrBranch, PCRelCheckError> result =
124-
CheckForPCRel(kExamplePCValue, 0xd61f0200);
125-
126-
if (result.isErr()) {
127-
auto error = result.unwrapErr();
128-
if (error != PCRelCheckError::InstructionNotPCRel) {
129-
TEST_FAILED(
130-
"Failed to recognize br as a non-PC-relative instruction, got "
131-
"PCRelCheckError %d.\n",
132-
error);
133-
}
134-
} else {
135-
TEST_FAILED("Incorrectly recognized br as a PC-relative instruction.\n");
136-
}
137-
138-
TEST_PASS("Properly recognized br as a non-PC-relative instruction.\n");
139-
return true;
140-
}
141-
14293
int wmain(int argc, wchar_t* argv[]) {
143-
if (!TestCheckForPCRelAdrp() || !TestCheckForPCRelAdr() ||
144-
!TestCheckForPCRelBlr() || !TestCheckForPCRelBr()) {
94+
if (!TestCheckForPCRelAdrp() || !TestCheckForPCRelAdr()) {
14595
return -1;
14696
}
14797
return 0;

toolkit/xre/dllservices/tests/TestDllInterceptor.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -848,10 +848,10 @@ MOZ_GLOBINIT struct TestCase {
848848
TestCase("LockPrefix", NoStubAddressCheck),
849849
TestCase("LooksLikeLockPrefix", NoStubAddressCheck),
850850
# endif
851-
# if !defined(_M_ARM64) && !defined(DEBUG)
851+
# if !defined(DEBUG)
852852
// Skip on Debug build because it hits MOZ_ASSERT_UNREACHABLE.
853853
TestCase("UnsupportedOp", ExpectedFail),
854-
# endif // !defined(_M_ARM64) && !defined(DEBUG)
854+
# endif // !defined(DEBUG)
855855
#endif // defined(__clang__)
856856
};
857857

@@ -892,9 +892,7 @@ bool TestAssemblyFunctions() {
892892
DetourResultCode::DETOUR_PATCHER_CREATE_TRAMPOLINE_ERROR) {
893893
printf(
894894
"TEST-FAILED | WindowsDllInterceptor | "
895-
"A wrong detour errorcode was set on detour error for %s. (got "
896-
"%d)\n",
897-
testCase.mFunctionName, maybeError.ref().mErrorCode);
895+
"A wrong detour errorcode was set on detour error.\n");
898896
return false;
899897
}
900898
#endif // defined(NIGHTLY_BUILD)

toolkit/xre/dllservices/tests/moz.build

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,18 @@ GeckoCppUnitTests(
88
[
99
"TestDllBlocklistAssumptions",
1010
"TestDllInterceptor",
11+
"TestIATPatcher",
1112
"TestMMPolicy",
1213
"TestOleAut32Initialization",
1314
],
1415
linkage=None,
1516
)
1617

1718
if CONFIG["TARGET_CPU"] in ("x86", "x86_64"):
19+
# Cross-process interceptors not yet supported on aarch64
1820
GeckoCppUnitTests(
1921
[
20-
# Cross-process interceptors not yet supported on aarch64
2122
"TestDllInterceptorCrossProcess",
22-
# Requires administrator permission on aarch64
23-
"TestIATPatcher",
2423
],
2524
linkage=None,
2625
)

0 commit comments

Comments
 (0)