2024-05-20 Paul Eggert <eggert@cs.ucla.edu>
+ linkat-tests: fix up assertion-failure changes
+ * tests/test-linkat.c (main): Don’t lose the failure results of
+ earlier tests. Problem found by Coverity.
+
dfa: attempt to pacify Coverity
* lib/dfa.c (lex): Use ‘assume’ rather than ‘abort’,
to try to pacify Coverity.
/* Skip the rest of the test if the file system does not support hard links
and symlinks. */
if (result)
- return result;
+ return test_exit_status ? test_exit_status : result;
/* Create locations to manipulate. */
ASSERT (mkdir (BASE "sub1", 0700) == 0);
ASSERT (rmdir (BASE "sub1") == 0);
ASSERT (rmdir (BASE "sub2") == 0);
free (cwd);
- if (!result)
- fputs ("skipping test: symlinks not supported on this file system\n",
- stderr);
- return result;
+ if (!test_exit_status)
+ {
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ return test_exit_status;
}
dfd = open (".", O_RDONLY);
ASSERT (0 <= dfd);
ASSERT (unlink (BASE "link5") == 0);
free (cwd);
- return (result ? result : test_exit_status);
+ return test_exit_status;
}