[BUG / possible BUG] Irregular naming of output files
Closed this issue · 2 comments
Before you open an issue please check which version you are running and whether it is the latest in stable / dev branch
I am running version 3.2.1.
Before you open an issue please whether this is a known problem by searching the issues
I couldn't find anything.
Command line to reproduce
mkdir testssl-results
testssl --logfile testssl-results --jsonfile-pretty testssl-results --csvfile testssl-results --htmlfile testssl-results --mode=parallel --quiet --warnings=batch --wide --color=0 --show-each --file my_website_list.txt
Expected behavior
When I'm asking testssl to produce the report in multiple formats (I'm not yet sure about which tools I or others will use for analysing the results), I sometimes see that the filenames from tests of a single site have different datetime parts. E.g.:
ls -l testssl-results/ceet.vsb.cz_p443-*
-rw-r--r-- 1 jdvorak users 38467 Sep 24 23:17 testssl-results/ceet.vsb.cz_p443-20250924-2257.csv
-rw-r--r-- 1 jdvorak users 37386 Sep 24 23:17 testssl-results/ceet.vsb.cz_p443-20250924-2257.html
-rw-r--r-- 1 jdvorak users 72781 Sep 24 23:17 testssl-results/ceet.vsb.cz_p443-20250924-2257.json
-rw-r--r-- 1 jdvorak users 31570 Sep 24 23:17 testssl-results/ceet.vsb.cz_p443-20250924-2258.log
I'd expect all log files from a single run to use a uniform datetime part, namely the one derived from the datetime the test started. I'd love all the files mentioned above to be named ceet.vsb.cz_p443-20250924-2257.*, as that's the minute when the tests of that site started.
Your system:
- OS: Debian GNU/Linux 13 (trixie)
- Platform: Linux 6.12.48+deb13-amd64 x86_64
- OpenSSL + bash: OpenSSL 3.5.1 (Jul 12 2025) [~103 ciphers] + bash 5.2.37
Additional context
Processing the results of mass testing is made unnecessarily difficult by this inconsistency.
Also, describing a dataset containing such results is challenging.
It is surprisingly frequent: I'm currently running an extensive experiment and I'm finding the inconsistent file naming for almost a half of all sites I'm testing:
ls testssl-results | sed -e 's/\.[a-z]*$//' | sort | uniq -c | awk '{ print $1 }' | sort | uniq -c
63 1
63 3
67 4
From a manual inspection it looks like most often the creation of the *.log file is delayed.
I was running it on a CPU-challenged server, which may be why I saw this effect so frequently.
Running on a stronger server reduces the frequency, but the problem remains.
Thanks! Good point.
As of now each of the logging functions which creates a log file provides an own date call . And in fact the *log file comes last.
Fix would be to pass a common timestamp to those functions.