iovisor / iovisor/bcc

Symbol name and zip tests looking for PATH in build folder

Open
#4,683 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Hi,

root@qemux86-64:/usr/lib/bcc# uname -a
Linux qemux86-64 6.1.38-yocto-standard #1 SMP PREEMPT_DYNAMIC Thu Jul 6 18:52:54 UTC 2023 x86_64 GNUx

The libbpf seems to be looking for the symbol name in build folder.
Hence, these tests fail on target where these PATH's can't be found.
*************************************************************************************************************************************
openat(AT_FDCWD, "/home/check/build/tmp/work/core2-64-poky-linux/bcc/0.28.0+gitAUTOINC+8422cd449a-r0/build/tests/cc/archive.zip", O_RDONLY) = -1 ENOENT (No such file or directory)
newfstatat(1, "", {st_mode=S_IFREG|0644, st_size=25201, ...}, AT_EMPTY_PATH) = 0
ioctl(1, TCGETS, 0x7fff84bfa0a0) = -1 ENOTTY (Inappropriate ioctl for device)

-------------------------------------------------------------------------------
open zip archive and finds an entry
-------------------------------------------------------------------------------
/usr/src/debug/bcc/0.28.0+gitAUTOINC+8422cd449a-r0/tests/cc/test_zip.cc:92
...............................................................................

) = 516
write(1, "/usr/src/debug/bcc/0.28.0+gitAUT"..., 151/usr/src/debug/bcc/0.28.0+gitAUTOINC+8422cd449a-r0/tests/cc/test_zip.cc:96: FAILED:
REQUIRE( archive != nullptr )
with expansion:
NULL != nullptr
************************************************************************************************************************************

Please let me know if its a known behavior or it should be fixed to PASS on targets?

Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with tests/cc/test_zip.cc, especially the failing checks at lines 92 and 96, and inspect how the test locates archive.zip on the target. Compare the target paths with the build-time path shown in the trace; done means the affected tests no longer depend on unavailable build-folder paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp, linux
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.