QuarkContainer / Quark

A secure container runtime with CRI/OCI interface
Apache License 2.0
313 stars 47 forks source link

armdev - Testing #1222

Open chl337 opened 4 months ago

chl337 commented 4 months ago

Now the armdev-branch can be tested using the LinuxTestProject.

docker build -t test_ltp:latest .

The syscalls are in testcases/kernel/syscalls/.

@QuarkContainer @CharlyYu

shrik3 commented 4 months ago

@chl337 are you interested in cherry-picking some tests and wrap some build scripts? It would be really nice to have a testing docker image containing all the tests.

@QuarkContainer Do you think it's worth the hassle to sort out the licensing[^lic], or should we just have another repo only for tests?

[^lic]: if we directly put those tests in this repo, GPL license is not compatible. REUSE and sub-licensing would work around that since tests are technically not part of Quark, but still that's a hassle...

chl337 commented 4 months ago

@chl337 are you interested in cherry-picking some tests and wrap some build scripts? It would be really nice to have a testing docker image containing all the tests.

Yes, I guess it would come in handy.

shrik3 commented 3 months ago

If I may add, this is desired not just for arm

chl337 commented 3 months ago

I added a wiki for this. Please help to improve with your suggestions :). My todos:

shrik3 commented 3 months ago

I added a wiki for this. Please help to improve with your suggestions :). My todos:

* Create a table (pro arch) for test status (and remove the ugly listing).

* Adjust script for single test selection, and expand for further tests.

Thanks. Since there is no need to incorporate the whole LTP codebase, perhaps consider pushing the Dockerfile & scripts to Quark/test

chl337 commented 3 months ago

consider pushing the Dockerfile & scripts to Quark/test

Of course.

shrik3 commented 3 months ago

the kernel/syscalls tests require some certain versions of "linux kernel", e.g.

root@4b0987f3bf09:/home/ltp# ./testcases/kernel/syscalls/arch_prctl/arch_prctl01 
tst_test.c:914: TCONF: The test requires kernel 4.12 or newer

the test_kvercmp takes the uname:

int tst_kvercmp(int r1, int r2, int r3)
{
    struct utsname uval;
    uname(&uval);
    return tst_kvcmp(uval.release, r1, r2, r3);
}

Anyways, not providing a "new enough" uname prevents us from doing some, if not most, of those tests. I suggest either 1) simply skip the check_kver() (lib/tst_test.c) or 2) fake a uname