Commit 27f25845 authored by Junio C Hamano's avatar Junio C Hamano

Merge branch 'nd/combined-test-helper'

Small test-helper programs have been consolidated into a single
binary.

* nd/combined-test-helper: (36 commits)
  t/helper: merge test-write-cache into test-tool
  t/helper: merge test-wildmatch into test-tool
  t/helper: merge test-urlmatch-normalization into test-tool
  t/helper: merge test-subprocess into test-tool
  t/helper: merge test-submodule-config into test-tool
  t/helper: merge test-string-list into test-tool
  t/helper: merge test-strcmp-offset into test-tool
  t/helper: merge test-sigchain into test-tool
  t/helper: merge test-sha1-array into test-tool
  t/helper: merge test-scrap-cache-tree into test-tool
  t/helper: merge test-run-command into test-tool
  t/helper: merge test-revision-walking into test-tool
  t/helper: merge test-regex into test-tool
  t/helper: merge test-ref-store into test-tool
  t/helper: merge test-read-cache into test-tool
  t/helper: merge test-prio-queue into test-tool
  t/helper: merge test-path-utils into test-tool
  t/helper: merge test-online-cpus into test-tool
  t/helper: merge test-mktemp into test-tool
  t/helper: merge (unused) test-mergesort into test-tool
  ...
parents 3a1ec60c c81f843d
......@@ -80,7 +80,7 @@ valid pack like:
# now add our object data
cat object >>tmp.pack
# and then append the pack trailer
/path/to/git.git/test-sha1 -b <tmp.pack >trailer
/path/to/git.git/t/helper/test-tool sha1 -b <tmp.pack >trailer
cat trailer >>tmp.pack
------------
......
......@@ -554,6 +554,7 @@ SCRIPT_PERL =
SCRIPT_PYTHON =
SCRIPT_SH =
SCRIPT_LIB =
TEST_BUILTINS_OBJS =
TEST_PROGRAMS_NEED_X =
# Having this variable in your environment would break pipelines because
......@@ -659,47 +660,49 @@ X =
PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
TEST_PROGRAMS_NEED_X += test-chmtime
TEST_PROGRAMS_NEED_X += test-ctype
TEST_PROGRAMS_NEED_X += test-config
TEST_PROGRAMS_NEED_X += test-date
TEST_PROGRAMS_NEED_X += test-delta
TEST_PROGRAMS_NEED_X += test-drop-caches
TEST_PROGRAMS_NEED_X += test-dump-cache-tree
TEST_BUILTINS_OBJS += test-chmtime.o
TEST_BUILTINS_OBJS += test-config.o
TEST_BUILTINS_OBJS += test-ctype.o
TEST_BUILTINS_OBJS += test-date.o
TEST_BUILTINS_OBJS += test-delta.o
TEST_BUILTINS_OBJS += test-drop-caches.o
TEST_BUILTINS_OBJS += test-dump-cache-tree.o
TEST_BUILTINS_OBJS += test-dump-split-index.o
TEST_BUILTINS_OBJS += test-example-decorate.o
TEST_BUILTINS_OBJS += test-genrandom.o
TEST_BUILTINS_OBJS += test-hashmap.o
TEST_BUILTINS_OBJS += test-index-version.o
TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
TEST_BUILTINS_OBJS += test-match-trees.o
TEST_BUILTINS_OBJS += test-mergesort.o
TEST_BUILTINS_OBJS += test-mktemp.o
TEST_BUILTINS_OBJS += test-online-cpus.o
TEST_BUILTINS_OBJS += test-path-utils.o
TEST_BUILTINS_OBJS += test-prio-queue.o
TEST_BUILTINS_OBJS += test-read-cache.o
TEST_BUILTINS_OBJS += test-ref-store.o
TEST_BUILTINS_OBJS += test-regex.o
TEST_BUILTINS_OBJS += test-revision-walking.o
TEST_BUILTINS_OBJS += test-run-command.o
TEST_BUILTINS_OBJS += test-scrap-cache-tree.o
TEST_BUILTINS_OBJS += test-sha1-array.o
TEST_BUILTINS_OBJS += test-sha1.o
TEST_BUILTINS_OBJS += test-sigchain.o
TEST_BUILTINS_OBJS += test-strcmp-offset.o
TEST_BUILTINS_OBJS += test-string-list.o
TEST_BUILTINS_OBJS += test-submodule-config.o
TEST_BUILTINS_OBJS += test-subprocess.o
TEST_BUILTINS_OBJS += test-urlmatch-normalization.o
TEST_BUILTINS_OBJS += test-wildmatch.o
TEST_BUILTINS_OBJS += test-write-cache.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_PROGRAMS_NEED_X += test-dump-split-index
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
TEST_PROGRAMS_NEED_X += test-example-decorate
TEST_PROGRAMS_NEED_X += test-fake-ssh
TEST_PROGRAMS_NEED_X += test-genrandom
TEST_PROGRAMS_NEED_X += test-hashmap
TEST_PROGRAMS_NEED_X += test-index-version
TEST_PROGRAMS_NEED_X += test-lazy-init-name-hash
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-match-trees
TEST_PROGRAMS_NEED_X += test-mergesort
TEST_PROGRAMS_NEED_X += test-mktemp
TEST_PROGRAMS_NEED_X += test-online-cpus
TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-path-utils
TEST_PROGRAMS_NEED_X += test-prio-queue
TEST_PROGRAMS_NEED_X += test-read-cache
TEST_PROGRAMS_NEED_X += test-write-cache
TEST_PROGRAMS_NEED_X += test-ref-store
TEST_PROGRAMS_NEED_X += test-regex
TEST_PROGRAMS_NEED_X += test-revision-walking
TEST_PROGRAMS_NEED_X += test-run-command
TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
TEST_PROGRAMS_NEED_X += test-sha1
TEST_PROGRAMS_NEED_X += test-sha1-array
TEST_PROGRAMS_NEED_X += test-sigchain
TEST_PROGRAMS_NEED_X += test-strcmp-offset
TEST_PROGRAMS_NEED_X += test-string-list
TEST_PROGRAMS_NEED_X += test-submodule-config
TEST_PROGRAMS_NEED_X += test-subprocess
TEST_PROGRAMS_NEED_X += test-svn-fe
TEST_PROGRAMS_NEED_X += test-urlmatch-normalization
TEST_PROGRAMS_NEED_X += test-wildmatch
TEST_PROGRAMS_NEED_X += test-tool
TEST_PROGRAMS = $(patsubst %,t/helper/%$X,$(TEST_PROGRAMS_NEED_X))
......@@ -2092,7 +2095,7 @@ VCSSVN_OBJS += vcs-svn/fast_export.o
VCSSVN_OBJS += vcs-svn/svndiff.o
VCSSVN_OBJS += vcs-svn/svndump.o
TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS))
TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))
OBJECTS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
$(XDIFF_OBJS) \
$(VCSSVN_OBJS) \
......@@ -2503,10 +2506,12 @@ t/helper/test-svn-fe$X: $(VCSSVN_LIB)
.PRECIOUS: $(TEST_OBJS)
t/helper/test-tool$X: $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))
t/helper/test-%$X: t/helper/test-%.o GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(filter %.a,$^) $(LIBS)
check-sha1:: t/helper/test-sha1$X
check-sha1:: t/helper/test-tool$X
t/helper/test-sha1.sh
SP_OBJ = $(patsubst %.o,%.sp,$(C_OBJ))
......
......@@ -5,28 +5,29 @@
*
* The mtime can be changed to an absolute value:
*
* test-chmtime =<seconds> file...
* test-tool chmtime =<seconds> file...
*
* Relative to the current time as returned by time(3):
*
* test-chmtime =+<seconds> (or =-<seconds>) file...
* test-tool chmtime =+<seconds> (or =-<seconds>) file...
*
* Or relative to the current mtime of the file:
*
* test-chmtime <seconds> file...
* test-chmtime +<seconds> (or -<seconds>) file...
* test-tool chmtime <seconds> file...
* test-tool chmtime +<seconds> (or -<seconds>) file...
*
* Examples:
*
* To just print the mtime use --verbose and set the file mtime offset to 0:
*
* test-chmtime -v +0 file
* test-tool chmtime -v +0 file
*
* To set the mtime to current time:
*
* test-chmtime =+0 file
* test-tool chmtime =+0 file
*
*/
#include "test-tool.h"
#include "git-compat-util.h"
#include <utime.h>
......@@ -56,7 +57,7 @@ static int timespec_arg(const char *arg, long int *set_time, int *set_eq)
return 1;
}
int cmd_main(int argc, const char **argv)
int cmd__chmtime(int argc, const char **argv)
{
static int verbose;
......
#include "test-tool.h"
#include "cache.h"
#include "config.h"
#include "string-list.h"
......@@ -32,7 +33,7 @@
* Examples:
*
* To print the value with highest priority for key "foo.bAr Baz.rock":
* test-config get_value "foo.bAr Baz.rock"
* test-tool config get_value "foo.bAr Baz.rock"
*
*/
......@@ -77,7 +78,7 @@ static int early_config_cb(const char *var, const char *value, void *vdata)
return 0;
}
int cmd_main(int argc, const char **argv)
int cmd__config(int argc, const char **argv)
{
int i, val;
const char *v;
......
#include "test-tool.h"
#include "cache.h"
static int rc;
......@@ -28,7 +29,7 @@ static int is_in(const char *s, int ch)
#define LOWER "abcdefghijklmnopqrstuvwxyz"
#define UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
int cmd_main(int argc, const char **argv)
int cmd__ctype(int argc, const char **argv)
{
TEST_CLASS(isdigit, DIGIT);
TEST_CLASS(isspace, " \n\r\t");
......
#include "test-tool.h"
#include "cache.h"
static const char *usage_msg = "\n"
" test-date relative [time_t]...\n"
" test-date show:<format> [time_t]...\n"
" test-date parse [date]...\n"
" test-date approxidate [date]...\n"
" test-date timestamp [date]...\n"
" test-date is64bit\n"
" test-date time_t-is64bit\n";
" test-tool date relative [time_t]...\n"
" test-tool date show:<format> [time_t]...\n"
" test-tool date parse [date]...\n"
" test-tool date approxidate [date]...\n"
" test-tool date timestamp [date]...\n"
" test-tool date is64bit\n"
" test-tool date time_t-is64bit\n";
static void show_relative_dates(const char **argv, struct timeval *now)
{
......@@ -81,7 +82,7 @@ static void parse_approx_timestamp(const char **argv, struct timeval *now)
}
}
int cmd_main(int argc, const char **argv)
int cmd__date(int argc, const char **argv)
{
struct timeval now;
const char *x;
......
......@@ -8,14 +8,15 @@
* published by the Free Software Foundation.
*/
#include "test-tool.h"
#include "git-compat-util.h"
#include "delta.h"
#include "cache.h"
static const char usage_str[] =
"test-delta (-d|-p) <from_file> <data_file> <out_file>";
"test-tool delta (-d|-p) <from_file> <data_file> <out_file>";
int cmd_main(int argc, const char **argv)
int cmd__delta(int argc, const char **argv)
{
int fd;
struct stat st;
......
#include "test-tool.h"
#include "git-compat-util.h"
#if defined(GIT_WINDOWS_NATIVE)
......@@ -157,7 +158,7 @@ static int cmd_dropcaches(void)
#endif
int cmd_main(int argc, const char **argv)
int cmd__drop_caches(int argc, const char **argv)
{
cmd_sync();
return cmd_dropcaches();
......
#include "test-tool.h"
#include "cache.h"
#include "tree.h"
#include "cache-tree.h"
......@@ -54,7 +55,7 @@ static int dump_cache_tree(struct cache_tree *it,
return errs;
}
int cmd_main(int ac, const char **av)
int cmd__dump_cache_tree(int ac, const char **av)
{
struct index_state istate;
struct cache_tree *another = cache_tree();
......
#include "test-tool.h"
#include "cache.h"
#include "split-index.h"
#include "ewah/ewok.h"
......@@ -7,7 +8,7 @@ static void show_bit(size_t pos, void *data)
printf(" %d", (int)pos);
}
int cmd_main(int ac, const char **av)
int cmd__dump_split_index(int ac, const char **av)
{
struct split_index *si;
int i;
......
#include "test-tool.h"
#include "cache.h"
#include "object.h"
#include "decorate.h"
int cmd_main(int argc, const char **argv)
int cmd__example_decorate(int argc, const char **argv)
{
struct decoration n;
struct object_id one_oid = { {1} };
......
......@@ -4,9 +4,10 @@
* Copyright (C) 2007 by Nicolas Pitre, licensed under the GPL version 2.
*/
#include "test-tool.h"
#include "git-compat-util.h"
int cmd_main(int argc, const char **argv)
int cmd__genrandom(int argc, const char **argv)
{
unsigned long count, next = 0;
unsigned char *c;
......
#include "test-tool.h"
#include "git-compat-util.h"
#include "hashmap.h"
#include "strbuf.h"
......@@ -77,7 +78,7 @@ static unsigned int hash(unsigned int method, unsigned int i, const char *key)
/*
* Test performance of hashmap.[ch]
* Usage: time echo "perfhashmap method rounds" | test-hashmap
* Usage: time echo "perfhashmap method rounds" | test-tool hashmap
*/
static void perf_hashmap(unsigned int method, unsigned int rounds)
{
......@@ -144,7 +145,7 @@ static void perf_hashmap(unsigned int method, unsigned int rounds)
*
* perfhashmap method rounds -> test hashmap.[ch] performance
*/
int cmd_main(int argc, const char **argv)
int cmd__hashmap(int argc, const char **argv)
{
struct strbuf line = STRBUF_INIT;
struct hashmap map;
......
#include "test-tool.h"
#include "cache.h"
int cmd_main(int argc, const char **argv)
int cmd__index_version(int argc, const char **argv)
{
struct cache_header hdr;
int version;
......
#include "test-tool.h"
#include "cache.h"
#include "parse-options.h"
......@@ -184,14 +185,14 @@ static void analyze_run(void)
}
}
int cmd_main(int argc, const char **argv)
int cmd__lazy_init_name_hash(int argc, const char **argv)
{
const char *usage[] = {
"test-lazy-init-name-hash -d (-s | -m)",
"test-lazy-init-name-hash -p [-c c]",
"test-lazy-init-name-hash -a a [--step s] [-c c]",
"test-lazy-init-name-hash (-s | -m) [-c c]",
"test-lazy-init-name-hash -s -m [-c c]",
"test-tool lazy-init-name-hash -d (-s | -m)",
"test-tool lazy-init-name-hash -p [-c c]",
"test-tool lazy-init-name-hash -a a [--step s] [-c c]",
"test-tool lazy-init-name-hash (-s | -m) [-c c]",
"test-tool lazy-init-name-hash -s -m [-c c]",
NULL
};
struct option options[] = {
......
#include "test-tool.h"
#include "cache.h"
#include "tree.h"
int cmd_main(int ac, const char **av)
int cmd__match_trees(int ac, const char **av)
{
struct object_id hash1, hash2, shifted;
struct tree *one, *two;
......
#include "test-tool.h"
#include "cache.h"
#include "mergesort.h"
......@@ -22,7 +23,7 @@ static int compare_strings(const void *a, const void *b)
return strcmp(x->text, y->text);
}
int cmd_main(int argc, const char **argv)
int cmd__mergesort(int argc, const char **argv)
{
struct line *line, *p = NULL, *lines = NULL;
struct strbuf sb = STRBUF_INIT;
......
/*
* test-mktemp.c: code to exercise the creation of temporary files
*/
#include "test-tool.h"
#include "git-compat-util.h"
int cmd_main(int argc, const char **argv)
int cmd__mktemp(int argc, const char **argv)
{
if (argc != 2)
usage("Expected 1 parameter defining the temporary file template");
......
#include "test-tool.h"
#include "git-compat-util.h"
#include "thread-utils.h"
int cmd_main(int argc, const char **argv)
int cmd__online_cpus(int argc, const char **argv)
{
printf("%d\n", online_cpus());
return 0;
......
#include "test-tool.h"
#include "cache.h"
#include "string-list.h"
......@@ -170,7 +171,7 @@ static struct test_data dirname_data[] = {
{ NULL, NULL }
};
int cmd_main(int argc, const char **argv)
int cmd__path_utils(int argc, const char **argv)
{
if (argc == 3 && !strcmp(argv[1], "normalize_path_copy")) {
char *buf = xmallocz(strlen(argv[2]));
......
#include "test-tool.h"
#include "cache.h"
#include "prio-queue.h"
......@@ -16,7 +17,7 @@ static void show(int *v)
free(v);
}
int cmd_main(int argc, const char **argv)
int cmd__prio_queue(int argc, const char **argv)
{
struct prio_queue pq = { intcmp };
......
#include "test-tool.h"
#include "cache.h"
int cmd_main(int argc, const char **argv)
int cmd__read_cache(int argc, const char **argv)
{
int i, cnt = 1;
if (argc == 2)
......
#include "test-tool.h"
#include "cache.h"
#include "refs.h"
#include "worktree.h"
......@@ -275,7 +276,7 @@ static struct command commands[] = {
{ NULL, NULL }
};
int cmd_main(int argc, const char **argv)
int cmd__ref_store(int argc, const char **argv)
{
struct ref_store *refs;
const char *func;
......
#include "test-tool.h"
#include "git-compat-util.h"
#include "gettext.h"
......@@ -36,7 +37,7 @@ static int test_regex_bug(void)
return 0;
}
int cmd_main(int argc, const char **argv)
int cmd__regex(int argc, const char **argv)
{
const char *pat;
const char *str;
......@@ -47,8 +48,8 @@ int cmd_main(int argc, const char **argv)
if (argc == 2 && !strcmp(argv[1], "--bug"))
return test_regex_bug();
else if (argc < 3)
usage("test-regex --bug\n"
"test-regex <pattern> <string> [<options>]");
usage("test-tool regex --bug\n"
"test-tool regex <pattern> <string> [<options>]");
argv++;
pat = *argv++;
......
......@@ -8,6 +8,7 @@
* published by the Free Software Foundation.
*/
#include "test-tool.h"
#include "cache.h"
#include "commit.h"
#include "diff.h"
......@@ -45,7 +46,7 @@ static int run_revision_walk(void)
return got_revision;
}
int cmd_main(int argc, const char **argv)
int cmd__revision_walking(int argc, const char **argv)
{
if (argc < 2)
return 1;
......
......@@ -8,6 +8,7 @@
* published by the Free Software Foundation.
*/
#include "test-tool.h"
#include "git-compat-util.h"
#include "run-command.h"
#include "argv-array.h"
......@@ -49,7 +50,7 @@ static int task_finished(int result,
return 1;
}
int cmd_main(int argc, const char **argv)
int cmd__run_command(int argc, const char **argv)
{
struct child_process proc = CHILD_PROCESS_INIT;
int jobs;
......
#include "test-tool.h"
#include "cache.h"
#include "lockfile.h"
#include "tree.h"
......@@ -5,7 +6,7 @@
static struct lock_file index_lock;
int cmd_main(int ac, const char **av)
int cmd__scrap_cache_tree(int ac, const char **av)
{
setup_git_directory();
hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
......
#include "test-tool.h"
#include "cache.h"
#include "sha1-array.h"
......@@ -7,7 +8,7 @@ static int print_oid(const struct object_id *oid, void *data)
return 0;
}
int cmd_main(int argc, const char **argv)
int cmd__sha1_array(int argc, const char **argv)
{
struct oid_array array = OID_ARRAY_INIT;
struct strbuf line = STRBUF_INIT;
......
#include "test-tool.h"
#include "cache.h"
int cmd_main(int ac, const char **av)
int cmd__sha1(int ac, const char **av)
{
git_SHA_CTX ctx;
unsigned char sha1[20];
......
#!/bin/sh
dd if=/dev/zero bs=1048576 count=100 2>/dev/null |
/usr/bin/time t/helper/test-sha1 >/dev/null
/usr/bin/time t/helper/test-tool sha1 >/dev/null
while read expect cnt pfx
do
......@@ -11,7 +11,7 @@ do
test -z "$pfx" || echo "$pfx"
dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null |
perl -pe 'y/\000/g/'
} | ./t/helper/test-sha1 $cnt
} | ./t/helper/test-tool sha1 $cnt
)
if test "$expect" = "$actual"
then
......
#include "test-tool.h"
#include "cache.h"
#include "sigchain.h"
......@@ -13,7 +14,7 @@ X(two)
X(three)
#undef X
int cmd_main(int argc, const char **argv) {
int cmd__sigchain(int argc, const char **argv) {
sigchain_push(SIGTERM, one);
sigchain_push(SIGTERM, two);
sigchain_push(SIGTERM, three);
......
#include "test-tool.h"
#include "cache.h"
int cmd_main(int argc, const char **argv)
int cmd__strcmp_offset(int argc, const char **argv)
{
int result;
size_t offset;
......
#include "test-tool.h"
#include "cache.h"
#include "string-list.h"
......@@ -41,7 +42,7 @@ static int prefix_cb(struct string_list_item *item, void *cb_data)
return starts_with(item->string, prefix);
}
int cmd_main(int argc, const char **argv)
int cmd__string_list(int argc, const char **argv)
{
if (argc == 5 && !strcmp(argv[1], "split")) {
struct string_list list = STRING_LIST_INIT_DUP;
......
#include "test-tool.h"
#include "cache.h"
#include "config.h"
#include "submodule-config.h"
......@@ -10,7 +11,7 @@ static void die_usage(int argc, const char **argv, const char *msg)
exit(1);
}
int cmd_main(int argc, const char **argv)
int cmd__submodule_config(int argc, const char **argv)
{
const char **arg = argv;
int my_argc = argc;
......
#include "test-tool.h"
#include "cache.h"
#include "run-command.h"
int cmd_main(int argc, const char **argv)
int cmd__subprocess(int argc, const char **argv)
{
struct child_process cp = CHILD_PROCESS_INIT;
int nogit = 0;
......
#include "git-compat-util.h"
#include "test-tool.h"
struct test_cmd {
const char *name;
int (*fn)(int argc, const char **argv);
};
static struct test_cmd cmds[] = {
{ "chmtime", cmd__chmtime },
{ "config", cmd__config },
{ "ctype", cmd__ctype },
{ "date", cmd__date },
{ "delta", cmd__delta },
{ "drop-caches", cmd__drop_caches },
{ "dump-cache-tree", cmd__dump_cache_tree },
{ "dump-split-index", cmd__dump_split_index },
{ "example-decorate", cmd__example_decorate },
{ "genrandom", cmd__genrandom },
{ "hashmap", cmd__hashmap },
{ "index-version", cmd__index_version },
{ "lazy-init-name-hash", cmd__lazy_init_name_hash },
{ "match-trees", cmd__match_trees },
{ "mergesort", cmd__mergesort },
{ "mktemp", cmd__mktemp },
{ "online-cpus", cmd__online_cpus },
{ "path-utils", cmd__path_utils },
{ "prio-queue", cmd__prio_queue },
{ "read-cache", cmd__read_cache },
{ "ref-store", cmd__ref_store },
{ "regex", cmd__regex },
{ "revision-walking", cmd__revision_walking },
{ "run-command", cmd__run_command },
{ "scrap-cache-tree", cmd__scrap_cache_tree },
{ "sha1-array", cmd__sha1_array },
{ "sha1", cmd__sha1 },
{ "sigchain", cmd__sigchain },
{ "strcmp-offset", cmd__strcmp_offset },
{ "string-list", cmd__string_list },
{ "submodule-config", cmd__submodule_config },
{ "subprocess", cmd__subprocess },
{ "urlmatch-normalization", cmd__urlmatch_normalization },
{ "wildmatch", cmd__wildmatch },
{ "write-cache", cmd__write_cache },
};
int cmd_main(int argc, const char **argv)