summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot2018-06-25 17:28:10 -0500
committerGerrit Code Review2018-06-25 17:28:10 -0500
commit9d254f0dacc95a296df268eaa6a61cf3e7d144d2 (patch)
treeea9ae663e8709b0dc029ab6ac96365355c16c61e /fs_mgr/libdm/test_util.h
parent516ec4c2570411039975e0fcdba9b5f8d9b31b3b (diff)
parent2d3e79f5d5f04274e5415a30417b1f05ac65ab1d (diff)
downloadplatform-system-core-900d8ec38b057bd16c55e307d7096e0254b28e05.tar.gz
platform-system-core-900d8ec38b057bd16c55e307d7096e0254b28e05.tar.xz
platform-system-core-900d8ec38b057bd16c55e307d7096e0254b28e05.zip
Merge "libdm: Add unit tests for dm-linear."android-p-preview-4
Diffstat (limited to 'fs_mgr/libdm/test_util.h')
-rw-r--r--fs_mgr/libdm/test_util.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/fs_mgr/libdm/test_util.h b/fs_mgr/libdm/test_util.h
new file mode 100644
index 000000000..96b051ca2
--- /dev/null
+++ b/fs_mgr/libdm/test_util.h
@@ -0,0 +1,35 @@
1/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef _LIBDM_TEST_UTILS_H_
18#define _LIBDM_TEST_UTILS_H_
19
20#include <android-base/unique_fd.h>
21#include <stddef.h>
22
23#include <string>
24
25namespace android {
26namespace dm {
27
28// Create a temporary in-memory file. If size is non-zero, the file will be
29// created with a fixed size.
30android::base::unique_fd CreateTempFile(const std::string& name, size_t size);
31
32} // namespace dm
33} // namespace android
34
35#endif // _LIBDM_TEST_UTILS_H_