4 * Copyright(c) 2017 Intel Corporation. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * * Neither the name of Intel Corporation nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 /* This test is for membership library's simple feature test */
36 #include <rte_memcpy.h>
37 #include <rte_malloc.h>
38 #include <rte_member.h>
39 #include <rte_byteorder.h>
40 #include <rte_random.h>
41 #include <rte_debug.h>
46 struct rte_member_setsum *setsum_ht;
47 struct rte_member_setsum *setsum_cache;
48 struct rte_member_setsum *setsum_vbf;
50 /* 5-tuple key type */
57 } __attribute__((packed));
59 /* Set ID Macros for multimatch test usage */
60 #define M_MATCH_S 1 /* Not start with 0 since by default 0 means no match */
62 #define M_MATCH_STEP 2
64 (1 + (M_MATCH_E - M_MATCH_S) / M_MATCH_STEP)
70 /* Keys used by unit test functions */
71 static struct flow_key keys[NUM_SAMPLES] = {
73 .ip_src = IPv4(0x03, 0x02, 0x01, 0x00),
74 .ip_dst = IPv4(0x07, 0x06, 0x05, 0x04),
80 .ip_src = IPv4(0x13, 0x12, 0x11, 0x10),
81 .ip_dst = IPv4(0x17, 0x16, 0x15, 0x14),
87 .ip_src = IPv4(0x23, 0x22, 0x21, 0x20),
88 .ip_dst = IPv4(0x27, 0x26, 0x25, 0x24),
94 .ip_src = IPv4(0x33, 0x32, 0x31, 0x30),
95 .ip_dst = IPv4(0x37, 0x36, 0x35, 0x34),
101 .ip_src = IPv4(0x43, 0x42, 0x41, 0x40),
102 .ip_dst = IPv4(0x47, 0x46, 0x45, 0x44),
109 uint32_t test_set[NUM_SAMPLES] = {1, 2, 3, 4, 5};
114 #define MAX_ENTRIES (1 << 16)
115 uint8_t generated_keys[MAX_ENTRIES][KEY_SIZE];
117 static struct rte_member_parameters params = {
118 .num_keys = MAX_ENTRIES, /* Total hash table entries. */
119 .key_len = KEY_SIZE, /* Length of hash key. */
121 /* num_set and false_positive_rate only relevant to vBF */
123 .false_positive_rate = 0.03,
126 .socket_id = 0 /* NUMA Socket ID for memory. */
130 * Sequence of operations for find existing setsummary
133 * - find existing setsum: hit
134 * - find non-existing setsum: miss
138 test_member_find_existing(void)
140 struct rte_member_setsum *tmp_setsum = NULL, *result = NULL;
141 struct rte_member_parameters tmp_params = {
142 .name = "member_find_existing",
143 .num_keys = MAX_ENTRIES, /* Total hash table entries. */
144 .key_len = KEY_SIZE, /* Length of hash key. */
145 .type = RTE_MEMBER_TYPE_HT,
147 .false_positive_rate = 0.03,
150 .socket_id = 0 /* NUMA Socket ID for memory. */
154 tmp_setsum = rte_member_create(&tmp_params);
155 TEST_ASSERT(tmp_setsum != NULL, "setsum creation failed");
157 /* Try to find existing hash table */
158 result = rte_member_find_existing("member_find_existing");
159 TEST_ASSERT(result == tmp_setsum, "could not find existing setsum");
161 /* Try to find non-existing hash table */
162 result = rte_member_find_existing("member_find_non_existing");
163 TEST_ASSERT(result == NULL, "found setsum that shouldn't exist");
166 rte_member_free(tmp_setsum);
172 * Test for bad creating parameters
175 test_member_create_bad_param(void)
177 struct rte_member_setsum *bad_setsum = NULL;
178 struct rte_member_parameters bad_params = {
179 .num_keys = MAX_ENTRIES, /* Total hash table entries. */
180 .key_len = KEY_SIZE, /* Length of hash key. */
181 .type = RTE_MEMBER_TYPE_HT,
183 .false_positive_rate = 0.03,
186 .socket_id = 0 /* NUMA Socket ID for memory. */
189 printf("Expected error section begin...\n");
190 bad_params.name = "bad_param1";
191 bad_params.num_set = 0;
192 bad_params.type = RTE_MEMBER_TYPE_VBF;
193 /* Test with 0 set for vBF should fail */
194 bad_setsum = rte_member_create(&bad_params);
195 if (bad_setsum != NULL) {
196 rte_member_free(bad_setsum);
197 printf("Impossible creating setsum successfully with invalid "
198 "number of set for vBF\n");
202 bad_params.name = "bad_param2";
203 bad_params.false_positive_rate = 0;
204 bad_params.num_set = 32;
205 /* Test with 0 false positive for vBF should fail */
206 bad_setsum = rte_member_create(&bad_params);
207 if (bad_setsum != NULL) {
208 rte_member_free(bad_setsum);
209 printf("Impossible creating setsum successfully with invalid "
210 "false positive rate for vBF\n");
214 bad_params.name = "bad_param3";
215 bad_params.false_positive_rate = 0.03;
216 bad_params.num_keys = 0;
217 /* Test with 0 key per BF for vBF should fail */
218 bad_setsum = rte_member_create(&bad_params);
219 if (bad_setsum != NULL) {
220 rte_member_free(bad_setsum);
221 printf("Impossible creating setsum successfully with invalid "
222 "num_keys for vBF\n");
226 bad_params.name = "bad_param4";
227 bad_params.type = RTE_MEMBER_TYPE_HT;
228 bad_params.num_keys = RTE_MEMBER_BUCKET_ENTRIES / 2;
229 /* Test with less than 1 bucket for HTSS should fail */
230 bad_setsum = rte_member_create(&bad_params);
231 if (bad_setsum != NULL) {
232 rte_member_free(bad_setsum);
233 printf("Impossible creating setsum successfully with too few "
234 "number of keys(entries) for HT\n");
238 bad_params.name = "bad_param5";
239 bad_params.num_keys = RTE_MEMBER_ENTRIES_MAX + 1;
240 /* Test with more than maximum entries for HTSS should fail */
241 bad_setsum = rte_member_create(&bad_params);
242 if (bad_setsum != NULL) {
243 rte_member_free(bad_setsum);
244 printf("Impossible creating setsum successfully with to many "
245 "number of keys(entries) for HT\n");
249 bad_params.name = "bad_param5";
250 /* Test with same name should fail */
251 bad_setsum = rte_member_create(&bad_params);
252 if (bad_setsum != NULL) {
253 rte_member_free(bad_setsum);
254 printf("Impossible creating setsum successfully with existed "
258 printf("Expected error section end...\n");
259 rte_member_free(bad_setsum);
263 /* Create test setsummaries. */
264 static int test_member_create(void)
266 params.key_len = sizeof(struct flow_key);
268 params.name = "test_member_ht";
270 params.type = RTE_MEMBER_TYPE_HT;
271 setsum_ht = rte_member_create(¶ms);
273 params.name = "test_member_cache";
275 setsum_cache = rte_member_create(¶ms);
277 params.name = "test_member_vbf";
278 params.type = RTE_MEMBER_TYPE_VBF;
279 setsum_vbf = rte_member_create(¶ms);
281 if (setsum_ht == NULL || setsum_cache == NULL || setsum_vbf == NULL) {
282 printf("Creation of setsums fail\n");
285 printf("Creation of setsums success\n");
289 static int test_member_insert(void)
291 int ret_ht, ret_cache, ret_vbf, i;
293 for (i = 0; i < NUM_SAMPLES; i++) {
294 ret_ht = rte_member_add(setsum_ht, &keys[i], test_set[i]);
295 ret_cache = rte_member_add(setsum_cache, &keys[i],
297 ret_vbf = rte_member_add(setsum_vbf, &keys[i], test_set[i]);
298 TEST_ASSERT(ret_ht >= 0 && ret_cache >= 0 && ret_vbf >= 0,
301 printf("insert key success\n");
305 static int test_member_lookup(void)
307 int ret_ht, ret_cache, ret_vbf, i;
308 uint16_t set_ht, set_cache, set_vbf;
309 member_set_t set_ids_ht[NUM_SAMPLES] = {0};
310 member_set_t set_ids_cache[NUM_SAMPLES] = {0};
311 member_set_t set_ids_vbf[NUM_SAMPLES] = {0};
313 uint32_t num_key_ht = NUM_SAMPLES;
314 uint32_t num_key_cache = NUM_SAMPLES;
315 uint32_t num_key_vbf = NUM_SAMPLES;
317 const void *key_array[NUM_SAMPLES];
319 /* Single lookup test */
320 for (i = 0; i < NUM_SAMPLES; i++) {
321 ret_ht = rte_member_lookup(setsum_ht, &keys[i], &set_ht);
322 ret_cache = rte_member_lookup(setsum_cache, &keys[i],
324 ret_vbf = rte_member_lookup(setsum_vbf, &keys[i], &set_vbf);
325 TEST_ASSERT(ret_ht >= 0 && ret_cache >= 0 && ret_vbf >= 0,
326 "single lookup function error");
328 TEST_ASSERT(set_ht == test_set[i] &&
329 set_cache == test_set[i] &&
330 set_vbf == test_set[i],
331 "single lookup set value error");
333 printf("lookup single key success\n");
335 /* Bulk lookup test */
336 for (i = 0; i < NUM_SAMPLES; i++)
337 key_array[i] = &keys[i];
339 ret_ht = rte_member_lookup_bulk(setsum_ht, key_array,
340 num_key_ht, set_ids_ht);
342 ret_cache = rte_member_lookup_bulk(setsum_cache, key_array,
343 num_key_cache, set_ids_cache);
345 ret_vbf = rte_member_lookup_bulk(setsum_vbf, key_array,
346 num_key_vbf, set_ids_vbf);
348 TEST_ASSERT(ret_ht >= 0 && ret_cache >= 0 && ret_vbf >= 0,
349 "bulk lookup function error");
351 for (i = 0; i < NUM_SAMPLES; i++) {
352 TEST_ASSERT((set_ids_ht[i] == test_set[i]) &&
353 (set_ids_cache[i] == test_set[i]) &&
354 (set_ids_vbf[i] == test_set[i]),
355 "bulk lookup result error");
361 static int test_member_delete(void)
363 int ret_ht, ret_cache, ret_vbf, i;
364 uint16_t set_ht, set_cache, set_vbf;
365 const void *key_array[NUM_SAMPLES];
366 member_set_t set_ids_ht[NUM_SAMPLES] = {0};
367 member_set_t set_ids_cache[NUM_SAMPLES] = {0};
368 member_set_t set_ids_vbf[NUM_SAMPLES] = {0};
369 uint32_t num_key_ht = NUM_SAMPLES;
370 uint32_t num_key_cache = NUM_SAMPLES;
371 uint32_t num_key_vbf = NUM_SAMPLES;
373 /* Delete part of all inserted keys */
374 for (i = 0; i < NUM_SAMPLES / 2; i++) {
375 ret_ht = rte_member_delete(setsum_ht, &keys[i], test_set[i]);
376 ret_cache = rte_member_delete(setsum_cache, &keys[i],
378 ret_vbf = rte_member_delete(setsum_vbf, &keys[i], test_set[i]);
379 /* VBF does not support delete yet, so return error code */
380 TEST_ASSERT(ret_ht >= 0 && ret_cache >= 0,
381 "key deletion function error");
382 TEST_ASSERT(ret_vbf < 0,
383 "vbf does not support deletion, error");
386 for (i = 0; i < NUM_SAMPLES; i++)
387 key_array[i] = &keys[i];
389 ret_ht = rte_member_lookup_bulk(setsum_ht, key_array,
390 num_key_ht, set_ids_ht);
392 ret_cache = rte_member_lookup_bulk(setsum_cache, key_array,
393 num_key_cache, set_ids_cache);
395 ret_vbf = rte_member_lookup_bulk(setsum_vbf, key_array,
396 num_key_vbf, set_ids_vbf);
398 TEST_ASSERT(ret_ht >= 0 && ret_cache >= 0 && ret_vbf >= 0,
399 "bulk lookup function error");
401 for (i = 0; i < NUM_SAMPLES / 2; i++) {
402 TEST_ASSERT((set_ids_ht[i] == RTE_MEMBER_NO_MATCH) &&
403 (set_ids_cache[i] == RTE_MEMBER_NO_MATCH),
404 "bulk lookup result error");
407 for (i = NUM_SAMPLES / 2; i < NUM_SAMPLES; i++) {
408 TEST_ASSERT((set_ids_ht[i] == test_set[i]) &&
409 (set_ids_cache[i] == test_set[i]) &&
410 (set_ids_vbf[i] == test_set[i]),
411 "bulk lookup result error");
414 /* Delete the left of inserted keys */
415 for (i = NUM_SAMPLES / 2; i < NUM_SAMPLES; i++) {
416 ret_ht = rte_member_delete(setsum_ht, &keys[i], test_set[i]);
417 ret_cache = rte_member_delete(setsum_cache, &keys[i],
419 ret_vbf = rte_member_delete(setsum_vbf, &keys[i], test_set[i]);
420 /* VBF does not support delete yet, so return error code */
421 TEST_ASSERT(ret_ht >= 0 && ret_cache >= 0,
422 "key deletion function error");
423 TEST_ASSERT(ret_vbf < 0,
424 "vbf does not support deletion, error");
427 for (i = 0; i < NUM_SAMPLES; i++) {
428 ret_ht = rte_member_lookup(setsum_ht, &keys[i], &set_ht);
429 ret_cache = rte_member_lookup(setsum_cache, &keys[i],
431 ret_vbf = rte_member_lookup(setsum_vbf, &keys[i], &set_vbf);
432 TEST_ASSERT(ret_ht >= 0 && ret_cache >= 0,
433 "key lookup function error");
434 TEST_ASSERT(set_ht == RTE_MEMBER_NO_MATCH &&
435 ret_cache == RTE_MEMBER_NO_MATCH,
436 "key deletion failed");
438 /* Reset vbf for other following tests */
439 rte_member_reset(setsum_vbf);
441 printf("delete success\n");
445 static int test_member_multimatch(void)
447 int ret_ht, ret_vbf, ret_cache;
448 member_set_t set_ids_ht[MAX_MATCH] = {0};
449 member_set_t set_ids_vbf[MAX_MATCH] = {0};
450 member_set_t set_ids_cache[MAX_MATCH] = {0};
452 member_set_t set_ids_ht_m[NUM_SAMPLES][MAX_MATCH] = {{0} };
453 member_set_t set_ids_vbf_m[NUM_SAMPLES][MAX_MATCH] = {{0} };
454 member_set_t set_ids_cache_m[NUM_SAMPLES][MAX_MATCH] = {{0} };
456 uint32_t match_count_ht[NUM_SAMPLES];
457 uint32_t match_count_vbf[NUM_SAMPLES];
458 uint32_t match_count_cache[NUM_SAMPLES];
460 uint32_t num_key_ht = NUM_SAMPLES;
461 uint32_t num_key_vbf = NUM_SAMPLES;
462 uint32_t num_key_cache = NUM_SAMPLES;
464 const void *key_array[NUM_SAMPLES];
468 /* Same key at most inserted 2*entry_per_bucket times for HT mode */
469 for (i = M_MATCH_S; i <= M_MATCH_E; i += M_MATCH_STEP) {
470 for (j = 0; j < NUM_SAMPLES; j++) {
471 ret_ht = rte_member_add(setsum_ht, &keys[j], i);
472 ret_vbf = rte_member_add(setsum_vbf, &keys[j], i);
473 ret_cache = rte_member_add(setsum_cache, &keys[j], i);
475 TEST_ASSERT(ret_ht >= 0 && ret_vbf >= 0 &&
477 "insert function error");
481 /* Single multimatch test */
482 for (i = 0; i < NUM_SAMPLES; i++) {
483 ret_vbf = rte_member_lookup_multi(setsum_vbf, &keys[i],
484 MAX_MATCH, set_ids_vbf);
485 ret_ht = rte_member_lookup_multi(setsum_ht, &keys[i],
486 MAX_MATCH, set_ids_ht);
487 ret_cache = rte_member_lookup_multi(setsum_cache, &keys[i],
488 MAX_MATCH, set_ids_cache);
490 * For cache mode, keys overwrite when signature same.
491 * the mutimatch should work like single match.
493 TEST_ASSERT(ret_ht == M_MATCH_CNT && ret_vbf == M_MATCH_CNT &&
495 "single lookup_multi error");
496 TEST_ASSERT(set_ids_cache[0] == M_MATCH_E,
497 "single lookup_multi cache error");
499 for (j = 1; j <= M_MATCH_CNT; j++) {
500 TEST_ASSERT(set_ids_ht[j-1] == j * M_MATCH_STEP - 1 &&
502 j * M_MATCH_STEP - 1,
503 "single multimatch lookup error");
506 printf("lookup single key for multimatch success\n");
508 /* Bulk multimatch test */
509 for (i = 0; i < NUM_SAMPLES; i++)
510 key_array[i] = &keys[i];
511 ret_vbf = rte_member_lookup_multi_bulk(setsum_vbf,
512 &key_array[0], num_key_ht, MAX_MATCH, match_count_vbf,
513 (member_set_t *)set_ids_vbf_m);
515 ret_ht = rte_member_lookup_multi_bulk(setsum_ht,
516 &key_array[0], num_key_vbf, MAX_MATCH, match_count_ht,
517 (member_set_t *)set_ids_ht_m);
519 ret_cache = rte_member_lookup_multi_bulk(setsum_cache,
520 &key_array[0], num_key_cache, MAX_MATCH,
521 match_count_cache, (member_set_t *)set_ids_cache_m);
524 for (j = 0; j < NUM_SAMPLES; j++) {
525 TEST_ASSERT(match_count_ht[j] == M_MATCH_CNT,
526 "bulk multimatch lookup HT match count error");
527 TEST_ASSERT(match_count_vbf[j] == M_MATCH_CNT,
528 "bulk multimatch lookup vBF match count error");
529 TEST_ASSERT(match_count_cache[j] == 1,
530 "bulk multimatch lookup CACHE match count error");
531 TEST_ASSERT(set_ids_cache_m[j][0] == M_MATCH_E,
532 "bulk multimatch lookup CACHE set value error");
534 for (i = 1; i <= M_MATCH_CNT; i++) {
535 TEST_ASSERT(set_ids_ht_m[j][i-1] ==
536 i * M_MATCH_STEP - 1,
537 "bulk multimatch lookup HT set value error");
538 TEST_ASSERT(set_ids_vbf_m[j][i-1] ==
539 i * M_MATCH_STEP - 1,
540 "bulk multimatch lookup vBF set value error");
544 printf("lookup for bulk multimatch success\n");
549 static int key_compare(const void *key1, const void *key2)
551 return memcmp(key1, key2, KEY_SIZE);
555 setup_keys_and_data(void)
560 /* Reset all arrays */
561 for (i = 0; i < KEY_SIZE; i++)
562 generated_keys[0][i] = 0;
564 /* Generate a list of keys, some of which may be duplicates */
565 for (i = 0; i < MAX_ENTRIES; i++) {
566 for (j = 0; j < KEY_SIZE; j++)
567 generated_keys[i][j] = rte_rand() & 0xFF;
570 /* Remove duplicates from the keys array */
573 /* Sort the list of keys to make it easier to find duplicates */
574 qsort(generated_keys, MAX_ENTRIES, KEY_SIZE, key_compare);
576 /* Sift through the list of keys and look for duplicates */
577 int num_duplicates = 0;
578 for (i = 0; i < MAX_ENTRIES - 1; i++) {
579 if (memcmp(generated_keys[i], generated_keys[i + 1],
581 /* This key already exists, try again */
583 for (j = 0; j < KEY_SIZE; j++)
584 generated_keys[i][j] =
588 } while (num_duplicates != 0);
592 add_generated_keys(struct rte_member_setsum *setsum, unsigned int *added_keys)
596 for (*added_keys = 0; ret >= 0 && *added_keys < MAX_ENTRIES;
598 uint16_t set = (rte_rand() & 0xf) + 1;
599 ret = rte_member_add(setsum, &generated_keys[*added_keys], set);
605 add_generated_keys_cache(struct rte_member_setsum *setsum,
606 unsigned int *added_keys)
610 for (*added_keys = 0; ret == 0 && *added_keys < MAX_ENTRIES;
612 uint16_t set = (rte_rand() & 0xf) + 1;
613 ret = rte_member_add(setsum, &generated_keys[*added_keys], set);
619 test_member_loadfactor(void)
622 unsigned int added_keys, average_keys_added = 0;
625 setup_keys_and_data();
627 rte_member_free(setsum_ht);
628 rte_member_free(setsum_cache);
629 rte_member_free(setsum_vbf);
631 params.key_len = KEY_SIZE;
632 params.name = "test_member_ht";
634 params.type = RTE_MEMBER_TYPE_HT;
635 setsum_ht = rte_member_create(¶ms);
637 params.name = "test_member_cache";
639 setsum_cache = rte_member_create(¶ms);
642 if (setsum_ht == NULL || setsum_cache == NULL) {
643 printf("Creation of setsums fail\n");
646 /* Test HT non-cache mode */
647 for (j = 0; j < ITERATIONS; j++) {
648 /* Add random entries until key cannot be added */
649 ret = add_generated_keys(setsum_ht, &added_keys);
650 if (ret != -ENOSPC) {
651 printf("Unexpected error when adding keys\n");
654 average_keys_added += added_keys;
656 /* Reset the table */
657 rte_member_reset(setsum_ht);
659 /* Print a dot to show progress on operations */
664 average_keys_added /= ITERATIONS;
666 printf("\nKeys inserted when no space(non-cache) = %.2f%% (%u/%u)\n",
667 ((double) average_keys_added / params.num_keys * 100),
668 average_keys_added, params.num_keys);
670 /* Test cache mode */
671 added_keys = average_keys_added = 0;
672 for (j = 0; j < ITERATIONS; j++) {
673 /* Add random entries until key cannot be added */
674 ret = add_generated_keys_cache(setsum_cache, &added_keys);
676 printf("Unexpected error when adding keys\n");
679 average_keys_added += added_keys;
681 /* Reset the table */
682 rte_member_reset(setsum_cache);
684 /* Print a dot to show progress on operations */
689 average_keys_added /= ITERATIONS;
691 printf("\nKeys inserted when eviction happens(cache)= %.2f%% (%u/%u)\n",
692 ((double) average_keys_added / params.num_keys * 100),
693 average_keys_added, params.num_keys);
700 rte_member_free(setsum_ht);
701 rte_member_free(setsum_cache);
702 rte_member_free(setsum_vbf);
708 if (test_member_create_bad_param() < 0)
711 if (test_member_find_existing() < 0)
714 if (test_member_create() < 0) {
718 if (test_member_insert() < 0) {
722 if (test_member_lookup() < 0) {
726 if (test_member_delete() < 0) {
730 if (test_member_multimatch() < 0) {
734 if (test_member_loadfactor() < 0) {
735 rte_member_free(setsum_ht);
736 rte_member_free(setsum_cache);
744 REGISTER_TEST_COMMAND(member_autotest, test_member);