-
Notifications
You must be signed in to change notification settings - Fork 116
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
posix filesystem call test suite based on pjdfstest #104
base: main
Are you sure you want to change the base?
Conversation
@sequix please sign off thanks |
Signed-off-by: sequix <[email protected]>
signed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! How do you think about ltp(Linux Test Project)?
# basic packages | ||
RUN apt-get update -y && \ | ||
apt-get --no-install-recommends install -y libbtrfs-dev libseccomp-dev fuse \ | ||
apt-transport-https gnupg2 software-properties-common |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean apt-transport-https gnupg2 software-properties-common
.
set -euo pipefail | ||
|
||
# Check Dockerfile at script/posix/Dockerfile | ||
IMAGE_PJDFSTEST="${IMAGE_PJDFSTEST:-docker.io/sequix/pjdfstest:v1-stargz}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll also upload it when we merge it.
ctr-remote run --rm --snapshotter=stargz "$IMAGE_PJDFSTEST" "$containerID" >/output || \ | ||
echo -e "\e[91mPosix test failed!\e[0m" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should propagate the exit code to the caller scripts (test.sh) so that Github Actions can know the success/failure of this test.
@sequix thanks! but we need your real name :P |
Looks like the ltp community is pretty active, not like pjdfstest. I will git ltp a try. |
Is this still on plan? |
#101 covers performance test, this PR covers posix calls with (pjd/pjdfstest)[https://github.com/pjd/pjdfstest]. It uses perl TAP-Harness to mock posix calls and its test case is written in script like.
You can see this will create files on the rw layer, but I still got some errors, At first I thought this is about the container environment, but the errors disappear when I switched to oci image.
Interpretation of above log:
Correspond to the 5th and 10th
expect
statement of filehttps://github.com/pjd/pjdfstest/blob/master/tests/chown/02.t
. After exmaine all failed tests, they allexpect ENAMETOOLONG
.Maybe later we can build tests in ro layer based on this.