diff --git a/tests/common/component_test_util.h b/tests/common/component_test_util.h
new file mode 100644
index 0000000..4432297
--- /dev/null
+++ b/tests/common/component_test_util.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agree to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _COMPONENT_TEST_UTIL_H
+#define _COMPONENT_TEST_UTIL_H
+
+#include <string>
+
+#include <android-base/properties.h>
+#include <fs_mgr.h>
+
+// Check if the /misc entry exists in the fstab.
+static bool parse_misc() {
+  // The fstab path is "/fstab.${ro.hardware}".
+  std::string ro_hardware = android::base::GetProperty("ro.hardware", "");
+  if (ro_hardware.empty()) {
+    GTEST_LOG_(INFO) << "Failed to get ro.hardware.";
+    return false;
+  }
+
+  std::string fstab_path = "/fstab." + ro_hardware;
+  fstab* fstab = fs_mgr_read_fstab(fstab_path.c_str());
+  if (fstab == nullptr) {
+    GTEST_LOG_(INFO) << "Failed to read " << fstab_path;
+    return false;
+  }
+
+  fstab_rec* record = fs_mgr_get_entry_for_mount_point(fstab, "/misc");
+  if (record == nullptr) {
+    GTEST_LOG_(INFO) << "Failed to find /misc in fstab.";
+    return false;
+  }
+  return true;
+}
+
+#endif //_COMPONENT_TEST_UTIL_H
+
diff --git a/tests/component/bootloader_message_test.cpp b/tests/component/bootloader_message_test.cpp
index dbcaf61..c32519d 100644
--- a/tests/component/bootloader_message_test.cpp
+++ b/tests/component/bootloader_message_test.cpp
@@ -14,23 +14,38 @@
  * limitations under the License.
  */
 
+#include <string>
+#include <vector>
+
 #include <android-base/strings.h>
 #include <bootloader_message/bootloader_message.h>
 #include <gtest/gtest.h>
 
-#include <string>
-#include <vector>
+#include "common/component_test_util.h"
 
 class BootloaderMessageTest : public ::testing::Test {
  protected:
+  BootloaderMessageTest() : has_misc(true) {}
+
+  virtual void SetUp() override {
+    has_misc = parse_misc();
+  }
+
   virtual void TearDown() override {
     // Clear the BCB.
     std::string err;
     ASSERT_TRUE(clear_bootloader_message(&err)) << "Failed to clear BCB: " << err;
   }
+
+  bool has_misc;
 };
 
 TEST_F(BootloaderMessageTest, clear_bootloader_message) {
+  if (!has_misc) {
+    GTEST_LOG_(INFO) << "Test skipped due to no /misc partition found on the device.";
+    return;
+  }
+
   // Clear the BCB.
   std::string err;
   ASSERT_TRUE(clear_bootloader_message(&err)) << "Failed to clear BCB: " << err;
@@ -45,6 +60,11 @@
 }
 
 TEST_F(BootloaderMessageTest, read_and_write_bootloader_message) {
+  if (!has_misc) {
+    GTEST_LOG_(INFO) << "Test skipped due to no /misc partition found on the device.";
+    return;
+  }
+
   // Write the BCB.
   bootloader_message boot = {};
   strlcpy(boot.command, "command", sizeof(boot.command));
@@ -63,6 +83,11 @@
 }
 
 TEST_F(BootloaderMessageTest, write_bootloader_message_options) {
+  if (!has_misc) {
+    GTEST_LOG_(INFO) << "Test skipped due to no /misc partition found on the device.";
+    return;
+  }
+
   // Write the options to BCB.
   std::vector<std::string> options = { "option1", "option2" };
   std::string err;
@@ -88,6 +113,11 @@
 }
 
 TEST_F(BootloaderMessageTest, write_bootloader_message_options_empty) {
+  if (!has_misc) {
+    GTEST_LOG_(INFO) << "Test skipped due to no /misc partition found on the device.";
+    return;
+  }
+
   // Write empty vector.
   std::vector<std::string> options;
   std::string err;
@@ -109,6 +139,11 @@
 }
 
 TEST_F(BootloaderMessageTest, write_bootloader_message_options_long) {
+  if (!has_misc) {
+    GTEST_LOG_(INFO) << "Test skipped due to no /misc partition found on the device.";
+    return;
+  }
+
   // Write super long message.
   std::vector<std::string> options;
   for (int i = 0; i < 100; i++) {
@@ -139,6 +174,11 @@
 }
 
 TEST_F(BootloaderMessageTest, update_bootloader_message) {
+  if (!has_misc) {
+    GTEST_LOG_(INFO) << "Test skipped due to no /misc partition found on the device.";
+    return;
+  }
+
   // Inject some bytes into boot, which should be not overwritten later.
   bootloader_message boot;
   strlcpy(boot.recovery, "random message", sizeof(boot.recovery));
diff --git a/tests/component/uncrypt_test.cpp b/tests/component/uncrypt_test.cpp
index a554c3e..4f2b816 100644
--- a/tests/component/uncrypt_test.cpp
+++ b/tests/component/uncrypt_test.cpp
@@ -29,6 +29,8 @@
 #include <bootloader_message/bootloader_message.h>
 #include <gtest/gtest.h>
 
+#include "common/component_test_util.h"
+
 static const std::string UNCRYPT_SOCKET = "/dev/socket/uncrypt";
 static const std::string INIT_SVC_SETUP_BCB = "init.svc.setup-bcb";
 static const std::string INIT_SVC_CLEAR_BCB = "init.svc.clear-bcb";
@@ -37,7 +39,9 @@
 
 class UncryptTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  UncryptTest() : has_misc(true) {}
+
+  virtual void SetUp() override {
     ASSERT_TRUE(android::base::SetProperty("ctl.stop", "setup-bcb"));
     ASSERT_TRUE(android::base::SetProperty("ctl.stop", "clear-bcb"));
     ASSERT_TRUE(android::base::SetProperty("ctl.stop", "uncrypt"));
@@ -57,10 +61,19 @@
     }
 
     ASSERT_TRUE(success) << "uncrypt service is not available.";
+
+    has_misc = parse_misc();
   }
+
+  bool has_misc;
 };
 
 TEST_F(UncryptTest, setup_bcb) {
+  if (!has_misc) {
+    GTEST_LOG_(INFO) << "Test skipped due to no /misc partition found on the device.";
+    return;
+  }
+
   // Trigger the setup-bcb service.
   ASSERT_TRUE(android::base::SetProperty("ctl.start", "setup-bcb"));
 
@@ -126,6 +139,11 @@
 }
 
 TEST_F(UncryptTest, clear_bcb) {
+  if (!has_misc) {
+    GTEST_LOG_(INFO) << "Test skipped due to no /misc partition found on the device.";
+    return;
+  }
+
   // Trigger the clear-bcb service.
   ASSERT_TRUE(android::base::SetProperty("ctl.start", "clear-bcb"));
 
