Eugene Syromyatnikov
9d095c7860
Add copyright headers
2017-05-22 17:33:51 +00:00
eabace12c4
tests: use TAIL_ALLOC_OBJECT_CONST_PTR
...
Automatically convert tests to use TAIL_ALLOC_OBJECT_CONST_PTR macro
with the following sed expression:
sed -ri \
's/^([[:space:]]*)(([^*]+[[:alnum:]_])( \*)?) *\*( *const )?([^ =]+) = tail_alloc\(sizeof\((\2|\*\6)\)\);/\1TAIL_ALLOC_OBJECT_CONST_PTR(\2, \6);/' \
tests/*.c
2017-03-16 13:46:36 +00:00
18b582ec11
tests: replace casts of 0xffffffff00000000ULL with F8ILL_KULONG_MASK
...
* tests/init_delete_module.h (bogus_zero): Remove.
* tests/delete_module.c (main): Replace bogus_zero and
(kernel_ulong_t) 0xffffffff00000000ULL with F8ILL_KULONG_MASK.
* tests/finit_module.c (main): Replace bogus_zero
with F8ILL_KULONG_MASK.
* tests/init_module.c (main): Likewise.
* tests/pipe2.c (main): Likewise.
* tests/epoll_ctl.c (invoke_syscall): Replace
(unsigned long) 0xffffffff00000000ULL with F8ILL_KULONG_MASK.
* tests/rt_tgsigqueueinfo.c (k_tgsigqueueinfo): Likewise.
* tests/fanotify_init.c (main): Likewise.
* tests/xetpgid.c (main): Likewise.
* tests/xetpriority.c (main): Likewise.
(kernel_ulong_t) 0xffffffff00000000ULL with F8ILL_KULONG_MASK.
* tests/fanotify_mark.c (main): Likewise.
* tests/file_handle.c (main): Likewise.
* tests/kexec_load.c (main): Likewise.
* tests/setfsugid.c (main): Likewise.
* tests/getgroups.c (main): Replace (long) 0xffffffff00000000ULL
with F8ILL_KULONG_MASK.
* tests/setgroups.c (main): Replace (long) 0xffffffff00000000ULL
and (unsigned long) 0xffffffff00000000ULL with F8ILL_KULONG_MASK.
2017-02-16 16:36:14 +00:00
f55ef46feb
Include "kernel_types.h" in defs.h and tests/tests.h
...
As kernel_ulong_t type is going to be used in the definition
of struct tcb and in many function prototypes, make it readily
available for every source file by including "kernel_types.h"
in defs.h and tests/tests.h files.
* defs.h: Include "kernel_types.h".
* tests/tests.h: Likewise.
* desc.c: Do not include "kernel_types.h".
* dirent.c: Likewise.
* keyctl.c: Likewise.
* syscall.c: Likewise.
* linux/asm_stat.h: Likewise.
* tests/answer.c: Likewise.
* tests/epoll_pwait.c: Likewise.
* tests/fanotify_init.c: Likewise.
* tests/fanotify_mark.c: Likewise.
* tests/file_handle.c: Likewise.
* tests/ftruncate.c: Likewise.
* tests/getdents.c: Likewise.
* tests/init_delete_module.h: Likewise.
* tests/inotify.c: Likewise.
* tests/inotify_init1.c: Likewise.
* tests/ioprio.c: Likewise.
* tests/ipc_msgbuf.c: Likewise.
* tests/kcmp.c: Likewise.
* tests/kexec_file_load.c: Likewise.
* tests/kexec_load.c: Likewise.
* tests/keyctl.c: Likewise.
* tests/lookup_dcookie.c: Likewise.
* tests/lseek.c: Likewise.
* tests/mq_sendrecv.c: Likewise.
* tests/nsyscalls.c: Likewise.
* tests/pkey_alloc.c: Likewise.
* tests/pkey_free.c: Likewise.
* tests/pkey_mprotect.c: Likewise.
* tests/prctl-pdeathsig.c: Likewise.
* tests/prctl-tsc.c: Likewise.
* tests/preadv2-pwritev2.c: Likewise.
* tests/process_vm_readv_writev.c: Likewise.
* tests/read-write.c: Likewise.
* tests/setfsugid.c: Likewise.
* tests/setns.c: Likewise.
* tests/truncate.c: Likewise.
* tests/unshare.c: Likewise.
* tests/xgetrlimit.c: Likewise.
2016-12-16 12:01:44 +00:00
Eugene Syromyatnikov
9a4eb55465
tests: additional name_to_handle_at/open_by_handle_at checks
...
* tests/file_handle.c: Additional name_to_handle_at/open_by_handle_at
checks.
2016-10-29 02:54:02 +03:00
Eugene Syromyatnikov
ad7f4354d5
tests: require only presence of __NR_* macros for file_handle test
...
* tests/file_handle.c: replace fcntl.h include with asm/unistd.h.
[MAX_HANDLE_SZ]: change to defined __NR_name_to_handle_at
&& defined __NR_open_by_handle_at, add fcntl.h include
[!MAX_HANDLE_SZ]: Add definition of MAX_HANDLE_SZ and struct
file_handle.
(main): Change name_to_handle_at and open_by_handle_at calls to syscall.
2016-10-29 02:54:01 +03:00
884471bc9f
tests/file_handle.c: use errno2name
2016-04-21 22:05:53 +00:00
c83746acf7
tests/file_handle.c: use libtests
...
* tests/file_handle.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
2016-01-06 16:01:46 +00:00
0c8853c3c3
tests: include tests.h instead of config.h
...
Automatically edit tests/*.c files using the following perl one-liner:
perl -0777 -pi -e \
's/#ifdef HAVE_CONFIG_H\n# include "config\.h"\n#endif\n*/#include "tests.h"\n/' \
tests/*.c
2016-01-05 23:17:11 +00:00
4c65ff00ee
tests/file_handle: fix expected output
...
* tests/file_handle.c (main): Parametrize handle_type
in open_by_handle_at parser output.
2015-11-26 16:49:39 +00:00
4b3a1703bd
Implement name_to_handle_at and open_by_handle_at syscalls decoding
...
* file_handle.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/dummy.h (sys_name_to_handle_at, sys_open_by_handle_at):
Remove stub aliases.
* pathtrace.c (pathtrace_match): Add SEN_name_to_handle_at.
* tests/file_handle.c: New file.
* tests/file_handle.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add file_handle.
(TESTS): Add file_handle.test.
* tests/.gitignore: Add file_handle.
2015-11-22 23:21:35 +00:00