summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-08-20 15:25:22 +0800
committerCommit Bot <commit-bot@chromium.org>2019-08-28 07:32:04 +0000
commita762fa782793e7b13ba13ceed474f20c54afbdd3 (patch)
tree8a087540d5970493cd51f1601fea3f03e7d565f3 /tests
parent0ff87642e865fca49fa9584cffa1b0c4810adced (diff)
downloadvboot-a762fa782793e7b13ba13ceed474f20c54afbdd3.tar.gz
vboot/secdata: remove VbUnlockDevice function
VbUnlockDevice is only used in fastboot. Currently fastboot "unlocking" is disabled (see CL:1757973). BUG=b:124141368, chromium:972956 TEST=make clean && make runtests BRANCH=none Change-Id: I0de44c2bb8d8150dafb0b73e7a0be6e63564a26b Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1758150 Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/vboot_api_kernel6_tests.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/tests/vboot_api_kernel6_tests.c b/tests/vboot_api_kernel6_tests.c
deleted file mode 100644
index 63aff75d..00000000
--- a/tests/vboot_api_kernel6_tests.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- *
- * Tests for vboot_api_kernel.c
- */
-
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "2common.h"
-#include "rollback_index.h"
-#include "test_common.h"
-#include "vboot_api.h"
-
-/* Mock data */
-static uint32_t virtual_dev_mode_fail;
-
-/**
- * Reset mock data (for use before each test)
- */
-static void ResetMocks(void)
-{
- virtual_dev_mode_fail = 0;
-}
-
-/* Mocks */
-vb2_error_t SetVirtualDevMode(int val)
-{
- if (virtual_dev_mode_fail)
- return VB2_ERROR_MOCK;
- return VB2_SUCCESS;
-}
-
-static void VbUnlockDeviceTest(void)
-{
- ResetMocks();
- TEST_EQ(VbUnlockDevice(), 0, "unlock success");
-
- ResetMocks();
- virtual_dev_mode_fail = 1;
- TEST_EQ(VbUnlockDevice(), VBERROR_TPM_SET_BOOT_MODE_STATE,
- "set dev fail");
-}
-
-int main(void)
-{
- VbUnlockDeviceTest();
-
- return gTestSuccess ? 0 : 255;
-}