Description of problem: If I download git repo to RHEL5 machine and run "make check" after building the library, the rpminfo probe test fails. Version-Release number of selected component (if applicable): git repo on 08-Apr-10 Actual results: + test_probes_rpminfo [ FAIL ]
http://git.fedoraproject.org/git/openscap.git?p=openscap.git;a=commitdiff;h=e20f898f4ad6db2b613f2ac02c9f0d1fd65bb3a0
Checked out git and built a distribution tarball. Unpacked it on RHEL5 and ran make check. It still fails. Not sure if this is helpful or not...I ran: export OVAL_PROBE_DIR="$(pwd)/src/OVAL/probes/" strace ./tests/test_probes tests/test_probes_rpminfo.xml /tmp/test_probes_rpminfo.xml.res and got the following: socketpair(PF_FILE, SOCK_STREAM, 0, [3, 4]) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2b6befc828d0) = 17952 close(4) = 0 writev(3, [{"(#d8:seap.msg#d3::id#d0((#d14:sy"..., 67}], 1) = 67 select(4, [3], NULL, NULL, NULL) = 1 (in [3]) read(3, "(#d8:seap.msg#d3::id#d0#d9::repl"..., 16384) = 638 times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 429607549 futex(0x63b980, FUTEX_WAKE_PRIVATE, 2147483647) = 0 socketpair(PF_FILE, SOCK_STREAM, 0, [4, 5]) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2b6befc828d0) = 17968 --- SIGCHLD (Child exited) @ 0 (0) --- close(5) = 0 writev(4, [{"(#d8:seap.msg#d3::id#d0((#d14:rp"..., 131}], 1) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- +++ killed by SIGPIPE +++ The .res file is empty.
I've tested this on RHEL 5.4. Are you using a different minor release? What is the version of the rpm library installed on your system? Here are results from my testing environment for comparison: $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.4 (Tikanga) $ rpmquery rpm-libs rpm-libs-4.4.2.3-18.el5 $ make check ... ... -------------------------------------------------- + test_probes_setup [ PASS ] + test_probes_sysinfo [ PASS ] + test_probes_family [ PASS ] + test_probes_uname [ PASS ] + test_probes_file [ PASS ] + test_probes_rpminfo [ PASS ] + test_probes_runlevel_A [ PASS ] + test_probes_runlevel_B [ PASS ] + test_probes_password_A [ PASS ] + test_probes_shadow_A [ SKIP ] + test_probes_textfilecontent54 [ PASS ] + test_crapi_digest [ PASS ] + test_probes_cleanup [ PASS ] -------------------------------------------------- See test_probes.log (in tests dir) PASS: OVAL/probes/test_probes.sh ================== All 3 tests passed ================== The probe probably still segfaults on your system. Please try to run it directly (i.e. without using ./test_probes) via gdb or valgrind and with rpm-debuginfo installed. The input for the probe can be something like the following: (seap.msg :id 0 ((rpminfo_object :id "oval:1:obj:1") ((name :operation 1 :var_check "all") "acl"))) You can substitute acl with some other package name. Path to the probe is... $ ./src/OVAL/probes/probe_file ...assuming you are in $(top_srcdir)
Ok, you can't use ./src/OVAL/probes/probe_file if you are going to use gdb or valgrind. Please use the following path instead: ./src/OVAL/probes/.libs/lt-probe_file and set the LD_LIBRARY_PATH environment variable to "$(pwd)/src/.libs". Here is the complete command for the sake of clarity: $ LD_LIBRARY_PATH="$(pwd)/src/.libs" gdb ./src/OVAL/probes/.libs/lt-probe_file You could use `set follow-fork-mode child' or --trace-children=yes in case of valgrind, but the "raw" way is more reliable, I think. Thanks.
I think I'm on 5.3 which uses rpm-4.4.2.3-9.el5. Starting program: /home/sgrubb/working/BUILD/openscap-0.5.8/src/OVAL/probes/.libs/lt-probe_file [Thread debugging using libthread_db enabled] (seap.msg :id 0 ((rpminfo_object :id "oval:1:obj:1") ((name :operation 1 :var_check "all") "acl"))) [New Thread 0x2ac385471e80 (LWP 3262)] [New Thread 0x422a2940 (LWP 3265)] (#d8:seap.err#d8::orig_id#d0#d5::type#d1#d2)[Thread 0x422a2940 (LWP 3265) exited] bt Program exited with code 026. Does this help any?
Went back and checked ./configure's output: checking for gcry_check_version in -lgcrypt... yes checking for library containing rpmdbOpen... no configure: RPM missing rpmtsCreate compatibility. RPM probes will not be enabled. Installing rpm-devel fixes the probes: + test_probes_rpminfo [ PASS ] So, I guess that if a probe is not built, its corresponding test should also not be run.
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle. Changing version to '14'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping