rmdir should fail with either ENOTEMPTY or EEXIST (the first one is preferred) when the last component of the supplied path is dot-dot.
rmdir
ENOTEMPTY
EEXIST