@collinfunk @wolf480pl In my view the only time 'mkdir -p' should fail is if at the end of its work, there is no 'a/b'. People using 'mkdir -p' care about whether or not the result exists, not how it got there. (Of course it could be renamed immediately afterward before your script does anything else, but so can anything.)
I think POSIX can be read to be more narrow than this, but if so, deviation is likely to be extremely common in mkdirs in practice.