Commit Graph

6 Commits

Author SHA1 Message Date
c6782f144a tests: change the license to GPL-2.0-or-later
strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
2018-12-10 00:00:00 +00:00
b6cb4866e2 tests: use TAIL_ALLOC_OBJECT_CONST_PTR where appropriate
* tests/kcmp.c (main): Use TAIL_ALLOC_OBJECT_CONST_PTR.
* tests/modify_ldt.c (main): Likewise.
* tests/netlink_protocol.c (send_query): Likewise.
* tests/ptrace.c (test_peeksiginfo, main): Likewise.
* tests/s390_guarded_storage.c (main): Likewise.
* tests/s390_sthyi.c (main): Likewise.
* tests/xet_thread_area_x86.c (main): Likewise.
2018-05-28 17:34:50 +00:00
Eugene Syromyatnikov
87cd971e49 tests/s390_sthyi.c: make utility functions inline
When built with --enable-gcc-Werror, s390_sthyi test build fails
with the following error:

	s390_sthyi.c:63:1: error: ‘print_u8’ defined but not used [-Werror=unused-function]
	 print_u8(const char *prefix, unsigned char *buf, unsigned int offs, bool zero)
	 ^~~~~~~~

Apparently, after some back and forth, all occurrences of printing u8
values landed under verbose printing, so this function is no longer
used in non-verbose mode.  Let's avoid this in the future by inlining
all the utility functions in this test.

* tests/s390_sthyi.c (print_0x8, print_u8, print_u16, print_x32,
print_weight, ebcdic2ascii, is_empty, print_ebcdic): Add inline
qualifier.
[!VERBOSE] (is_empty): Remove "# if VERBOSE" guard.
2018-03-06 23:52:08 +00:00
6675b67366 tests: do not include <stdbool.h> in files that include "tests.h"
Starting with commit v4.21-37-g4f63bc70ca95012d72e288fc3c1eeb3ba26068a4,
<stdbool.h> is included by tests.h, so all tests that already include
"tests.h" do not need to include <stdbool.h>.

* tests/btrfs.c: Do not include <stdbool.h>.
* tests/file_handle.c: Likewise.
* tests/futex.c: Likewise.
* tests/ioctl_dm.c: Likewise.
* tests/ioctl_loop.c: Likewise.
* tests/ioctl_sock_gifconf.c: Likewise.
* tests/keyctl.c: Likewise.
* tests/mq_sendrecv.c: Likewise.
* tests/perf_event_open.c: Likewise.
* tests/s390_guarded_storage.c: Likewise.
* tests/s390_pci_mmio_read_write.c: Likewise.
* tests/s390_sthyi.c: Likewise.
* tests/xet_thread_area_x86.c: Likewise.
2018-03-01 01:00:24 +00:00
Eugene Syromyatnikov
9748b92038 tests/s390_sthyi.c: skip the test if s390_sthyi returns an error
tests/s390_sthyi.c (main): replace error_msg_and_fail with
error_msg_and_skip if rc is non-zero.
2018-02-13 22:57:27 +00:00
Eugene Syromyatnikov
9437d47366 tests: check s390_sthyi system call decoder
* configure.ac (AC_CHECK_FUNCS): Add iconv_open.
(AC_CHECK_HEADERS): Add iconv.h.
* tests/s390_sthyi-v.c: New file.
* tests/s390_sthyi.c: Likewise.
* tests/.gitignore: Add s390_sthyi, s390_sthyi-v.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (s390_sthyi, s390_sthyi): New tests.
2018-01-29 14:10:10 +01:00