Blob Blame History Raw
From 7e93df5a4458413895a48a8cd6cfcb773ed1fa90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 25 May 2011 17:17:17 +0200
Subject: [PATCH] Adjust test to confinded Fedora Koji build system

Koji glibc returns EACCES instead of ENOENT while executing
non-existent command.

Reported to upstream: https://rt.cpan.org/Public/Bug/Display.html?id=68476
---
 test.t |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/test.t b/test.t
index c8fd833..d9810de 100644
--- a/test.t
+++ b/test.t
@@ -41,7 +41,7 @@ END {
 }
 
 use Proc::SyncExec	qw(fork_retry sync_exec sync_open);
-use POSIX		qw(EACCES ENOENT);
+use POSIX		qw(EACCES ENOENT EACCES);
 
 my ($fh, $pid, $s, $r, @l);
 
@@ -50,7 +50,7 @@ ok $@ eq '', $@;
 
 $pid = sync_exec 'this better not exist', 23;
 ok !defined $pid, $pid;
-ok $! == ENOENT, $!;
+ok $! == ENOENT || $! == EACCES, $!;
 
 $pid = sync_exec '/';
 ok !defined $pid, $pid;
@@ -65,7 +65,7 @@ ok $? == 23 * 256, $?;
 close READ; # squelch used only once warning
 $pid = sync_open *READ, 'this-better-not-exist-either foo|';
 ok !defined $pid, $pid;
-ok $! == ENOENT, $!;
+ok $! == ENOENT || $! == EACCES, $!;
 
 $pid = sync_open *WRITE, "|$^X -we 'exit <STDIN>'";
 ok $pid, $!;
-- 
1.7.4.4