summaryrefslogtreecommitdiff
path: root/tests/test-open.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:50 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:50 +0100
commitff33e1d252f46bec1a33e28700da3282fc24047a (patch)
tree5c15bc695be820b393a8496c5807ecafbbdeb89b /tests/test-open.h
parentb2ac982cc8b5290699eb5f52fb043d3d15e2624b (diff)
parent5f59a34ab747dde8ede7357f3431bf06bd6002fe (diff)
Update upstream source from tag 'upstream/1.4.2'
Update to upstream version '1.4.2' with Debian dir 493e96bcd865e4f9990e20bee26408c96231d727
Diffstat (limited to 'tests/test-open.h')
-rw-r--r--tests/test-open.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/test-open.h b/tests/test-open.h
index 1a80af45..6a0a8b3e 100644
--- a/tests/test-open.h
+++ b/tests/test-open.h
@@ -1,5 +1,5 @@
/* Test of opening a file descriptor.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,8 +32,9 @@
# define ALWAYS_INLINE
#endif
-/* This file is designed to test both open(n,buf[,mode]) and
- openat(AT_FDCWD,n,buf[,mode]). FUNC is the function to test.
+/* This file is designed to test open(n,buf[,mode]),
+ openat(dfd,n,buf[,mode]), and openat2(dfd,n,how,size).
+ FUNC is the function to test; for openat and openat2 it is a wrapper.
Assumes that BASE and ASSERT are already defined, and that
appropriate headers are already included. If PRINT, warn before
skipping symlink tests with status 77. */
@@ -144,9 +145,7 @@ test_open (int (*func) (char const *, int, ...), bool print)
{
/* Since the O_CLOEXEC handling goes through a special code path at its
first invocation, test it twice. */
- int i;
-
- for (i = 0; i < 2; i++)
+ for (int i = 0; i < 2; i++)
{
int flags;