On MIPS, there might be leak of some memory in libc when we call getpwnam_r, so it fails with a lsan error, otherwise assertions used in this test are positive.
Please investigate this issue in more details. "There might be some leak in getpwnam_r" is not a good enough reason to exclude this test on MIPS (note that it also runs for ASan, TSan, MSan, not just for LSan).
Looks like there was issue with some library on the machine I was working on previously, as I am unable to replicate error on any other mips(el/eb) machine.
Abandoning this change.