tests: move ARG_STR and similar macros to tests.h
* 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.
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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 */
|
||||
|
Reference in New Issue
Block a user