device-drivers: tbio: enable build and run

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Fix cgroup_regression_test.sh script issue

Testcase cgroup sometimes fail although there is no bug found.
Initialize the exit status to fix it.
Using "rmdir cgroup/" to clean up test_dir sometimes failed because
there may be subdir not removed in cgroup/.
Using "rmdir -p cgroup/*" instead.

Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
ext4-new-features: fix syntax error in configure

In configure, string comparison is done using double assignment.
/bin/sh doesn't allow to compare strings using "==".
So "==" is modified to "=".

Signed-off-by: Honggyu Kim <hong.gyu.kim@lge.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
kernel/connectors: TCONF vs TBROK, and fix check for root

Fixed check for root the same way as in
08dcfbb5a4ebad9319c54935a600ab936708c6da.

If the test is run on unsupported kernels it
should return TCONF, not TBROK. Fixed this.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
device-drivers: pci: check memory region for flag IORESOURCE_PREFETCH

This is done to make sure there will be no side effects if we change it somehow
in the test (e.g. we're not changing I/O ports implemented as memory regions).
Remove annoying printk messages.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
chdir/chdir01.c: Add ELOOP error number test

Add ELOOP error number test in chdir01.c for chdir(2)

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
chmod/chmod06.c: add ELOOP, EROFS error number test for chmod(2)

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
chown/chown04.c: Add ELOOP EROFS

Add ELOOP, EROFS error number test in chown04.c for chown(2)

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
iptables_tests.sh: nat table can have 4 chains

It is considered by iptables_tests.sh a failure When nat table chain count is
not 3, while recent kernels can have 4 built-in chains in nat table, namely
PREROUTING, OUTPUT, POSTROUTING and INPUT.

Signed-off-by: Simon Xu <xu.simon@oracle.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
dhcpd_tests.sh: fix dhcpd.conf file paths

dhcpd_tests.sh only checks for /etc/dhcpd.conf, while in some distros the
path is /etc/dhcp/dhcpd.conf.

Signed-off-by: Simon Xu <xu.simon@oracle.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
chroot/chroot03.c: add ELOOP error value test for chroot(2)

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
chroot03: code clean up

Clean up the code.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
fcntl/fcntl16: close fd before unlink

This testcase fails on NFS but doesn't remove its
working directory on exit (NFS silly rename):

TWARN  :  tst_rmdir: rmobj(/mnt/fcn1GHJ8g) failed: unlink(/mnt/fcn1GHJ8g/.nfs0000000000000c4200000001) failed; errno=16: Device or resource busy

Fixed.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
build: Change MAKE_TARGETS in include/mk/lib.mk

Currently the lib.mk sets the MAKE_TARGETS to $(LIB) which does not
allow any other targets to be added before the lib.mk is included.

This commit changes the := to += so that the $(LIB) target is added to
the list instead.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
device-drivers: pci: fix PCI_EXP_CAP_CONFIG test-case

There is another way to check that PCI Express config space of pci devices
can be read successfully.
Firstly, find out if a device has a PCI Express Capability: we should get
a correct config address offset from the dev's structure (dev->pcie_cap).
Using the offset, read a PCI Express header. Check if we can get the right
PCI Express CAP ID from the header (it must match the PCI_CAP_ID_EXP macro).

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
acct01: fix TBROK to TCONF if acct not implemented

acct system call is avaliable only when the kernel option is on.
When it fails, acct returns -1 and sets errno correspondingly.
ENOSYS is set when the system call is not implemented.
Currently, ENOSYS is not checked when the TEST_FILE5 argument is passed.
It just goes to TBROK regardless of the implementation in kernel.
This patch modifies to check errno ENOSYS, and marks as TCONF in that case.

Signed-off-by: Honggyu Kim <nexus226@gmail.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
sctp: enlarge SO_RCVBUF option value

When using setsockopt() with recent Linux kernels, it doesn't make sense to
use a value smaller than SOCK_MIN_RCVBUF/2 for SO_RCVBUF and expect getting
a SO_RCVBUF value by getsockopt() which is doubled.  See the following code
in linux/net/core/sock.c:

	if ((val * 2) < SOCK_MIN_RCVBUF)
		sk->sk_rcvbuf = SOCK_MIN_RCVBUF;
	else
		sk->sk_rcvbuf = val * 2;
	break;

SOCK_MIN_RCVBUF is defined as (2048 + sizeof(struct sk_buff)) which is 2240.

Signed-off-by: Simon Xu <xu.simon@oracle.com>
Reviewed-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
acct/acct01.c: Add ELOOP ENAMETOOLONG EROFS

Add ELOOP, ENAMETOOLONG, EROFS error number test in acct01.c for acct(2)

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
acct01: Fix runtest files.

I've missed these when I was rebasing the acct01 patch.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
device-drivers: pci: remove bus_slot file on exit

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>