summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-prod (mdb) <android-build-team-robot@google.com>2017-06-19 22:39:45 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-06-19 22:39:47 +0000
commit674d7b98ecd115267c605d6554a7fa990854eb0d (patch)
tree5194e0f000c4700617ab1b4d415ce5a7b5d5a764
parent2853efd01f7d983191b32518df8123e064ad2498 (diff)
parent433c7ce74f368a3da410433a914c8e266cd0943b (diff)
downloadcts-674d7b98ecd115267c605d6554a7fa990854eb0d.tar.gz
Merge "release-request-cf6b0ce7-de85-47d4-bcec-5ea67e64b212-for-aosp-lollipop-mr1-cts-release-4100890 snap-temp-L75900000075587842" into lollipop-mr1-cts-releaseandroid-cts-5.1_r21
-rw-r--r--hostsidetests/appsecurity/test-apps/AppAccessData/src/com/android/cts/appaccessdata/AccessPrivateDataTest.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/hostsidetests/appsecurity/test-apps/AppAccessData/src/com/android/cts/appaccessdata/AccessPrivateDataTest.java b/hostsidetests/appsecurity/test-apps/AppAccessData/src/com/android/cts/appaccessdata/AccessPrivateDataTest.java
index 9f0abedbd40..40d3cff6c97 100644
--- a/hostsidetests/appsecurity/test-apps/AppAccessData/src/com/android/cts/appaccessdata/AccessPrivateDataTest.java
+++ b/hostsidetests/appsecurity/test-apps/AppAccessData/src/com/android/cts/appaccessdata/AccessPrivateDataTest.java
@@ -103,19 +103,24 @@ public class AccessPrivateDataTest extends AndroidTestCase {
} catch (SecurityException e) {
fail("Was not able to access another app's public file: " + e);
}
+
+ boolean foundOtherStats = false;
try {
BufferedReader qtaguidReader = new BufferedReader(new FileReader("/proc/net/xt_qtaguid/stats"));
String line;
while ((line = qtaguidReader.readLine()) != null) {
String tokens[] = line.split(" ");
if (tokens.length > 3 && tokens[3].equals(String.valueOf(otherAppUid))) {
- // CreatePrivateDataTest:testCreatePrivateData ensures we can access our own stats data
- fail("Other apps detailed traffic stats leaked");
+ foundOtherStats = true;
+ if (!tokens[2].equals("0x0")) {
+ fail("Other apps detailed traffic stats leaked");
+ }
}
}
qtaguidReader.close();
} catch (FileNotFoundException e) {
fail("Was not able to access qtaguid/stats: " + e);
}
+ assertTrue("Was expecting to find other apps' traffic stats", foundOtherStats);
}
}