summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2019-04-04 18:55:15 +0100
committerTobias Thierer <tobiast@google.com>2019-04-05 11:51:16 +0100
commitd63ef2e45ff421d507356503f1fe80628ba806f3 (patch)
treeb6eb5facc318434b690fbd75ed744a55469332a8 /annotations/generate_annotated_java_files.py
parent30bc334d398b27f344df98799c34f86f3c34b852 (diff)
Fix Os.getDefault() BlockGuard test.
A test was asserting that libcore.io.getDefault() was instanceof BlockguardOs. This test failed if it was run after a different Os had been installed via Os.compareAndSetDefault(), which currently doesn't happen in AOSP but happens on internal / downstream branches. A recent change [1] to OsTest did not touch the test method in question but seems to have affected some ordering such that the test started failing. This CL fixes this by replacing the test with one that asserts that Os.getDefault().rename(String,String) results in particular BlockGuard invocations; the test now cares about the particular BlockGuard invocations but does no longer care whether Os.getDefault() is directly instanceof BlockguardOs or whether the notification happens some other way, eg. via delegation to BlockguardOs or by directly calling BlockGuard. This CL also moves the test from OsTest.java to BlockGuardOsTest.java, since that class already had most of the required test setup boilerplate and because BlockGuard is part of what it tests. [1] http://r.android.com/937425 commit 62db047bc129fe96cca0f4a347e9b1fb30163acb Bug: 129926881 Bug: 129523169 Test: atest CtsLibcoreTestCases:libcore.libcore.io.{,BlockGuard}OsTest Change-Id: I1cc3799b6d0905c01b998ecc561217f90e02dcbe
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions