Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 92b232d45fde9e252dd3318f969a712e5b014297 1 parent e70f5ac
Trond Norbye trondn authored

Showing 1 changed file with 18 additions and 0 deletions. Show diff stats Hide diff stats

  1. +18 0 testsuite/basic_engine_testsuite.c
18 testsuite/basic_engine_testsuite.c
@@ -446,6 +446,24 @@ static void eviction_stats_handler(const char *key, const uint16_t klen,
446 446 }
447 447
448 448 static enum test_result lru_test(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1) {
  449 + bool supported = false;
  450 + const engine_info *info = h1->get_info(h);
  451 + if (info != NULL) {
  452 + uint32_t nfeats = info->num_features;
  453 + assert (nfeats > 0);
  454 + const feature_info *fi = info->features;
  455 + while (nfeats-- > 0) {
  456 + if (fi->feature == ENGINE_FEATURE_LRU) {
  457 + supported = true;
  458 + break;
  459 + }
  460 + }
  461 + }
  462 +
  463 + if (!supported) {
  464 + return SKIPPED;
  465 + }
  466 +
449 467 item *test_item = NULL;
450 468 const char *hot_key = "hot_key";
451 469 uint64_t cas = 0;

0 comments on commit 92b232d

Please sign in to comment.
Something went wrong with that request. Please try again.