Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Run annocheck for libruby.so #11123

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@ no-test-bundler-parallel:
# architecture. It is designed to be independent of the host OS and the
# architecture. The test-annocheck.sh requires docker or podman.
test-annocheck: $(PROGRAM)
Copy link
Member

Choose a reason for hiding this comment

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

The $(LIBRUBY_SO) is missed at this line.

$(tooldir)/test-annocheck.sh $(PROGRAM)
$(tooldir)/test-annocheck.sh $(PROGRAM) $(LIBRUBY_SO)

GEM = up
sync-default-gems:
Expand Down
3 changes: 1 addition & 2 deletions tool/annocheck/Dockerfile-copy
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ FROM docker.io/fedora:latest
ARG FILES

RUN dnf -y install annobin-annocheck
RUN mkdir /work
COPY ${FILES} /work
COPY ${FILES} /work/
WORKDIR /work
3 changes: 2 additions & 1 deletion tool/test-annocheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ else
# volume in container in container on GitHub Actions
# <.github/workflows/compilers.yml>.
TAG="${TAG}-copy"
"${DOCKER}" build --rm -t "${TAG}" --build-arg=FILES="${*}" -f ${TOOL_DIR}/annocheck/Dockerfile-copy .
sed -r "s/\\$\{FILES\}/${*}/" ${TOOL_DIR}/annocheck/Dockerfile-copy | \
Copy link
Member

Choose a reason for hiding this comment

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

Isn't / as the separator unsafe, as it is also a file separator.

Copy link
Member

@junaruga junaruga Jul 23, 2024

Choose a reason for hiding this comment

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

@nobu I would agree with your opinion. the / is unsafe when the ${*} includes the file separator /.

However, I don't think we need to use the sed command. Because this hack just ignores the functionality of the --build-arg=FILES="${*}" as an argument. And I have alternative idea to deal with this limitation in a way to understand the logic easily in my opinion. I will share it soon.

"${DOCKER}" build --rm -t "${TAG}" --build-arg=FILES="${*}" -f - .
fi

"${DOCKER}" run --rm -t ${DOCKER_RUN_VOLUME_OPTS} "${TAG}" annocheck --verbose ${TEST_ANNOCHECK_OPTS-} "${@}"
Loading