rollback_index3_tests.c 702 B

12345678910111213141516171819202122232425262728
  1. /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
  2. * Use of this source code is governed by a BSD-style license that can be
  3. * found in the LICENSE file.
  4. *
  5. * Tests for do-nothing rollback_index functions with disabled TPM
  6. */
  7. #include <stdint.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <string.h>
  11. #include "rollback_index.h"
  12. #include "test_common.h"
  13. int main(int argc, char* argv[])
  14. {
  15. uint32_t version = 1;
  16. TEST_EQ(RollbackKernelRead(&version), 0, "RollbackKernelRead()");
  17. TEST_EQ(version, 0, "rkr version");
  18. TEST_EQ(RollbackKernelWrite(0), 0, "RollbackKernelWrite()");
  19. TEST_EQ(RollbackKernelLock(0), 0, "RollbackKernelLock()");
  20. return gTestSuccess ? 0 : 255;
  21. }