From: Masatake YAMATO Date: Tue, 16 Jun 2026 17:36:16 +0000 (+0900) Subject: tests: (test_mkfds,lsfd,refactor) move error definitions to test_mkfds.h X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bd500997b3ceeaf699b78fa02e0b3de4a478c6c;p=thirdparty%2Futil-linux.git tests: (test_mkfds,lsfd,refactor) move error definitions to test_mkfds.h Signed-off-by: Masatake YAMATO --- diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c index 302c3d33c..093ac06c6 100644 --- a/tests/helpers/test_mkfds.c +++ b/tests/helpers/test_mkfds.c @@ -73,15 +73,6 @@ #include #include -#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_); diff --git a/tests/helpers/test_mkfds.h b/tests/helpers/test_mkfds.h index e7a1f06e5..e4fd473a4 100644 --- a/tests/helpers/test_mkfds.h +++ b/tests/helpers/test_mkfds.h @@ -23,7 +23,17 @@ #include #include +/* 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, diff --git a/tests/ts/lsfd/lsfd-functions.bash b/tests/ts/lsfd/lsfd-functions.bash index 167e42114..25ca7a8cf 100644 --- a/tests/ts/lsfd/lsfd-functions.bash +++ b/tests/ts/lsfd/lsfd-functions.bash @@ -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