The assumption is that newly opened files will return a successively greater file descriptor number. This assumption is true most of the time, but not always. Other code in the same process, or side effects of standard libraries may cause some descriptors to close, resulting in smaller file descriptor numbers for newly opened files. After careful consideration, I decided that a static test was simpler and more appropriate here. Also, if the order in which the test is being performed matters, it is therefore not very self contained and too sensitive to future changes.
Simplicity is key to maintainability.
I found myself constantly rewriting this test, shuffling the order of sub-tests within and adding more and more code to it. The result was an obfuscated test that did not help the reader understand why things were written the way they were. I broke the test's reliability for at least 1-2 other systems. This alone took about half of the time I spent autoconfiscating Amd. First, I had to rename all of the CPP symbols used in the code in accordance with the new standardly named ones offered by Autoconf.