Add Erase verifyGeometry
This confirms specified amount of the drive is accessible. The min and
max expected drive size are set as a build configuration, and compared
against the drive size (found by using the linux ioctl). Also adds
testing build files, testing options, and verifyGeometry test.
Tested: Ran eStoraged on a machine with an eMMC, using the following
$ ./eStoraged -b /dev/mmcblk0 &
$ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \
/xyz/openbmc_project/storage/mmcblk0 \
xyz.openbmc_project.eStoraged Erase ays 1 1 \
xyz.openbmc_project.eStoraged.EraseMethod.VerifyGeometry
Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: Ie47f8666996a6085a115d1b86f2643bc278638c5
diff --git a/src/meson.build b/src/meson.build
index 50a5c7c..1390536 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,4 +1,6 @@
+subdir('erase')
+
libeStoraged_deps = [
dependency('sdbusplus'),
dependency('phosphor-logging',
@@ -16,13 +18,14 @@
'estoraged.cpp',
include_directories : eStoraged_headers,
implicit_include_directories: false,
- dependencies: libeStoraged_deps,
+ dependencies: [libeStoraged_deps, libeStoragedErase_dep],
)
libeStoraged = declare_dependency(
dependencies: libeStoraged_deps,
include_directories: eStoraged_headers,
- link_with: libeStoraged_lib)
+ link_with: libeStoraged_lib,
+)
executable(
'eStoraged',