tests: add "max_num_events" test

To verify we do get EMFILE