Skip to content

Unset SOURCE_DATA_EPOCH in os9commandtest - #79

Merged
tlindner merged 2 commits into
nitros9project:mainfrom
hpmachining:fix-sde-issue-in-unittest
Aug 1, 2026
Merged

tlindner merged 2 commits into
nitros9project:mainfrom
hpmachining:fix-sde-issue-in-unittest

Conversation

@hpmachining

@hpmachining hpmachining commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Test fails if SOURCE_DATE_EPOCH is set in the environment.

Reproduce (any epoch value triggers it):

export SOURCE_DATE_EPOCH=1700000000
make -C build/unix clean && make -C build/unix
./librbftest
PASSED [../../../unittest/librbftest.c] (total:12)
./libdecbtest
PASSED [../../../unittest/libdecbtest.c] (total:9)
./libcecbtest
PASSED [../../../unittest/libcecbtest.c] (total:4)
./libtoolshedtest
PASSED [../../../unittest/libtoolshedtest.c] (total:3)
./os9commandtest
failure: ../../../unittest/os9commandtest.c:93: In test test_os9_command_copy_metadata():
    converted_native_fstat.fd_dat (0) (memcmp((os9_fstat.fd_dat),(converted_native_fstat.fd_dat),(5)) == 0)
FAILED [../../../unittest/os9commandtest.c] (passed:1, failed:1, total:2)

Test fails if SOURCE_DATA_EPOCH is set in the environment.
@tlindner

Copy link
Copy Markdown
Member

First off, I really apologize for missing this scenario during my testing!

However, rather than unsetting SOURCE_DATE_EPOCH for this test, I think it would be better to rework the test to respect its presence and work within a reproducible build mindset.

That way, we ensure the test suite runs reliably regardless of whether SOURCE_DATE_EPOCH is set in the host environment.

@hpmachining

Copy link
Copy Markdown
Contributor Author

Understood. That sounds like a better plan. This got my AUR package to build for now, at least. FYI, decbcommandtest is not affected. Should I close this or you?

@tlindner

Copy link
Copy Markdown
Member

If you want to take another crack at fixing it, leave it open. If you want me to do it, close it.

@hpmachining

Copy link
Copy Markdown
Contributor Author

First off, apologies for the typo in my first commit, SOURCE_DATA_EPOCH instead of SOURCE_DATE_EPOCH. I gave it another try. Let me know if this is a suitable fix.

@tlindner
tlindner merged commit 9e93026 into nitros9project:main Aug 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants