]> granicus.if.org Git - strace/commitdiff
tests: move ARG_STR and similar macros to tests.h
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 13 Oct 2016 07:26:07 +0000 (10:26 +0300)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 26 Oct 2016 01:18:34 +0000 (04:18 +0300)
* tests/add_key.c (_STR, ARG_STR): Move ...
* tests/tests.h: ... here.
(ARG_ULL_STR): New macro.
* tests/keyctl.c (ARG_STR): Remove.
* tests/quotactl.h (ARG_STR): Likewise.
* tests/request_key.c (ARG_STR): Likewise.

tests/add_key.c
tests/keyctl.c
tests/quotactl.h
tests/request_key.c
tests/tests.h

index 62f4be36290060eac684c5a6fb9ea5cc1039cc9f..57f12bfd21a9331626f67f5e5d98d3ccfedba679 100644 (file)
@@ -65,9 +65,6 @@ do_add_key(const char *type, const char *type_str, const char *desc,
        printf(") = %s\n", errstr);
 }
 
-# define _STR(_arg) #_arg
-# define ARG_STR(_arg) (_arg), #_arg
-
 int
 main(void)
 {
index b5809810da8e2546e4e854534fda3f817f5255ff..a60dcfcf3e40f863cc1d649dbfd4f1fdcdaead91 100644 (file)
@@ -190,8 +190,6 @@ do_keyctl(kernel_ulong_t cmd, const char *cmd_str, ...)
        printf(") = %s\n", errstr);
 }
 
-# define ARG_STR(_arg) (_arg), #_arg
-
 int
 main(void)
 {
index b97153f11798ceae33d7cad706e3738612c70519..edde915b157e242b3b290038dfedec70c8a2085e 100644 (file)
@@ -69,8 +69,6 @@
        printf("%s%s=%#llx", (prefix), #field,  \
               zero_extend_signed_to_ull((where)->field))
 
-# define ARG_STR(_arg) (_arg), #_arg
-
 typedef void (*print_cb)(long rc, void *addr, void *arg);
 
 enum check_quotactl_flag_bits {
index 361bf5290dd0022bf660fc81e19b94c27ac12ef7..d88cd1e471766b1d3983fd62e02a2534cda2b362 100644 (file)
@@ -64,9 +64,6 @@ do_request_key(const char *type, const char *type_str, const char *desc,
        printf(") = %s\n", errstr);
 }
 
-# define _STR(_arg) #_arg
-# define ARG_STR(_arg) (_arg), #_arg
-
 int
 main(void)
 {
index 537300cff31be89d39e96491a8d3f63e662fd22b..4453702ed5c24d1a93d39ac3cc9cc51fe624b983 100644 (file)
@@ -186,4 +186,8 @@ int send_mmsg(int, struct mmsghdr *, unsigned int, unsigned int);
 # endif
 # define LL_VAL_TO_PAIR(llval) LL_PAIR((long) ((llval) >> 32), (long) (llval))
 
+# define _STR(_arg) #_arg
+# define ARG_STR(_arg) (_arg), #_arg
+# define ARG_ULL_STR(_arg) _arg##ULL, #_arg
+
 #endif /* !STRACE_TESTS_H */