summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2021-04-27 16:22:35 +1000
committerTony Cook <tony@develop-help.com>2021-05-24 11:56:21 +1000
commit8f432bc3ba869d057076b810871aa3c2071b7229 (patch)
tree5cefecb65c3df5bc1e64505e5a5ccf68135f9cbf /t
parenteaff4b50d983fd793969cf023a908f339b84e1ec (diff)
downloadperl-8f432bc3ba869d057076b810871aa3c2071b7229.tar.gz
fix utime() to set $!/errno when called on a closed handle
My 8334cae65 was intended to fix this, but the test was faulty, and didn't correctly fail. This started showing as a failure on cygwin, with the fixed test it also fails on Linux, so fix doio.c as well.
Diffstat (limited to 't')
-rw-r--r--t/io/fs.t1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/io/fs.t b/t/io/fs.t
index a36fbe83ae..0628df8afa 100644
--- a/t/io/fs.t
+++ b/t/io/fs.t
@@ -265,6 +265,7 @@ SKIP: {
check_utime_result($ut, $accurate_timestamps, $delta);
# [perl #122703]
close $fh;
+ $! = 0;
ok(!utime($ut,$ut + $delta, $fh),
"utime fails on a closed file handle");
isnt($!+0, 0, "and errno was set");