X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/93972b1d94efff4ef73f43f7a5417a6e2cdd75dd..ad10a5e772bcb9798b9b56a9fcdc73f6dd3d7376:/doc/plugins/trail/discussion.mdwn diff --git a/doc/plugins/trail/discussion.mdwn b/doc/plugins/trail/discussion.mdwn index d08bd7477..e151466f9 100644 --- a/doc/plugins/trail/discussion.mdwn +++ b/doc/plugins/trail/discussion.mdwn @@ -42,7 +42,8 @@ work, but before sorting. > prebuild, but dunno that the hook prolieration is worth the minor cleanup > it allows in trail. --[[Joey]] ->> Hmm, t/trail.t is failing several tests here. --[[Joey]] +>> Hmm, t/trail.t is failing several tests here. To reproduce, I build the +>> debian package from a clean state, or `rm -rf .t` between test runs. --[[Joey]]
 t/trail.t .................... 1/? 
@@ -59,4 +60,30 @@ t/trail.t .................... 1/?
 #   Failed test at t/trail.t line 231.
 
-> These all seem to relate to sorting. --[[Joey]] +> Looking at the first of these, it expected "trail=sorting n=sorting/new p=" +> but gets: "trail=sorting n=sorting/ancient p=sorting/new" +> +> Looking at the second failure, it expected "trail=sorting n=sorting/middle p=sorting/old$" +> but got: "trail=sorting n=sorting/old p=sorting/end" +> +> Perhaps a legitimate bug? --[[Joey]] + +>> I saw this while developing, but couldn't reproduce it, and assumed +>> I'd failed to update `blib` before `make test`, or some such. +>> In fact it's a race condition, I think. +>> +>> The change and failure here is that `sorting.mdwn` is modified +>> to sort its trail in reverse order of title. Previously, it +>> was sorted by order of directives in the page, and secondarily +>> by whatever sort order each directive specified (e.g. +>> new, old and ancient were sorted by increasing age). +>> `old` appearing between `new` and `ancient`, and `new` appearing +>> between `end` and `old`, indicates that this re-sorting has not +>> actually taken effect, and the old sort order is still used. +>> +>> I believe this is because the system time (as an integer) remained +>> the same for the entire test, and mtimes as used in ikiwiki +>> only have a 1-second resolution. We can either fix this with +>> utime or sleep; I chose utime, since sleeping for 1 second would +>> slow down the test significantly. Please merge or cherry-pick +>> `smcv/trail-test` (there's only one commit). --[[smcv]]