This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op/exec.t: ENOTDIR is a legit errno
authorKarl Williamson <khw@cpan.org>
Thu, 9 Apr 2020 18:02:12 +0000 (12:02 -0600)
committerSawyer X <xsawyerx@cpan.org>
Wed, 27 May 2020 08:09:32 +0000 (11:09 +0300)
commit28bfed14e7471c9d91c7ca03b095d6b8899c85ab
tree8db5d58bbfdd1360c99365c9d661a742d3285843
parent900fde54b03c8c8b6fbbb129e343df7887c25d3f
op/exec.t: ENOTDIR is a legit errno

This test file does a system() on a non-existent file, and checks
that an error happens, and that the errno is one that is expected.
Prior to this commit it didn't think that ENOTDIR could happen.

But it can If PATH contains a component that is plain file, or, on some
systems, a component simply doesn't exist.

I examined the possible errnos listed in a Linux man page for this, and
this looked to be the only one that is likely to come up that weren't
already covered.

This fixes GH #17515
t/op/exec.t