tests: add test of EMFILE error return
tests: add test to trigger EACCES