linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.3k stars 1.01k forks source link

check_keepcaps test cases are failing #885

Closed mahi657 closed 2 years ago

mahi657 commented 2 years ago

check_keepcaps test case is failing as TCONF with all possible arguments(1,2,3),

root@abc:/opt/ltp/testcases/bin ./check_keepcaps 1 keepcaps 1 TCONF : check_keepcaps.c:152: linux/securebits.h or libcap does not exist. keepcaps 2 TCONF : check_keepcaps.c:152: Remaining cases not appropriate for configuration

I verified that securebits.h file and libcap v2 library are present,

root@abc:ls -lrt /usr/include/linux/securebits.h -rw-r--r--. 1 root root 2704 Sep 29 08:43 /usr/include/linux/securebits.h

root@abc:/usr/lib64 ls -lrt libcap* lrwxrwxrwx. 1 root root 18 Aug 10 11:29 libcap-ng.so.0 -> libcap-ng.so.0.0.0 -rwxr-xr-x. 1 root root 68936 Aug 10 11:29 libcap-ng.so.0.0.0 lrwxrwxrwx. 1 root root 14 Aug 27 09:17 libcap.so.2 -> libcap.so.2.48 -rwxr-xr-x. 1 root root 69432 Aug 27 09:17 libcap.so.2.48

This is failing in SLES15SP3(5.3.18-59.27-default), RHEL8.4(4.18.0-305.25.1.el8_4.ppc64le) and RHEL9(5.14.0-1.5.1.el9.ppc64le) kernels.

metan-ucw commented 2 years ago

Looks like LTP was compiled without these libraries. These libraries have to be present before the configure script is executed during the compilation.

mahi657 commented 2 years ago

Looks like LTP was compiled without these libraries. These libraries have to be present before the configure script is executed during the compilation.

Thanks Cyril for your response. These libraries are part of OS installation, so they were already present before LTP was installed.

metan-ucw commented 2 years ago

Well the libraries are, but the headers usually are not unless you install libcap devel library.

Btw, we have a script that prints a list of required packages given a distribution name see:

https://github.com/metan-ucw/runltp-ng/blob/master/install_pkg.pm

mahi657 commented 2 years ago

Well the libraries are, but the headers usually are not unless you install libcap devel library.

Btw, we have a script that prints a list of required packages given a distribution name see:

https://github.com/metan-ucw/runltp-ng/blob/master/install_pkg.pm

Thanks a lot Cyril!!

libcap devel libraries were not installed, I installed them, recompiled and installed ltp again. Now the cases are passing