aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2019-04-30testcases.mk: Fix libs/ path for out-of-tree buildCyril Hrubis
The path to the Makefile was not correct for the out-of-tree build because it was pointing to the build directory rather than to the source directory. Apparently this also caused random failures for out-of-tree build. For some reason when building syscalls/set_mempolicy/ testcases the rebuild of the libltpnuma.a library is triggered for out-of-tree build for about 10% of the cases on massively parallel build. Which as far as I can tell shouldn't happen since we build everything in the libs/ directory as a prerequisite of the testcases/ directory. So there is likely some strange race condition happening and while this does not fix the actual race it makes it quite harmless since the target was already build and the make in the libs/libltpnuma/ directory will be no-op. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Acked-by: Jan Stancek <jstancek@redhat.com> Tested-by: Petr Vorel <pvorel@suse.cz>
2019-04-18lapi/cpuset.h: Fix the CPU_ALLOC() fallback macro.Yang Xu
Now that sched_getaffinity() has been converted to new library we can just switch the error message to use tst_brk(). This fixes LTP compilation on older distributions. Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
2019-04-15android: Fix build errors caused by -Werror-implicit-function-declarationZhengwang Ruan
by adding missing <string.h> and <strings.h> headers. Signed-off-by: Zhengwang Ruan <ruanzw@xiaopeng.com> Reviewed-by: Enji Cooper <yaneurabeya@gmail.com> Acked-by: Cyril Hrubis <chrubis@suse.cz> [ pvorel: TODO: #521: deprecated functions from <strings.h> should be replaced by these from <string.h>. ] Signed-off-by: Petr Vorel <pvorel@suse.cz>
2019-04-15tst_test.h: Include <string.h> to fix missing function declarationPetr Vorel
This fixes build errors caused by -Werror-implicit-function-declaration defined for android. There are many places, where missing <string.h> is needed for memory and string related functions (see [1]). Including headers here seems to be better than handling implicit function declaration error every now and then. There are few other headers missing, most notably <strings.h>. As this header is deprecated, these should be replaced by these <string.h>. Other headers (e.g. <stdlib.h>) should be manually added. + update copyright, use SPDX-License-Identifier. [1] http://lists.linux.it/pipermail/ltp/2019-April/011655.html Suggested-by: Zhengwang Ruan <ruanzw@xiaopeng.com> Acked-by: Cyril Hrubis <chrubis@suse.cz> Signed-off-by: Petr Vorel <pvorel@suse.cz>
2019-04-14tst_safe_posix_ipc.h: Replace definition ANDROID with __ANDROID__Petr Vorel
Based on previous discussion on commit be944db1f and [1]. + use SPDX-License-Identifier. [1] https://groups.google.com/forum/#!topic/android-ndk/cf9_f1SLXls Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
2019-04-12Test ioctl syscall for NS_GET_* requestsFederico Bonfiglio
Signed-off-by: Federico Bonfiglio <fedebonfi95@gmail.com> Acked-by: Cyril Hrubis <metan@ucw.cz>
2019-04-11syscalls/clock_adjtime: Fix compiler errorYang Xu
'ADJ_OFFSET_SS_READ' 'ADJ_NANO' 'STA_NANO' and 'ADJ_MICRO' are not defined on some old distros, so add them into a new 'include/lapi/timex.h' to fix it. Also move ADJ_ALL macro into this new header file. These macros are introduced by the following commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=52bfb36 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eea83d8 sys_clock_adjtime are introduced by the following commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=339dc Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com> Acked-by: Cyril Hrubis <chrubis@suse.cz>
2019-04-03include: Added SAFE_UNSHARE()Federico Bonfiglio
Signed-off-by: Federico Bonfiglio <fedebonfi95@gmail.com> Acked-by: Cyril Hrubis <chrubis@suse.cz>
2019-04-03syscall/pivot_root01.c: Fix compile errorJinhui huang
1)The 'MS_REC' and 'MS_PRIVATE' flag are not defined on some old distros, so add them into 'include/lapi/mount.h' to fix it. 2)Enclose macro with complex values in parentheses. Signed-off-by: Jinhui huang <huangjh.jy@cn.fujitsu.com> Acked-by: Cyril Hrubis <chrubis@suse.cz>
2019-03-28lapi: Replace __WORDSIZE with TST_ABI{,32,64}Petr Vorel
Reported-by: Dengke Du <dengke.du@windriver.com> Suggested-by: Cyril Hrubis <chrubis@suse.cz> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
2019-03-28lapi: Define TST_ABI{,32,64} to detect target typePetr Vorel
This is meant to be a replacement of __WORDSIZE definition. Motivation was instead of finding, where all libc define __WORDSIZE, which is usually used for detecting target type (at least MUSL defines it in different place than other libc) we define our own constant. Suggested-by: Cyril Hrubis <chrubis@suse.cz> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
2019-03-26tst_test: Add test variantsCyril Hrubis
The test variants are intended for running the test more than once for a different settings. The indended purpose is to run tests for both libc wrapper and raw syscall as well as for different syscall variants. The commit itself adds a test_variant integer that, if set, denotes number of test variants. The test is then forked and executed test_variant times each time with different value in global tst_variant variable. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Reviewed-by: Steve Muckle <smuckle@google.com> Reviewed-by: Petr Vorel <pvorel@suse.cz> Acked-by: Jan Stancek <jstancek@redhat.com>
2019-03-25syscalls/clock_adjtime: create clock_adjtime syscall testsRafael David Tinoco
Fixes: 270 clock_adjtime{01,02} are created using the new API, based on existing adjtimex(2) tests. clock_adjtime() syscall might have as execution path: 1) a regular POSIX clock (only REALTIME clock implements adjtime()) - will behave exactly like adjtimex() system call. - only one being tested here. 2) a dynamic POSIX clock (which ops are implemented by PTP clocks) - will trigger the PTP clock driver function "adjtime()" - different implementations from one PTP clock to another - might return EOPNOTSUPP (like ptp_kvm_caps, for example) - no observed execution entry point for clock_adjtime() Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> Acked-by: Cyril Hrubis <chrubis@suse.cz>
2019-03-25lapi/posix_clocks.h: add MAX_CLOCKS definitionRafael David Tinoco
Used by clock_XXXtime() tests, defining MAX_CLOCKS in common header. Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org>
2019-03-25lib: Add include guard to tst_safe_clocks.hRafael David Tinoco
When adding a common header to my tests I missed this include guard when accidentally including tst_safe_clocks.h from .c and .h files. Since other tst_safe_*.h files have guards I thought it would be good to add to this one as well. Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> Reviewed-by: Enji Cooper <yaneurabeya@gmail.com Acked-by: Cyril Hrubis <chrubis@suse.cz>
2019-03-25lib: include SAFE_CLOCK_ADJTIME() macroRafael David Tinoco
Adds SAFE_CLOCK_ADJTIME() macro to tst_safe_clocks.h. Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> Acked-by: Cyril Hrubis <chrubis@suse.cz>
2019-03-25syscalls: Add userfaultfd testcaseChristian Amann
This tests the userfaultfd syscall to handle pagefault events. It does so by registering a userfaultfd object to the address of a memory page. In a second thread it handles the event and writes data in the monitored memory page to indicate success. Signed-off-by: Christian Amann <camann@suse.com> Signed-off-by: Petr Vorel <pvorel@suse.cz>
2019-03-21cpuset: Detect missing fts.hPetr Vorel
This fixes build on uClibc with disabled fts.h support and MUSL, which does not have fts.h at all. Reported-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
2019-03-18lib: add tst_af_alg libEric Biggers
Add helper functions for creating and using AF_ALG sockets. AF_ALG is the userspace interface to algorithms in the Linux kernel's crypto API. See https://www.kernel.org/doc/html/latest/crypto/userspace-if.html for more information about this interface. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Petr Vorel <pvorel@suse.cz>
2019-03-18rt_sigaction.h: Replace libc specific sighandler_t by POSIXPetr Vorel
__sighandler_t is libc implementation specific. Thus use (*)(int), as specified by POSIX. This fixes MUSL build. Suggested-by: Cyril Hrubis <chrubis@suse.cz> Acked-by: Cyril Hrubis <chrubis@suse.cz> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
2019-03-18include/SAFE_IOCTL() fix return value typeCyril Hrubis
This adds the same trick we use for SAFE_FCNTL() to SAFE_IOCTL(), the added coma + zero forces the return value to be numeric in all cases so that compiler will work fine in cases that we want to store the resulting value from SAFE_IOCTL(). Signed-off-by: Cyril Hrubis <chrubis@suse.cz> CC: Federico Bonfiglio <fedebonfi95@gmail.com>
2019-03-15lapi/socket.h: provide SO_REUSEPORT definition for older distrosJan Stancek
Signed-off-by: Jan Stancek <jstancek@redhat.com>
2019-03-08libs: Hook up libs into the build systemCyril Hrubis
This hooks up libs/ subdirectories into the build system so that tests needs only specify which library from libs/ directory we should link againts. Which sets up the path to the library in LDFLAGS and also causes the library to be rebuild even when make is executed from the directory with testcases. Now the test only needs to set up LTPLIBS variable with a list of optional libraries to link against and LDLIBS, since as far as I know we have to maintain the order of the libraries manually. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Acked-by: Jan Stancek <jstancek@redhat.com>
2019-03-07lib/tst_numa: Add library for NUMA related syscallsCyril Hrubis
The library implements a nodemap, which is a map of nodes (array) containing node ids for a subset of system nodes. Currently nodes can be filtered based on memory requirements, which is needed for testing memory related NUMA syscalls such as set_mempolicy() and membind() where we usually need at least two memory nodes with free memory. It also implements counters, so that we can precisely count, for a given memory range, how much memory was allocated on each node in the map and a few simple functions for mapping, faulting and unmapping memory. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> CC: Vlastimil Babka <vbabka@suse.cz> CC: Michal Hocko <mhocko@kernel.org> CC: Jan Stancek <jstancek@redhat.com> Acked-by: Jan Stancek <jstancek@redhat.com>
2019-03-05syscalls/pwritev201: Add new testcaseJinhui huang
Check the basic functionality of the pwritev2(). Signed-off-by: Jinhui huang <huangjh.jy@cn.fujitsu.com> Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
2019-03-05lapi/syscalls: Add syscall numbers for pwritev2()Jinhui huang
Signed-off-by: Jinhui huang <huangjh.jy@cn.fujitsu.com> Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
2019-02-26lapi/posix_clocks.h: Include <time.h> before definitionsPetr Vorel
+ minor formatting fixes (include guards, copyright). Signed-off-by: Petr Vorel <pvorel@suse.cz> Acked-by: Jan Stancek <jstancek@redhat.com>
2019-02-26Include lapi/posix_clocks.h in tst_safe_clocks.hPetr Vorel
Although this not needed, users of tst_safe_clocks.h usually need also posix clock flags and it's safer to load them automatically so fixes like 938a1023d are not needed any more. + minor copyright formatting cleanup. Signed-off-by: Petr Vorel <pvorel@suse.cz> Acked-by: Jan Stancek <jstancek@redhat.com>
2019-02-26Define __SIGRTMIN and __SIGRTMAX for MUSLDaniel Díaz
Some libc implementations might differ in the definitions they include. Exempli gratia: MUSL does not define __SIGRTMAX nor __SIGRTMIN. These two tests fail to build because of the missing definitions: testcases/kernel/syscalls/ptrace/ptrace05.c testcases/kernel/syscalls/sighold/sighold02.c Out of precaution, these two also include this header: lib/tst_sig.c testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Petr Vorel <pvorel@suse.cz>
2019-02-25syscalls/syncfs: Fix compilation on older distrosPetr Vorel
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../include -I../../../../include -I../../../../include/old/ -L../../../../lib syncfs01.c -lltp -o syncfs01 In file included from syncfs01.c:19: ../../../../include/lapi/syncfs.h: In function ‘syncfs’: ../../../../include/lapi/syncfs.h:17: warning: implicit declaration of function ‘syscall’ ../../../../include/lapi/syncfs.h:17: warning: implicit declaration of function ‘tst_brk’ ../../../../include/lapi/syncfs.h:17: error: ‘TCONF’ undeclared (first use in this function) ../../../../include/lapi/syncfs.h:17: error: (Each undeclared identifier is reported only once ../../../../include/lapi/syncfs.h:17: error: for each function it appears in.) In file included from ../../../../include/tst_test.h:25, from syncfs01.c:20: /usr/include/unistd.h: At top level: /usr/include/unistd.h:1068: error: conflicting types for ‘syscall’ ../../../../include/lapi/syncfs.h:17: note: previous implicit declaration of ‘syscall’ was here make: *** [syncfs01] Error 1 Fixes: b88b3785d ("syscalls: add syncfs() sync device test-case") Signed-off-by: Petr Vorel <pvorel@suse.cz>
2019-02-25syscalls/sync_file_range: Use C library wrapper if presentSumit Garg
Add config check for C library wrapper for sync_file_range() syscall. Also, check for sync_file_range() presence via dummy call rather than kernel version check. And move fallback api to: include/lapi/sync_file_range.h Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Cyril Hrubis <chrubis@suse.cz>
2019-02-25syscalls: add syncfs() sync device test-caseSumit Garg
syncfs01 tests to sync filesystem having large dirty file pages to block device. Also, it tests all supported filesystems on a test block device. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
2019-02-25lib/tst_test: define TEST_VOID() macroSumit Garg
Define TEST_VOID() macro for syscalls whose return type is void like sync() etc. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Cyril Hrubis <chrubis@suse.cz>
2019-02-25lib: split tst_fill_file() to create new tst_fill_fd()Sumit Garg
Split tst_fill_file() api to create new tst_fill_fd() api which could be used to fill file using fd and allows syscalls tests to operate on fd. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Cyril Hrubis <chrubis@suse.cz>
2019-02-25lib/tst_device: add new api tst_dev_bytes_written()Sumit Garg
This api reads test block device stat file and returns the bytes written since the last invocation of this api. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Cyril Hrubis <chrubis@suse.cz>
2019-02-20include/tst_test: Expose tst_get_tmpdir() to newlib tests.Cyril Hrubis
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
2019-02-20lapi/include/ustat.h: Include config.hCyril Hrubis
Otherwise we don't use the system ustat.h header at all. Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
2019-02-04syscalls/ustat: convert to new lib, use direct syscallSteve Muckle
Use direct syscall to expand test compatibility to Android. Signed-off-by: Steve Muckle <smuckle@google.com> Signed-off-by: Petr Vorel <pvorel@suse.cz>
2019-01-30tst_timer: Turn clock_name() function publicRafael David Tinoco
This commit exposes tst_clock_name() function by removing its static definition and creating a public function prototype. This function is needed by clock/alarm tests and their error messages. Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
2019-01-30tst_timer: Add tst_timespec_sub_us()Rafael David Tinoco
This commit adds a tst_timespec_sub_us() function that subtracts microseconds from a given timespec struct. Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2019-01-30lib: new restore_wallclock field to restore realtime clockRafael David Tinoco
Some tests that change the system-wide clock need to have a way to restore the correct time after their execution. This commit introduces a new field to tst_test struct called "restore_wallclock": it makes the test to save current realtime clock during setup phase, and, later, during cleanup, restore it to the appropriate time using a monotonic raw clock difference. Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
2019-01-30tst_timer: Add tst_timespec_add()Rafael David Tinoco
This commit adds a tst_timespec_add() function that adds two given timespec structs. It is needed in order to avoid unneeded ns <-> us conversions because, so far, there is only tst_timespec_add_us() available. Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2019-01-30lib: include SAFE_CLOCK_SETTIME() macroRafael David Tinoco
Adds SAFE_CLOCK_SETTIME() macro to tst_safe_clocks.h. Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2019-01-30lib: add tst_clock_settime() to tst_clocks.hRafael David Tinoco
Adds tst_clock_settime() function to the lib. Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2019-01-28fcntl: fcntl F_SETLEASE return EAGAIN on overlapfsLi Wang
>From Miklos's words: The F_SETLEASE "failure" is caused by the simplistic way the kernel currently determines if there's a possible local conflict to a write lock: check_conflicting_open(const struct dentry *dentry, const long arg, int flags) { /*...*/ if ((arg == F_WRLCK) && ((d_count(dentry) > 1) || (atomic_read(&inode->i_count) > 1))) ret = -EAGAIN; /*...*/ It reads the dentry count, and if there's any other reference to the dentry or inode as the one held by this file, then it is assumed to come from a conflicting open. Which is not true, dentry references can come from variety of sources (e.g. O_PATH opens are obviously non-conflicting). This causes failure on tmpfs as well, which holds an extra reference on each dentry. The extra ref on the dentry in overlayfs comes from the realfile stored in the overlay file's private_data field. The proper solution to this is probably to have an i_readcount, matching the functionality of i_writecount, which would solve the other problems with the current approach. Note: this is not a failure in the sense that applications must be written with the assumption that F_SETLEASE can fail with -EAGAIN, so this error condition just makes the lease non-useful, but shouldn't break anything. Reviewed-by: Petr Vorel <pvorel@suse.cz> ==== Error log ===== fcntl24 1 TFAIL : fcntl24.c:148: fcntl(tfile_7254, F_SETLEASE, F_WRLCK) Failed, errno=11 : Resource temporarily unavailable fcntl25 1 TFAIL : fcntl25.c:149: fcntl(tfile_7255, F_SETLEASE, F_WRLCK) Failed, errno=11 : Resource temporarily unavailable fcntl26 1 TFAIL : fcntl26.c:149: fcntl(tfile_7256, F_SETLEASE, F_WRLCK) Failed, errno=11 : Resource temporarily unavailable fcntl33.c:118: FAIL: fcntl() failed to set lease: EAGAIN/EWOULDBLOCK fcntl33.c:118: FAIL: fcntl() failed to set lease: EAGAIN/EWOULDBLOCK fcntl33.c:118: FAIL: fcntl() failed to set lease: EAGAIN/EWOULDBLOCK fcntl33.c:118: FAIL: fcntl() failed to set lease: EAGAIN/EWOULDBLOCK Reported-by: Xiong Zhou <xzhou@redhat.com> Signed-off-by: Li Wang <liwang@redhat.com> Cc: Miklos Szeredi <mszeredi@redhat.com> Cc: Ye Chao <cye@redhat.com> Signed-off-by: Petr Vorel <pvorel@suse.cz>
2019-01-23lib: Add library function for parsing kernel configCyril Hrubis
This is meant as last resort action for disabling tests if certain kernel funcitonality was not present, in general case runtime checks are prefered. For functionality that can be build as a module tst_check_driver() is most likely better fit since it will also insert requested kernel module into kernel if needed. For newly added syscalls kernel version comparsion and/or checking errno is prefered. However in rare cases certain core kernel functionality cannot be detected in any other way than checking the kernel config, which is where this API gets into the play. The path to the kernel config could be specified by KCONFIG_PATH environment variable, which also takes precedence before the autodetection that attempts to read the config from known locations. The required kernel options are passed as an array of strings via the .needs_kconfigs pointer in the tst_test structure. The purpose of this is twofold, one is that the test can disable itself at runtime if given functionality is missing from kernel .config and second is about being able to propagate this information to the testrunner (this could be done once we figure out how export the information from the structure to the test runner) then we can avoid running tests on unsuitable configurations from the start. There are two different ways how to specify the required kernel options either by stating the config name i.e. "CONFIG_FOO" which is considered present in kernel if set to a certain value and "CONFIG_FOO=bar" which requires the config option to be strictly set to a desired value. The code has been also split into parsing phase that simply picks up the config option values from the config and to evaluation which does the actual checks and aborts the test if needed. This makes it easier to expand the domain language for specifying the required options, if we ever need to match against subset of values this should be reasonably easy to implement. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Reviewed-by: Petr Vorel <pvorel@suse.cz> Acked-by: Sandeep Patil <sspatil@google.com> CC: Pengfei Xu <pengfei.xu@intel.com> CC: automated-testing@yoctoproject.org
2019-01-18lapi/syscalls/s390x: Fix (u)getrlimit syscall numbersMichael Holzheu
On s390x we only have the getrlimit() syscall with number 191 and no ugetrlimit() syscall. Because of the wrong definition the testcase "getrlimit03" fails on s390x. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Acked-by: Jan Stancek <jstancek@redhat.com>
2019-01-18lapi/regen.sh: Fix s390 checkMichael Holzheu
On s390 (32 bit) only the "__s390__" macro is set by gcc and on s390x (64 bit) both macros "__s390__" and "__s390x__" are set. Therefore a check "#ifdef __s390__" is not sufficient for checking 32 bit Mainframe Linux systems since this is also true on s390x machines. Fix this and generate the correct s390 check: "#if defined(__s390__) && !defined(__s390x__)" Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Acked-by: Jan Stancek <jstancek@redhat.com>
2019-01-15lib: Add SAFE_SOCKETPAIR()Ramon Pantin
NOTE: Added only into new API. Signed-off-by: Ramon Pantin <pantin@google.com> [pvorel: removed ESOCKTNOSUPPORT, EPFNOSUPPORT as (according to man socketpair(2) and kernel sources) it should not happen on socketpair()] Signed-off-by: Petr Vorel <pvorel@suse.cz>
2019-01-08lib: rename BUILD_BUG_ON macroJan Stancek
It can collide with existing macros of same name: gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -Illtp -o quotactl03 In file included from ../../../../include/tst_test.h:29:0, from quotactl03.c:53: ../../../../include/tst_common.h:68:0: warning: "BUILD_BUG_ON" redefined #define BUILD_BUG_ON(condition) \ In file included from /usr/include/xfs/xqm.h:21:0, from quotactl03.c:50: /usr/include/xfs/xfs.h:68:0: note: this is the location of the previous definiti #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) Suggested-by: Cyril Hrubis <chrubis@suse.cz> Signed-off-by: Jan Stancek <jstancek@redhat.com>