]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add missing return value check in test-dirent-util 31932/head
authorLuca Boccassi <bluca@debian.org>
Mon, 25 Mar 2024 12:05:28 +0000 (12:05 +0000)
committerLuca Boccassi <bluca@debian.org>
Mon, 25 Mar 2024 12:25:18 +0000 (12:25 +0000)
CID#1540029

Follow-up for 6a57d86bf9d7f8d6f5d339f57665dfb2e1d191c5

src/test/test-dirent-util.c

index f9816973bfce632f566f1d02cdbea768a3d08357..be0496904f8a999c8fae133be5ae4c9505efd957 100644 (file)
@@ -23,10 +23,8 @@ TEST (test_dirent_ensure_type) {
                 .d_name = "test",
         };
 
-        assert_se(de.d_type == DT_UNKNOWN);
-
         dir_fd = 0;
-        dirent_ensure_type(dir_fd, &de);
+        assert_se(dirent_ensure_type(dir_fd, &de) == -ENOTDIR);
 
         /* Test when d_name is "." or ".." */
         strcpy(de.d_name, ".");