Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefile: fix parallel make check failing on the first run (#177) #178

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

isaac-io
Copy link
Contributor

After the changes in #141, parallel make check started failing with the following GNU Parallel error:

Option tmpdir requires an argument

This is caused by the fact that test_config.mk uses ?= for setting TEST_TMPDIR and on make restarts this doesn't work for some reason (perhaps having to do with empty TEST_TMPDIR being somehow exported).

Replace it with a check for empty value and unconditional assignment instead. While at it, include test_config.mk only on make restarts for check targets instead of forcing everything that makes use of TEST_TMPDIR to reuse the unit tests configuration.

Also use 6 Xs for the mktemp template in order to support BusyBox mktemp and maybe some others as well, that require the template to end with 6 Xs exactly.

@isaac-io isaac-io added the Upstreamable can be upstreamed to RocksDB label Sep 23, 2022
@isaac-io isaac-io requested a review from udi-speedb September 23, 2022 09:57
@isaac-io isaac-io self-assigned this Sep 23, 2022
@isaac-io isaac-io linked an issue Sep 23, 2022 that may be closed by this pull request
@isaac-io isaac-io requested review from mrambacher and removed request for udi-speedb September 29, 2022 09:00
Copy link
Contributor

@mrambacher mrambacher left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -27,11 +28,11 @@ ifeq ($(BASE_TMPDIR),)
BASE_TMPDIR :=/tmp
endif
# Use /dev/shm on Linux if it has the sticky bit set (otherwise, /tmp or other
# base dir), and create a randomly-named rocksdb.XXXX directory therein.
# base dir), and create a randomly-named rocksdb.XXXXXX directory therein.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why you changed the randomness/added more XXX? A comment somewhere (either in the source or the PR) would suffice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add a comment in the Makefile, but I did explain it in the commit message:

Also use 6 Xs for the mktemp template in order to support BusyBox mktemp and maybe some others as well, that require the template to end with 6 Xs exactly.

After the changes in #141, parallel `make check` started failing with the
following GNU Parallel error:

> Option tmpdir requires an argument

This is caused by the fact that `test_config.mk` uses `?=` for setting
`TEST_TMPDIR` and on make restarts this doesn't work for some reason
(perhaps having to do with empty `TEST_TMPDIR` being somehow exported).

Replace it with a check for empty value and unconditional assignment
instead. While at it, include `test_config.mk` only on make restarts for
check targets instead of forcing everything that makes use of `TEST_TMPDIR`
to reuse the unit tests configuration.

Also use 6 Xs for the mktemp template in order to support BusyBox mktemp
and maybe some others as well, that require the template to end with 6 Xs
exactly.
@isaac-io isaac-io force-pushed the 177-parallel-make-check-fails-on-the-first-run branch from cc5d00b to 862d67b Compare September 29, 2022 17:58
@isaac-io isaac-io merged commit 36cfb09 into main Sep 29, 2022
@isaac-io isaac-io deleted the 177-parallel-make-check-fails-on-the-first-run branch September 29, 2022 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upstreamable can be upstreamed to RocksDB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parallel make check fails on the first run
2 participants