MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_is_selected

Function test_is_selected

app/redis-6.2.6/src/redis-benchmark.c:1670–1680  ·  view source on GitHub ↗

Return true if the named test was selected using the -t command line * switch, or if all the tests are selected (no -t passed by user). */

Source from the content-addressed store, hash-verified

1668/* Return true if the named test was selected using the -t command line
1669 * switch, or if all the tests are selected (no -t passed by user). */
1670int test_is_selected(char *name) {
1671 char buf[256];
1672 int l = strlen(name);
1673
1674 if (config.tests == NULL) return 1;
1675 buf[0] = ',';
1676 memcpy(buf+1,name,l);
1677 buf[l+1] = ',';
1678 buf[l+2] = '\0';
1679 return strstr(config.tests,buf) != NULL;
1680}
1681
1682int main(int argc, const char **argv) {
1683 int i;

Callers 1

mainFunction · 0.85

Calls 2

strstrFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected