summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-21 20:10:46 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-04-21 20:10:46 +0000
commit0964e9a85eb9d88ead2e399ce8e9a88bb78a60d1 (patch)
tree38380d9c6096d2e605454cbb8a98de2ecec68b7a
parent2d337fcd6e9b93c8bd57a32af0d2333af5c0cb17 (diff)
parent33a696cd9f465ad0d7036241345a568c3e1dd141 (diff)
downloadcore-0964e9a85eb9d88ead2e399ce8e9a88bb78a60d1.tar.gz
Merge "Snap for 8482148 from abed76bf3e0f293760c5f331c41fdb71e5853e98 to android12-tests-release" into android12-tests-releaseandroid-vts-12.0_r8android-vts-12.0_r7android-vts-12.0_r6android-vts-12.0_r5android-vts-12.0_r4android-cts-12.0_r8android-cts-12.0_r7android-cts-12.0_r6android-cts-12.0_r5
-rw-r--r--fs_mgr/libsnapshot/test_helpers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs_mgr/libsnapshot/test_helpers.cpp b/fs_mgr/libsnapshot/test_helpers.cpp
index e3e3af853..71fe12435 100644
--- a/fs_mgr/libsnapshot/test_helpers.cpp
+++ b/fs_mgr/libsnapshot/test_helpers.cpp
@@ -267,8 +267,8 @@ AssertionResult LowSpaceUserdata::Init(uint64_t max_free_space) {
return AssertionFailure() << "Temp file allocated to " << big_file_->path << ", not in "
<< kUserDataDevice;
}
- uint64_t next_consume =
- std::min(free_space_ - max_free_space, (uint64_t)std::numeric_limits<off_t>::max());
+ uint64_t next_consume = std::min(available_space_ - max_free_space,
+ (uint64_t)std::numeric_limits<off_t>::max());
off_t allocated = 0;
while (next_consume > 0 && free_space_ > max_free_space) {
int status = fallocate(big_file_->fd, 0, allocated, next_consume);