summaryrefslogtreecommitdiffstats
path: root/testsuites/fstests/fsnofs01/init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2021-06-08 13:14:53 -0500
committerJoel Sherrill <joel@rtems.org>2021-06-08 13:14:53 -0500
commitdbe355bfe79ef6a21248d210e7530274be8194fd (patch)
treec3bb50ee84a846d1a4778abdfbe5677878811d8c /testsuites/fstests/fsnofs01/init.c
parentscore: Remove unused _Per_CPU_Initialize() decl (diff)
downloadrtems-dbe355bfe79ef6a21248d210e7530274be8194fd.tar.bz2
fsnofs01/init.c: Check for ENOENT from utime().
The addition of the entire *utime*() family of functions resulted in this call returning ENOENT not ENXIO. This is better aligned with the POSIX definition of the methods.
Diffstat (limited to '')
-rw-r--r--testsuites/fstests/fsnofs01/init.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/testsuites/fstests/fsnofs01/init.c b/testsuites/fstests/fsnofs01/init.c
index 6260697833..659ee44a7a 100644
--- a/testsuites/fstests/fsnofs01/init.c
+++ b/testsuites/fstests/fsnofs01/init.c
@@ -187,7 +187,6 @@ static void test_path_ops(void)
char buf [32];
ssize_t n = 0;
const char *path = "/";
- const struct utimbuf times;
errno = 0;
rv = open(path, O_RDONLY);
@@ -294,10 +293,14 @@ static void test_path_ops(void)
rtems_test_assert(rv == -1);
rtems_test_assert(errno == ENXIO);
+ /*
+ * Pass in NULL so the new access and modification time are interpreted
+ * as being the current time. Otherwise, the value has to be validated.
+ */
errno = 0;
- rv = utime(path, &times);
+ rv = utime(path, NULL);
rtems_test_assert(rv == -1);
- rtems_test_assert(errno == ENXIO);
+ rtems_test_assert(errno == ENOENT);
}
static void test_user_env(void)