99eb74885ff5bce42cadafee93274df7039dcab5 braney Sat Sep 26 17:34:11 2026 -0700 unit tests for four v503 tickets, refs #38391, #37262, #38120, #38107, #38125, #38154 cgiDecodeTest prints what malformed and cut-short %hh escapes decode to, and checks that cgiDecode never reads past the length it is given. udcDotsTest prints the cache directory udc makes for remote URLs with "." and ".." in them, including the ones that must abort. pngWriteTest writes a memGfx image as a PNG, reads it back with libpng, compares every pixel, and checks the row filter of every row. pgSnpManyAllelesTester builds per-allele counts from a VCF record with 150 ALT alleles. Each test fails with its fix backed out, except that zlib-ng was not swapped out for #38125. The test registry gets a row for each ticket. diff --git src/hg/lib/tests/makefile src/hg/lib/tests/makefile index aead40b5610..7cd481fcf49 100644 --- src/hg/lib/tests/makefile +++ src/hg/lib/tests/makefile @@ -15,31 +15,31 @@ ${BIN_DIR}/binTest \ ${BIN_DIR}/customTrackTester \ ${BIN_DIR}/hgvsTester \ ${BIN_DIR}/sqlCheck # annoGratorTester is left out, like the annoGratorTest target below. A commented # line inside the list above would comment out every entry after it, because the # backslash on the line before joins them into one line. ${BIN_DIR}/%: %.c ${MYLIBS} @${MKDIR} ${BIN_DIR} ${CC} ${CC_PROG_OPTS} -o $@ $*.c ${MYLIBS} $L #test: binTest spDbTest hdbTest genePredTest pslReaderTest annoGratorTest customTrackTest hgvsTest test: binTest quickLiftTest sessionDataTest trashDirTest mallocTopPadTest \ hVarSubstHtmlTest dataVersionPathTest genarkLiftOverTest \ - snapshotTypeTest sessionDirTest geoMirrorSelfTest asForDbTest vcfInfoFilterTest \ + snapshotTypeTest sessionDirTest geoMirrorSelfTest asForDbTest vcfInfoFilterTest pgSnpManyAllelesTest \ trackHubSkipHubNameTest spDbTest hdbTest genePredTest pslReaderTest customTrackTest hgvsTest rm -r output echo tested all mkdirs: @${MKDIR} output ${BIN_DIR} loaders: ln -sf ${CGI_BIN}/loader . spDbTest: ${BIN_DIR}/spDbTest mkdirs ${BIN_DIR}/spDbTest sp121210 Q9FFH7 > output/spDbTest ${BIN_DIR}/spDbTest sp121210 P29312 >> output/spDbTest diff expected/spDbTest output/spDbTest @@ -168,26 +168,33 @@ # The conf a CGI reads, not the developer's own: isGenArk() needs genarkHubPrefix, which is # set in the shared one. asForDbTest: mkdirs ${CC} ${CC_PROG_OPTS} -o ${BIN_DIR}/asForDbTester asForDbTester.c ${MYLIBS} $L echo "include /usr/local/apache/cgi-bin/hg.conf" > output/genark.conf HGDB_CONF=output/genark.conf ${BIN_DIR}/asForDbTester > output/asForDbTest 2>&1 diff expected/asForDbTest output/asForDbTest # The warnings for filters a VCF cannot support are part of what is checked, so the tester # prints them in line with its other output rather than on stderr. vcfInfoFilterTest: mkdirs ${CC} ${CC_PROG_OPTS} -o ${BIN_DIR}/vcfInfoFilterTester vcfInfoFilterTester.c ${MYLIBS} $L ${BIN_DIR}/vcfInfoFilterTester > output/vcfInfoFilterTest diff expected/vcfInfoFilterTest output/vcfInfoFilterTest +# per-allele counts from a VCF record with more alleles than the old fixed array held. +# refs #38154 +pgSnpManyAllelesTest: mkdirs + ${CC} ${CC_PROG_OPTS} -o ${BIN_DIR}/pgSnpManyAllelesTester pgSnpManyAllelesTester.c ${MYLIBS} $L + ${BIN_DIR}/pgSnpManyAllelesTester > output/pgSnpManyAllelesTest + diff expected/pgSnpManyAllelesTest output/pgSnpManyAllelesTest + trackHubSkipHubNameTest: mkdirs ${CC} ${CC_PROG_OPTS} -o ${BIN_DIR}/trackHubSkipHubNameTester trackHubSkipHubNameTester.c ${MYLIBS} $L ${BIN_DIR}/trackHubSkipHubNameTester > output/trackHubSkipHubNameTest diff expected/trackHubSkipHubNameTest output/trackHubSkipHubNameTest sqlCheck: ${BIN_DIR}/sqlCheck mkdirs ${MAKE} -f sqlCheck.mk test BIN_DIR=${BIN_DIR} OUT_DIR=output clean: rm -rf *.o bin output *.tmp loader udcCache