Skip to content

Begin Running Examples in the Test Suite - #31

Merged
MattToast merged 18 commits into
mainfrom
examples-to-test-suite
Aug 21, 2026
Merged

Begin Running Examples in the Test Suite#31
MattToast merged 18 commits into
mainfrom
examples-to-test-suite

Conversation

@MattToast

Copy link
Copy Markdown
Collaborator

Adds some infrastructure to run examples as part of the test suite. Adds three of the examples to the test suite, checking that return code and stdout match what is expected.

There is still work to do to run the remain examples, but this hopefully will lend some guidance for #25.

@MattToast
MattToast requested a review from ashao August 18, 2026 18:44
@MattToast MattToast self-assigned this Aug 18, 2026
@MattToast
MattToast force-pushed the examples-to-test-suite branch from 1157656 to a839bbf Compare August 20, 2026 21:43
@MattToast
MattToast marked this pull request as ready for review August 20, 2026 23:44

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want this file committed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do. This is the file that the test suite will use check to make sure that the stdout of the example matches what we expect in the test suite.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even after the fix I made to CMake, it still shows up twice?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was last I checked, but its honestly been a minute since I last pulled from main. Let me try merging up and double checking!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it still is for me :/

$ ldd ./install/bin/examples/dragon-cpp-producer
	linux-vdso.so.1 (0x00007fce75703000)
	libradex.so => /lus/scratch/drozt/repos/rhapdev/raddex/install/lib64/libradex.so (0x00007fce756a5000)
	libsmartredis.so => /lus/scratch/drozt/repos/ssimdev/sr/install/lib64/libsmartredis.so (0x00007fce754d3000)
	libdragon.so => not found  # <- Links here
	libxpmem.so.0 => /opt/xpmem/lib64/libxpmem.so.0 (0x00007fce754b2000)
	libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fce7524d000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fce75163000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fce75136000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fce74f21000)
	libdragon.so => /lus/scratch/drozt/repos/rhapdev/raddex/venv/lib/python3.12/site-packages/dragon/lib/libdragon.so (0x00007fce74a6b000)  # <- Links here also!
	/lib64/ld-linux-x86-64.so.2 (0x00007fce75705000)

and similarly, for the in-mem example libdragon.so is still required to be present on the LD_LIBRARY_PATH

$ ldd install/bin/examples/in-mem-poc
	linux-vdso.so.1 (0x00007ffd7f318000)
	libradex.so => /lus/scratch/drozt/repos/rhapdev/raddex/install/lib64/libradex.so (0x00007f8720b21000)
	libsmartredis.so => /lus/scratch/drozt/repos/ssimdev/sr/install/lib64/libsmartredis.so (0x00007f872094f000)
	libdragon.so => not found  # <- Links here
	libxpmem.so.0 => /opt/xpmem/lib64/libxpmem.so.0 (0x00007f872092e000)
	libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f87206c9000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f87205df000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f87205b2000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f872039d000)
	libdragon.so => /lus/scratch/drozt/repos/rhapdev/raddex/venv/lib/python3.12/site-packages/dragon/lib/libdragon.so (0x00007f871fee7000)  # <- And here
	/lib64/ld-linux-x86-64.so.2 (0x00007f8720b7b000)

That said, the problem isn't so much that it is double linking, but rather that libdragon.so must be on LD_LIBRARY_PATH. I can update the header on the try/except block doing this mangling.

@MattToast
MattToast merged commit 6e78dc4 into main Aug 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants