]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (test_mkfds,lsfd,refactor) move error definitions to test_mkfds.h
authorMasatake YAMATO <yamato@redhat.com>
Tue, 16 Jun 2026 17:36:16 +0000 (02:36 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Tue, 16 Jun 2026 17:36:49 +0000 (02:36 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/helpers/test_mkfds.c
tests/helpers/test_mkfds.h
tests/ts/lsfd/lsfd-functions.bash

index 302c3d33c42cc401c9bcb8e59ded84d18ab487ad..093ac06c61005afb9f6adbf69ff586681f2411cd 100644 (file)
 #include <time.h>
 #include <unistd.h>
 
-#define EXIT_EPERM  18
-#define EXIT_ENOPROTOOPT 19
-#define EXIT_EPROTONOSUPPORT 20
-#define EXIT_EACCES 21
-#define EXIT_ENOENT 22
-/* EXIT_ENOSYS also defined in test_mkfds.h */
-#define EXIT_EADDRNOTAVAIL 24
-#define EXIT_ENODEV 25
-
 #define _U_ __attribute__((__unused__))
 
 static void do_nothing(int signum _U_);
index e7a1f06e55be15f364db803c35478c6b399bc490..e4fd473a4358c8a837969ef0830ef8bbd02d7168 100644 (file)
 #include <stdbool.h>
 #include <stddef.h>
 
+/* Update the constants in
+ * tests/ts/lsfd/lsfd-functions.bash when changing
+ * the above error definitions. */
+#define EXIT_EPERM  18
+#define EXIT_ENOPROTOOPT 19
+#define EXIT_EPROTONOSUPPORT 20
+#define EXIT_EACCES 21
+#define EXIT_ENOENT 22
 #define EXIT_ENOSYS 23
+#define EXIT_EADDRNOTAVAIL 24
+#define EXIT_ENODEV 25
 
 enum multiplexing_mode {
    MX_READ   = 1 << 0,
index 167e421149927fc6de5d5e53a84fc82dababf207..25ca7a8cf07e4805ef75f67b6bd85a5617527b2e 100644 (file)
@@ -16,6 +16,9 @@
 #
 
 # The exit-status used in a test target.
+#
+# Update the above constants when changing
+# the error definitions in tests/helpers/test_mkfds.h.
 readonly EPERM=18
 readonly ENOPROTOOPT=19
 readonly EPROTONOSUPPORT=20