Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: build/android/devil/android/device_utils_test.py

Issue 1410553004: Reland of Android: Trust large random numbers for temp files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: provision_devices Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/devil/android/device_utils_test.py
diff --git a/build/android/devil/android/device_utils_test.py b/build/android/devil/android/device_utils_test.py
index 387a8b1fc6666a93c76aa496dd0126ebefbd440c..99d3c83d2e50469750648b2a29626c2a3c218529 100755
--- a/build/android/devil/android/device_utils_test.py
+++ b/build/android/devil/android/device_utils_test.py
@@ -1606,8 +1606,8 @@ class DeviceUtilsReadFileTest(DeviceUtilsTest):
(mock.call.devil.android.device_temp_file.DeviceTempFile(self.adb),
MockTempFile('/sdcard/tmp/on.device')),
self.call.device.RunShellCommand(
- ['cp', '/this/big/file/can.be.read.with.su',
- '/sdcard/tmp/on.device'],
+ 'SRC=/this/big/file/can.be.read.with.su DEST=/sdcard/tmp/on.device;'
+ 'cp "$SRC" "$DEST" && chmod 666 "$DEST"',
as_root=True, check_return=True),
(self.call.device._ReadFileWithPull('/sdcard/tmp/on.device'),
contents)):

Powered by Google App Engine
This is Rietveld 408576698