summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Norbye <trond.norbye@gmail.com>2012-07-03 13:33:31 +0200
committerTrond Norbye <trond.norbye@gmail.com>2012-07-03 13:34:14 +0200
commit92b232d45fde9e252dd3318f969a712e5b014297 (patch)
tree703b9b32236ab335a195f2be402a0d825d50ecf9
parente70f5ace86dc71a2683b884182fa46d57965a25a (diff)
downloadmemcached-92b232d45fde9e252dd3318f969a712e5b014297.tar.gz
Skip the LRU test if the engine doesn't support LRU
-rw-r--r--testsuite/basic_engine_testsuite.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/basic_engine_testsuite.c b/testsuite/basic_engine_testsuite.c
index 925d935..65541a3 100644
--- a/testsuite/basic_engine_testsuite.c
+++ b/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;