Fossil Forum
Post: New test suite ready for testing
The fossil test suite has been updated and re-enabled, currently on branch test-suite-new. It would be helpful if people want to try it and say what they find. There is a lot more coverage of Fossil functionality, and a lot of knownBugs related to case problems in Fossil being worked on elsewhere. I have run this on a few different platforms but wider testing would really help including on Windows and MacOS.
Thanks!
--
Dan Shearer
[email protected] / https://shearer.org
Tried test-suite-new at [b881f34206] on macOS 26.5 (Apple Silicon), Apple clang 21, Tcl 9.0.4, with a plain ./configure && make && make test: 45137 tests, 8 errors, 39 known bugs.
All 8 errors are unicode-pathnames-on-{nfd,hangul,kana,arabic}-{ls,cat}. Each pair differs only by normalization (NFC vs NFD) in the same case. On macOS fossil converts every argument and pathname from Apple's decomposed UTF-8 to NFC (fossil_path_to_utf8() at src/main.c:487, iconv "UTF-8-MAC" in src/utf8.c), so with case-sensitive on, "fossil ls" given the NFD spelling finds the NFC file. That is by design on macOS, so those four pairs probably want a macOS-specific expectation rather than an error or a knownBug.
Skipped: json, th1-docs, th1-hooks, th1-tcl (not compiled in), merge5, part of th1 (not run inside a repository checkout), and parts of unicode-pathnames. One compiler warning, an OpenSSL 4.1 deprecation in http_ssl.c.
Thanks, the test is wrong on MacOS then. I don't want to write #ifdef Darwin into the test, but we can use fossil test-echo NAME. We run test-echo on each pair of names, and if Fossil forces the spellings to be the same then that's the constraint on this system.
Do you see "OK (knownBug)?" lines for unicode-pathnames-off-nfd-ls and the hangul, and arabic tests? I think this is the same thing and the fix I have in mind would stop these being knownBugs on macOS.
Please can you run this on MacOS and show me the output:
# Human readable so you can see what is going on
fossil test-echo $'a\xcc\x82\xcc\xa3.txt' $'\xef\xa4\x80.txt' $'\xe0\xa5\x98.txt'
# The actual test
fossil test-echo --hex $'a\xcc\x82\xcc\xa3.txt' $'\xef\xa4\x80.txt' $'\xe0\xa5\x98.txt'
What I'm looking for is whether the output is the input spelling unchanged, or not.
Thanks,
Dan Shearer
Branch test-suite-new has fixes to try, following initial reports on MacOS and Windows. Thanks!
Dan Shearer
At test-suite-new [8d6d99f2c6], macOS 26.5, Apple Silicon:
$ fossil test-echo --hex $'a\xcc\x82\xcc\xa3.txt' $'\xef\xa4\x80.txt' $'\xe0\xa5\x98.txt'
...
argv[2] = [c3a2cca32e747874]
argv[3] = [efa4802e747874]
argv[4] = [e0a5982e747874]
The first name is changed (to c3a2 cca3, which is not quite NFC), the other two come back as given. With your fix the 8 unicode-pathnames errors are gone. Whole suite with make test: 45137 tests, 0 errors, 39 known bugs, all unicode-pathnames-off-* for 13 labels.
I think this is now fixed on the branch test-suite-new. I read Apple's documentation on this point several times and I have hopefully summarised it in utf8.c comments, with references.
Dan Shearer
After much-appreciated contributions and testing, test-suite-new branch has moved on a lot:
- Windows and MacOS now work (danield, dmestas, others)
- Warren Young added three
-assurancelevels:smoke,ci, andstress. The default level is smoke and it runs very quickly to gives an indicative result that all is well.ciandstressare progressively more intense and take longer. Example invocation:make test TESTFLAGS="-assurance stresswill test everything. Each level also runs the tests in the level(s) below. - Warren also improved the correctness and efficiency of Unicode tests (
unicode-pathnamesandutf8) The utf8 tests verify Fossil's text detection via a Tcl version of the Fossil code. The pathname test verifies against the Unicode D145 standard and currently has failing bugs on Linux; basically, if you're into Unicode this should make you happy. There are many knownBugs forutf8.test, ranging from ~100 on Linuxes to ~40 on MacOS, depending on how systems are set up. - I added a simulator for powerloss and process kill conditions, which has detected 8 dataloss knownBugs, and another 20 or so where checkout or repos are left in a bad state. The simulator is in
tools/powerlossand is intended to be generic to any SQLite program.
There's more to come, but this is looking good.
Dan
After much-appreciated contributions and testing, test-suite-new branch has moved on a lot:
- Windows and MacOS now work (danield, dmestas, others)
- Warren Young added three
-assurancelevels:smoke,ci, andstress. The default level is smoke and it runs very quickly to gives an indicative result that all is well.ciandstressare progressively more intense and take longer. Example invocation:make test TESTFLAGS="-assurance stress"will test everything. Each level also runs the tests in the level(s) below. - Warren also improved the correctness and efficiency of Unicode tests (
unicode-pathnamesandutf8) The utf8 tests verify Fossil's text detection via a Tcl version of the Fossil code. The pathname test verifies against the Unicode D145 standard and currently has failing bugs on Linux; basically, if you're into Unicode this should make you happy. There are many knownBugs forutf8.test, ranging from ~100 on Linuxes to ~40 on MacOS, depending on how systems are set up. - I added a simulator for powerloss and process kill conditions, which has detected 8 dataloss knownBugs, and another 20 or so where checkout or repos are left in a bad state. The simulator is in
tools/powerlossand is intended to be generic to any SQLite program.
There's more to come, but this is looking good.
Dan