6671 Commits

Author SHA1 Message Date
Eugene Syromyatnikov
4bc986fc23 xlat: add NETLINK_SMC
* xlat/netlink_protocols.in (NETLINK_SMC): New constant, introduced
by Linux commit v4.11-rc1~94^2~43^2.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
c0cf981ec8 xlat: provide fallback definitions for V4L2_CID_* constants
* xlat/v4l2_control_id_bases.in: New file with fallback definitions.
* xlat/v4l2_control_ids.in: Add fallback definitions.
* v4l2.c: Reorder includes, include "xlat/v4l2_control_id_bases.h",
remove legacy V4L2_CID_* constant definitions.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
79377eeaaf xlat: update V4L2_CID_* constants
Synchronise v4l2_control_ids list with the one provided by kernel's
include/uapi/linux/v4l2-controls.h.  A few notes:
 - V4L2_CID_CHROMA_GAIN and V4L2_CID_COLORFX_CBCR moved in accordance
   with their position/values.
 - V4L2_CID_WHITENESS is removed as it has the same value as
   V4L2_CID_GAMMA.
 - V4L2_CID_PRIVATE_BASE is removed.
 - V4L2_CID_HCENTER and V4L2_CID_VCENTER that were removed by Linux
   commit v3.9-rc1~93^2~237, are retained for historical reasons.

* xlat/v4l2_control_ids.in: Update.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
ab68755e74 xlat: provide fallback definitions for V4L2_CTRL_CLASS_* constants
As those are architecture-independant.  Also note that the xlat
is sorted.

* xlat/v4l2_control_classes.in: Add values.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
afc00b1807 xlat: update V4L2_CTRL_CLASS_* constants
* xlat/v4l2_control_classes.in (V4L2_CTRL_CLASS_DV): New constant,
introduced by Linux commit v3.7-rc1~101^2^2~322.
(V4L2_CTRL_CLASS_RF_TUNER): New constant, introduced by Linux commit
v3.15-rc1~85^2~192.
(V4L2_CTRL_CLASS_DETECT): New constant, introduced by Linux commit
v3.17-rc1~112^2~340.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
5f43328a74 xlat: update BPF_F_* constants
Apparently, BPF_F_RDONLY and BPF_F_WRONLY are also used in map_flags.
Moreover, set of flags depends on the type of map, but let's leave that
for another day.

* xlat/bpf_map_flags.in (BPF_F_RDONLY, BPF_F_WRONLY): New constants.
(BPF_F_STACK_BUILD_ID): New constant, introduced by Linux commit
v4.17-rc1~148^2~156^2~3^2~1.
* xlat/bpf_map_flags.in: Update expected output.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
52c5d58e04 xlat: add V4L2_PIX_FMT_HEVC
* xlat/v4l2_pix_fmts.in (V4L2_PIX_FMT_HEVC): New constant, introduced
by Linux commit v4.17-rc1~143^2~60.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
822a70b3ec xlat: add ETH_P_PREAUTH
* xlat/ethernet_protocols.in (ETH_P_PREAUTH): New constant, introduced
by Linux commit v4.17-rc1~148^2~379^2~3.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
5c01869ce7 xlat: update SCTP_* constants
* xlat/socksctpoptions.in (SCTP_AUTH_DEACTIVATE_KEY): New constant,
introduced by Linux commit v4.17-rc1~148^2~191^2~2.
(SCTP_SENDMSG_CONNECT): New constant, introduced by Linux commit
v4.17-rc1~96^2~9.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
083bc9d5b2 xlat: add SPARC ADI-related SIGSEGV codes
* xlat/sigsegv_codes.in (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR): New
constants, introduced by Linux commit v4.17-rc1~147^2~4^2~10.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
c8115eb9cf xlat: add PROT_ADI
* xlat/mmap_prot.in (PROT_ADI): New constant, introduced by Linux commit
v4.17-rc1~147^2~4^2~1.
2018-05-06 15:34:41 +00:00
c9ace844ba build: rewrite libdw detection without pkg-config
pkg-config expected to be more convenient way to configure libdw,
but in practice it appeared to be less portable than good old
AC_CHECK_HEADERS and AC_CHECK_LIB.

* ci/install-dependencies.sh (common_packages): Remove pkg-config.
(STACKTRACE == "libdw"): Do not install libz-dev and liblzma-dev.
* debian/control (Build-Depends): Remove pkg-config.
* m4/st_libdw.m4 (st_ARG_LIBDW, st_LIBDW): Rewrite without pkg-config.
2018-05-05 14:38:38 +00:00
ee5d88c5b6 ci: add more variants of unwinder to test matrices
Check x86_64 builds with libdw, with libunwind, and without stacktrace.
As Travis CI doesn't provide a suitable libdw, do not test libdw there.

* ci/install-dependencies.sh (common_packages): Remove libdw-dev.
Install libdw-dev or libunwind8-dev depending on $STACKTRACE.
* ci/run-build-and-tests.sh: Specify --with-libdw=yes,
--with-libunwind=yes, or --without-stacktrace depending on $STACKTRACE.
* .gitlab-ci.yml (gcc-x86_64): Rename to gcc-x86_64-libdw,
add STACKTRACE=libdw.
(gcc-x86): Rename to gcc-x86-nounwind, add STACKTRACE=no.
(clang-x86_64): Rename to clang-x86_64-libdw, add STACKTRACE=libdw.
(clang-x86): Rename to clang-x86-nounwind, add STACKTRACE=no.
(gcc-x86_64-libunwind, gcc-x86_64-nounwind, gcc-x86-nounwind,
clang-x86_64-libunwind, clang-x86_64-nounwind, clang-x86-nounwind):
New test matrix entries.
* .travis.yml: Add STACKTRACE=libunwind to all x86_64 test matrix
entries except musl-gcc, add STACKTRACE=no to other matrix entries,
add test matrix entries with STACKTRACE=no variants on x86_64.
2018-05-04 23:13:45 +00:00
Eugene Syromyatnikov
3a4bd6b9a7 xlat: update af_packet_types
* xlat/af_packet_types.in: Add values.
(PACKET_USER, PACKET_KERNEL): New constants, introduced by Linux commit
v3.14-rc1~94^2~349.
2018-05-04 17:16:05 +00:00
Eugene Syromyatnikov
1296f7bba1 xlat: add values to adjtimex_state, adjtimex_status, advise xlats
* xlat/adjtimex_state.in: Add values.
* xlat/adjtimex_status.in: Likewise.
* xlat/advise.in: Likewise.
2018-05-04 17:15:22 +00:00
Eugene Syromyatnikov
40e3734da4 xlat: update adjtimex_modes
* xlat/adjtimex_modes.in: Add values to constants.
(0): Remove.
(ADJ_OFFSET_SS_READ): Move to the first place.
(ADJ_OFFSET_SINGLESHOT): Move to the second place.
2018-05-04 17:12:48 +00:00
1d98b287a4 mmap_cache: do not activate unless requested
Do not call mmap_cache functions until mmap_cache_enable is invoked.
Change struct mmap_cache_t into a proxy structure, move all mmap_cache
data from struct tcb inside this new structure.

* Makefile.am (strace_SOURCES): Move mmap_cache.c and mmap_cache.h
to libstrace_a_SOURCES.
* defs.h (struct tcb): Remove mmap_cache_size and mmap_cache_generation
* fields.
* mmap_cache.h (struct mmap_cache_t): Rename
to struct mmap_cache_entry_t, create a new struct mmap_cache_t,
all users updated.
(mmap_cache_delete): Remove.
* mmap_cache.c (mmap_cache_delete): Rename to delete_mmap_cache,
add static qualifier.
(build_mmap_cache): Merge into mmap_cache_rebuild_if_invalid.
* strace.c (droptcb): Replace mmap_cache_delete invocation
with tcp->mmap_cache->free_fn.
2018-05-04 14:45:44 +00:00
a1ecb2a51c mmap_cache: remove mmap_cache_is_enabled
This function is no longer used and could be removed.

* mmap_cache.c (mmap_cache_is_enabled): Remove.
* mmap_cache.h: Likewise.
2018-05-03 23:43:38 +00:00
Masatake YAMATO
840bb0acb5 unwind-libdw: use the mmap_notify subsystem
The unwind subsystem uses the mmap_cache subsystem even it uses
unwind-libdw as backend. unwind-libdw doesn't need the full set of the
mmap_cache subsystem; libdw has a feature for caching a memory
mapping.

This commit does three things.

(1) Make the unwind subsystem not use the mmap_cache subsystem.
The unwind subsystem never concern the memory mapping of the target.
It becomes a thin layer.

(2) Make unwind-libunwind use the mmap_cache subsystem directly.

(3) Make unwind-libdw use the mmap_notify subsystem to know when it
should call dwfl_linux_proc_report/dwfl_report_end for updating the
cache.

Here is a subsystem structure that this patch
introduces:

	+-------------------------------------+
	|            unwind subsys            |
	+------------------+------------------+
	| unwind-libunwind |   unwind-libdw   |
	+------------------+------------------+
	|    mmap_cache    |                  |
	+------------------+                  |
	|               mmap_notify           |
	+-------------------------------------+
	|                syscall              |
	+-------------------------------------+
               mmap/munmap/mprotect/brk...

* unwind.c: Don't include "mmap_cache.h".
(unwind_init): Don't call mmap_cache_enable.
(unwind_tcb_print, unwind_tcb_capture): Don't call mmap_cache related
functions, just invoke unwinder.tcb_walk.
* unwind.h (struct unwind_unwinder_t): Remove tcb_flush_cache field.

* unwind-libdw.c: Include "mmap_notify.h" instead of "mmap_cache.h".
(struct ctx): Add last_proc_updating field to record the generation
of memory mapping that is cached by dwfl_linux_proc_report
and dwfl_report_end.
(mapping_generation): A variable counting how many times the memory
mapping of targets has been changed.
(updating_mapping_generation): New utility function for updating
mapping_generation.
(init): New function for registering updating_mapping_generation
in the mmap_notify subsystem as a callback function.
(tcb_init): Initialize ctx::last_proc_updating.
(tcb_flush_cache): Rename to flush_cache_maybe.  Rebuild the cache data
only if the data is stale.
(tcb_walk): Call flush_cache_maybe for avoiding referring staled cache data.
(unwinder): Set init function, remove tcb_flush_cache field.
* unwind-libunwind.c (init): Enable the mmap_cache subsystem.
(tcb_walk): Call mmap_cache_rebuild_if_invalid and unw_flush_cache for
updating the cache of the memory mapping before walking the stack.
(tcb_walk): Rename to walk.
(unwinder): Remove tcb_flush_cache field.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2018-05-03 22:01:30 +00:00
Masatake YAMATO
e09c6c88aa unwind-libdw: introduce indirect data structure for storing unwinding context
unwind-libdw uses Dwfl as the data structure for storing unwinding
context.  It is raw data that come from libdw.

This commit introduces "struct ctx" file local data type for allowing
unwind-libdw to attach strace side data to the unwinding context.

* unwind-libdw.c (struct ctx): New struct definition.
(tcb_init, tcb_fin, tcb_walk, tcb_flush_cache): Use struct ctx instead
of Dwfl directly.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2018-05-03 22:01:30 +00:00
Masatake YAMATO
ed16666f2f mmap_notify: rename the macro for tracking memory mapping
* sysent.h (STACKTRACE_INVALIDATE_CACHE): Rename to
MEMORY_MAPPING_CHANGE.  All users updated.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2018-05-03 22:01:30 +00:00
Masatake YAMATO
af7038665c mmap_cache: use the mmap_notify subsystem
* mmap_cache.c: Include mmap_notify.h.
(mmap_cache_enable): Call mmap_notify_register_client to use
the mmap_notify subsystem, mmap_cache_invalidate is specified
to handle the change of memory mapping.
(mmap_cache_invalidate): Add static qualifier.
* mmap_cache.h (mmap_cache_invalidate): Remove.
* syscall.c: Include mmap_notify.h instead of mmap_cache.h.
(syscall_exiting_decode): Call mmap_notify_report instead
of mmap_cache_invalidate.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2018-05-03 22:01:30 +00:00
Masatake YAMATO
f17f7e6305 mmap_notify: new subsystem for tracking the changes of memory mappings
This subsystem is a spin-off of the mmap_cache subsystem.

The mmap_cache subsystem had two features: (1) tracking the change
of memory mapping, and (2) maintaining the cache of memory mapping.

mmap_notify is a subsystem specialized to provide feature (2).
unwind-libdw itself has the feature (1).  It needs only (2).

* mmap_notify.h: New file.
* mmap_notify.c: Likewise.
* Makefile.am (strace_SOURCES): Add them.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2018-05-03 22:01:30 +00:00
Eugene Syromyatnikov
2bae5f919c btrfs: add missing braces
Reported by Coverity.

* btrfs.c (MPERS_PRINTER_DECL(btrfs_ioctl)) <case
BTRFS_IOC_TREE_SEARCH_V2>: Add missing braces.

Fixes: v4.22-76-gf766447 "btrfs: use PRINT_FIELD_*"
2018-05-03 00:09:53 +00:00
Eugene Syromyatnikov
37935cca18 strace.c: check return code of never failing fcntl call
Because the kernel cannot be trusted.

* strace.c (set_cloexec_flag): Call perror_msg_and_die if fcntl(F_SETFD)
has failed.
2018-05-03 00:09:53 +00:00
Eugene Syromyatnikov
55d3c559e4 sock: use error_func_msg for printing function name
* sock.c (decode_ifconf): Use error_func_msg instead of error_msg with
manual function name printing.
2018-05-03 00:09:53 +00:00
Eugene Syromyatnikov
973687fd92 util.c: add len sanity checks to dumpstr
Reported by clang.

* util.c (dumpstr): Check that len is sane.
2018-05-03 00:09:53 +00:00
Eugene Syromyatnikov
ee023f97ab mmap_cache: fool-proofing build_mmap_cache
Let's try to handle better the situation when build_mmap_cache is called
without mmap_cache/mmap_cache_size being reset prior to the call.

Reported by Coverity scan.

* mmap_cache.c (build_mmap_cache): Set cache_head to tcp->mmap_cache.
Reset tcp->mmap_cache_size to 0.
2018-05-03 00:09:53 +00:00
Eugene Syromyatnikov
f08a679a1d error_prints: add missing va_end() calls
These missing va_end() calls are followed by die() calls that never
return, so the only practical effect of this change is appeasement
of code checking tools.

Reported by cppcheck.

* error_prints.c (error_msg_and_die, error_msg_and_help,
perror_msg_and_die): Add va_end().
2018-05-03 00:09:53 +00:00
Eugene Syromyatnikov
4eb79a767d mem: handle potential error from sysconf(_SC_PAGESIZE)
Reported by Coverity scan.

* mem.c (get_pagesize): Handle the case when sysconf(_SC_PAGESIZE)
returns an error.
2018-05-03 00:09:53 +00:00
e1499151e9 xlat: merge fcntl64cmds into fcntlcmds
Since we don't have to workaround old F_[GS]ETOWN_EX == F_[SG]ETLK64
kernel bug any longer, there is a room for cleanup.

* xlat/fcntlcmds.in (F_GETLK64, F_SETLK64, F_SETLKW64): Add from
xlat/fcntl64cmds.in.
* xlat/fcntl64cmds.in: Remove.
* fcntl.c: Do not include "xlat/fcntl64cmds.h".
(SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): Do not use fcntl64cmds, call
printxval instead of printxvals.
2018-05-03 00:09:53 +00:00
Zhibin Li
3f6e47c7cc tests: check decoding of F_GETOWN_EX and F_SETOWN_EX fcntl commands
* tests/fcntl.c (TEST_F_OWNER_EX): New macro.
[TEST_F_OWNER_EX]: Include "f_owner_ex.h".
[TEST_F_OWNER_EX] (test_f_owner_ex_type_pid,
test_f_owner_ex_umove_or_printaddr, test_f_owner_ex): New functions.
(main) [TEST_F_OWNER_EX]: Use test_f_owner_ex.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-05-03 00:09:53 +00:00
f904486a28 Introduce f_owner_ex.h
Some headers define struct f_owner_ex, some struct __kernel_f_owner_ex,
we have to support both variants.

* configure.ac (AC_CHECK_TYPES): Check for "struct f_owner_ex"
and "struct __kernel_f_owner_ex" in <linux/fcntl.h>.
* f_owner_ex.h: New file.
* Makefile.am (strace_SOURCES): Add it.
2018-05-03 00:09:53 +00:00
Masatake YAMATO
bcff87c31c tests/ioctl_kvm_run.c: handle cpuid at the end of vcpu dentry
Since Linux 4.16, kernel appends the cpuid as suffix to the entry
for a kvm vcpu in /proc/$pid/fd like:

    anon_inode:kvm-vcpu:0

That was

    anon_inode:kvm-vcpu

This kernel change causes the test case failure on newer kernels.
Update the test to deal with the new name as well as the old one.

* tests/ioctl_kvm_run.c: Include unistd.h for using readlink(2).
(vcpu_dev_should_have_cpuid): New function for detecting whether
a proc entry for given fd has the cpuid suffix or not.
(main): Trim vcpu_dev to remove the cpuid suffix if needed.
(vcpu_dev): Remove const modifier.
2018-05-02 15:23:46 +00:00
f12aa97aab xlat: check that system definitions match fallback definitions
For each constant that is accompanied by a fallback definition,
generate a sanity check that the definition provided by system headers
matches the fallback definition.

* gcc_compat.h (DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE,
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE): New macros.
* xlat/gen.sh (cond_def): Generate a code that checks the system
definition against the default.
(gen_header): Generate a code that includes "gcc_compat.h" and
"static_assert.h".

Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-04-29 21:59:55 +00:00
e36c1a7476 xlat: override values of F_SETOWN_EX and F_GETOWN_EX constants
Linux kernel commit v2.6.32-rc7~23 has changed values of F_SETOWN_EX
and F_GETOWN_EX constants introduced by commit v2.6.32-rc1~96 to fix
the conflict with F_GETLK64 and F_SETLK64 constants.

Looks like the best way to handle this situation is to pretend that
old values of F_SETOWN_EX and F_GETOWN_EX didn't exist.

* xlat/fcntlcmds.in (F_SETOWN_EX, F_GETOWN_EX): Undefine.
2018-04-29 21:59:55 +00:00
fa8f4866a4 xlat: fix F_* fallback definitions on alpha, hppa, mips, and sparc
* xlat/fcntlcmds.in (F_GETLK, F_SETLK, F_SETLKW, F_SETOWN, F_GETOWN,
F_SETSIG, F_GETSIG) [alpha || hppa || mips || sparc]: Fix definitions.
* xlat/fcntl64cmds.in (F_GETLK64, F_SETLK64, F_SETLKW64) [hppa || mips]:
Likewise.
2018-04-29 21:59:55 +00:00
16b7bcdccc xlat: fix SI_* fallback definitions on mips
* xlat/siginfo_codes.in [mips] (SI_ASYNCIO, SI_TIMER, SI_MESGQ): Define
to -2, -3, and -4, respectively.
2018-04-29 21:59:55 +00:00
548ee616e1 xlat: override values of KEY_RFKILL and KEY_BRIGHTNESS_MIN constants
KEY_RFKILL and KEY_NUMERIC_A constants were introduced by Linux kernel
commits v2.6.33~17^2~2 and v4.1-rc1~150^2~1^10~6, respectively.
Apparently, RHEL6 introduced an alternative KEY_RFKILL constant
with the same value as upstream KEY_NUMERIC_A.

KEY_BRIGHTNESS_MIN and KEY_BRIGHTNESS_MAX constants were introduced
by Linux kernel commit v3.16-rc1~30^2~6^2~1^2~7.
Apparently, RHEL7 introduced an alternative KEY_BRIGHTNESS_MIN constant
with the same value as upstream KEY_BRIGHTNESS_MAX.

Downstream vendors are *not* allowed to do this.
Ignore the system value of KEY_RFKILL and KEY_BRIGHTNESS_MIN.

* xlat/evdev_keycode.in (KEY_RFKILL, KEY_BRIGHTNESS_MIN): Undefine.
2018-04-29 21:59:55 +00:00
59e5ef1fc9 xlat: override the value of KEY_DATA constant
Linux kernel commit v4.9-rc8~12^2 has changed the value of KEY_DATA
constant introduced by commit v4.7-rc6~32^2~6^2 because the old value
was already used by KEY_FASTREVERSE.

Looks like the best way to handle this situation is to pretend that
the old value of KEY_DATA didn't exist.

* xlat/evdev_keycode.in (KEY_DATA): Undefine.
2018-04-29 21:59:55 +00:00
703cc7ce44 xlat: override the value of AUDIT_FEATURE_CHANGE constant
Linux kernel commit v3.15-rc1~18^2~1 has changed the value
of AUDIT_FEATURE_CHANGE constant introduced by commit v3.13-rc1~19^2~20
which is of course an ABI breakage that affected 3.13 and 3.14 kernel
releases as well as their LTS derivatives.

Linux kernel commit v3.15-rc1~18^2~1 also claims that the old value
of AUDIT_FEATURE_CHANGE was ignored by userspace because of the
established convention how netlink messages for the audit system
are divided into blocks.

Looks like the best way to handle this situation is to pretend that
the old value of AUDIT_FEATURE_CHANGE didn't exist.

* xlat/nl_audit_types.in (AUDIT_FEATURE_CHANGE): Undefine.

Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-04-29 21:59:55 +00:00
a6082255ac xlat: fix MCL_* fallback definitions on alpha, ppc, ppc64, and sparc
On these architectures, MCL_* constants are different.

* xlat/socketlayers.in [__alpha__ || __powerpc__ || __powerpc64__
|| __sparc__] (MCL_CURRENT, MCL_FUTURE, MCL_ONFAULT): Define to 0x2000,
0x4000, and 0x8000, respectively.
2018-04-29 21:59:55 +00:00
Eugene Syromyatnikov
c23a79e5b9 xlat: fix SOL_SOCKET fallback definition on alpha, hppa, mips, and sparc
On these architectures, SOL_SOCKET is 0xffff and not 1.

* xlat/socketlayers.in [__alpha__ || __hppa__ || __mips__ || __sparc__]
(SOL_SOCKET): Define to 0xffff.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-04-28 23:54:57 +00:00
Eugene Syromyatnikov
6dd265b961 tests: add more mount checks
* tests/gen_tests.in (mount, mount-Xabbrev, mount-Xraw, mount-Xverbose):
Add -a33 option.
* tests/mount.c: Check printing of flags and pointers.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-04-28 20:48:52 +00:00
8d5c37dbfd tests: use sprintrc in mount test
* tests/mount.c (main): Use sprintrc.
2018-04-28 20:48:52 +00:00
Eugene Syromyatnikov
1f357a8f1a tests: add mount variants with different xlat verbosity levels
* tests/mount-Xabbrev.c: New file.
* tests/mount-Xraw.c: Likewise.
* tests/mount-Xverbose.c: Likewise.
* tests/mount.c: Add handling of XLAT_RAW and XLAT_VERBOSE macros.
* tests/pure_executables.list: Add mount-Xabbrev, mount-Xraw,
and mount-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (mount-Xabbrev, mount-Xraw, mount-Xverbose): New
tests.
2018-04-28 20:48:52 +00:00
Eugene Syromyatnikov
42f1ccc867 tests: add old_mmap variants with different xlat verbosity levels
* tests/old_mmap-Xabbrev.c: New file.
* tests/old_mmap-Xraw.c: Likewise.
* tests/old_mmap-Xverbose.c: Likewise.
* tests/old_mmap.c (main): Add handling of XLAT_RAW and XLAT_VERBOSE
macros.
* tests/pure_executables.list: Add old_mmap-Xabbrev, old_mmap-Xraw,
and old_mmap-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (old_mmap-Xabbrev, old_mmap-Xraw,
old_mmap-Xverbose): New tests.
2018-04-28 20:48:52 +00:00
Eugene Syromyatnikov
417ec2479d tests: add mmap/mmap64 variants different xlat verbosity levels
* tests/tests.h [!XLAT_RAW] (XLAT_RAW): Define.
[!XLAT_VERBOSE] (XLAT_VERBOSE): Likewise.
* tests/mmap-Xabbrev.c: New file.
* tests/mmap-Xraw.c: Likewise.
* tests/mmap-Xverbose.c: Likewise.
* tests/mmap64-Xabbrev.c: Likewise.
* tests/mmap64-Xraw.c: Likewise.
* tests/mmap64-Xverbose.c: Likewise.
* tests/mmap.c (main): Add handling of XLAT_RAW and XLAT_VERBOSE macros.
* tests/mmap.test: Add handling of optional test arguments that set
alignment and xlat verbosity options.
* tests/Makefile.am (mmap64_Xabbrev_CPPFLAGS, mmap64_Xraw_CPPFLAGS,
mmap64_Xverbose_CPPFLAGS): New variables, analogous to mmap64_CPPFLAGS.
* tests/pure_executables.list: Add mmap-Xabbrev, mmap-Xraw,
mmap-Xverbose, mmap64-Xabbrev, mmap64-Xraw, and mmap64-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (mmap-Xabbrev, mmap-Xraw, mmap-Xverbose,
mmap64-Xabbrev, mmap64-Xraw, mmap64-Xverbose): New tests.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-04-28 20:48:52 +00:00
a0f071a2e6 Fix fallback definition of MSG_ZEROCOPY
* xlat/msg_flags.in (MSG_ZEROCOPY): Set fallback definition to 0x4000000.

Fixes: v4.21~316 ("Update MSG_* constants")
2018-04-27 07:19:52 +00:00
bd9845770f build: try to use _Static_assert if static_assert is not available
* configure.ac: Check for _Static_assert if static_assert
is not available.
* static_assert.h [!HAVE_STATIC_ASSERT && HAVE__STATIC_ASSERT]
(static_assert): Define to _Static_assert.
2018-04-27 07:19:52 +00:00