mirror of
https://github.com/openbsd/src.git
synced 2024-12-21 23:18:00 -08:00
325be88392
what it was intended to test. The intention was to test that src/bin/ps/utf8.c handles embedded NUL bytes correctly, just as the other tests in the same group test the handling of various other non-printable characters. But testing that does not work for multiple reasons. Neither does the shell pass the NUL byte to the called test program as intended, nor can argv[] in a C program contain a NUL byte in the middle of an argument, simply because in the C language, a string is defined to end at the first NUL byte. On top of all that, even the function mbswprint() that was supposed to be tested terminates the processing of the multi-byte input string as soon as it encounters a NUL byte (all of which is correct behaviour). So this particular subtest was totally bogus and only worked by accident, for reasons completely unrelated to the intended purpose. I don't think the test needs to be replaced by anything else. NUL bytes in the middle of a program argument just aren't a thing in the first place. Thanks to deraadt@ for asking what the purpose of this test_ps() call was. |
||
---|---|---|
.. | ||
cat | ||
chmod | ||
csh | ||
ed | ||
expr | ||
ksh | ||
ln | ||
md5 | ||
pax | ||
ps | ||
test | ||
Makefile |