Permalink
Browse files

Skip the LRU test if the engine doesn't support LRU

  • Loading branch information...
1 parent e70f5ac commit 92b232d45fde9e252dd3318f969a712e5b014297 @trondn trondn committed Jul 3, 2012
Showing with 18 additions and 0 deletions.
  1. +18 −0 testsuite/basic_engine_testsuite.c
View
18 testsuite/basic_engine_testsuite.c
@@ -446,6 +446,24 @@ static void eviction_stats_handler(const char *key, const uint16_t klen,
}
static enum test_result lru_test(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1) {
+ bool supported = false;
+ const engine_info *info = h1->get_info(h);
+ if (info != NULL) {
+ uint32_t nfeats = info->num_features;
+ assert (nfeats > 0);
+ const feature_info *fi = info->features;
+ while (nfeats-- > 0) {
+ if (fi->feature == ENGINE_FEATURE_LRU) {
+ supported = true;
+ break;
+ }
+ }
+ }
+
+ if (!supported) {
+ return SKIPPED;
+ }
+
item *test_item = NULL;
const char *hot_key = "hot_key";
uint64_t cas = 0;

0 comments on commit 92b232d

Please sign in to comment.