70f5ad4d3afb51df8cd4c1b40dd75a6a0d0ee915
braney
  Sat Jan 29 08:13:53 2022 -0800
require that chromAliasSetup be called at init time to avoid potential
thread race conditions

diff --git src/hg/lib/tests/hgvsTester.c src/hg/lib/tests/hgvsTester.c
index de4819d..435ce45 100644
--- src/hg/lib/tests/hgvsTester.c
+++ src/hg/lib/tests/hgvsTester.c
@@ -1,27 +1,28 @@
 /* hgvsTester -- exercise lib/hgHgvs.c */
 
 /* Copyright (C) 2016 The Regents of the University of California
  * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
 
 #include "common.h"
 #include "hgHgvs.h"
 #include "genbank.h"
 #include "knetUdc.h"
 #include "linefile.h"
 #include "memalloc.h"
 #include "options.h"
+#include "chromAlias.h"
 
 static struct optionSpec optionSpecs[] = {
     {NULL, 0}
 };
 
 void usage()
 /* explain usage and exit */
 {
 errAbort(
 "hgvsTester - test program for lib/hgHgvs.c\n\n"
 "usage:\n"
 "    hgvsTester db inputFile\n"
 //"options:\n"
 "Each line of inputFile is either a \"#\"-comment line or an HGVS(-like) term.\n"
          );
@@ -83,23 +84,24 @@
 lineFileClose(&lf);
 carefulCheckHeap();
 return 0;
 }
 
 int main(int argc, char *argv[])
 {
 // Check args
 optionInit(&argc, argv, optionSpecs);
 if (argc != 3)
     usage();
 char *db = argv[1];
 char *inputFile = argv[2];
 // Set up environment
 pushCarefulMemHandler(LIMIT_2or6GB);
+chromAliasSetup(db);
 initGenbankTableNames(db);
 if (udcCacheTimeout() < 300)
     udcSetCacheTimeout(300);
 udcSetDefaultDir("./udcCache");
 knetUdcInstall();
 
 return testHgvsTerms(db, inputFile);
 }