This small series updates the io_uring tests and adds them to the
morello_transitional_extended list.
This series depends on the following Morello Linux series:
"Support io_uring for Purecap apps"
Review branch:
https://git.morello-project.org/tudcre01/morello-linux-ltp/-/commits/morell…
Tudor Cretu (2):
syscalls/io_uring: Update uAPI structs
runtest: Add io_uring tests to extended PCuABI syscall list
include/lapi/io_uring.h | 10 +++++-----
runtest/morello_transitional_extended | 4 ++++
testcases/kernel/syscalls/io_uring/io_uring01.c | 4 ++--
testcases/kernel/syscalls/io_uring/io_uring02.c | 6 +++---
4 files changed, 14 insertions(+), 10 deletions(-)
--
2.34.1
Add a set of skip files for running the syscalls set of tests in compat
or purecap:
- syscalls_morello_musl_skip skips all Musl related failures,
- syscalls_morello_skip is for tests skipped and not built for Morello,
- syscalls_morello_purecap_skip is for tests skipped in purecap.
Update the README to reflect those additions and explain how to use
the skip files.
This is preparation for CI testing in Morello release 1.6 and later.
Signed-off-by: Teo Couprie Diaz <teo.coupriediaz(a)arm.com>
---
v6:
- Clarified wording on build setup and version compatibility
- Added two missing tests to the relevant skip lists
v5:
- Clarified the wording around syscalls_morello_skip thanks to
Kevin's comments.
- Added command line example for purecap skip files.
v4:
- Some README rephrasing to address Beata's comments
- Changed kernel version dependency comment in the musl skip file
- Renamed all skip files to accomodate for a purecap one
- Added purecap skip file
- Updated README and commit message for purecap skip file
v3:
- Added *_16 tests to the skip list
- Added tests from kernel/security as we don't build them yet
- Mentioned Morello 1.6 release
v2:
- Removed mentions of COMPAT
- Reworded comment around Alpine
- Added bpf_prog02 to the musl skips after further testing
README.rst | 30 +++++
runtest/syscalls_morello_musl_skip | 18 +++
runtest/syscalls_morello_purecap_skip | 12 ++
runtest/syscalls_morello_skip | 173 ++++++++++++++++++++++++++
4 files changed, 233 insertions(+)
create mode 100644 runtest/syscalls_morello_musl_skip
create mode 100644 runtest/syscalls_morello_purecap_skip
create mode 100644 runtest/syscalls_morello_skip
diff --git a/README.rst b/README.rst
index 8b6e3a7769d0..e8293e24401d 100644
--- a/README.rst
+++ b/README.rst
@@ -136,6 +136,36 @@ Running tests:
runltp -f morello_transitional,morello_transitional_extended
+Skipping tests:
+---------------
+
+In certain cases, you might want to skip tests that are known to be failing or are yet to be supported.
+
+This is done by passing a file containing the names of the tests to be skip with the option ``-S`` to
+``runltp``.
+
+We currently provide the following skip files under ``runtest/``:
+ - ``syscalls_morello_musl_skip``: Skips all tests failing on a regular AArch64 Musl based system.
+ - ``syscalls_morello_skip``: Skips all tests not considered due to the Morello build setup,
+ or the run environment.
+ - ``syscalls_morello_purecap_skip``: Skips all tests not considered while testing with purecap binaries.
+
+``runltp`` does not support passing multiple skip files, however this can be circumvented by using
+process substitution.
+
+.. code-block::
+
+ ./runltp -f syscalls -S <( cat runtest/syscalls_morello{,_musl}_skip )
+
+To use all relevant skip files relevant for plain AArch64.
+
+.. code-block::
+
+ ./runltp -f syscalls -S <( cat runtest/syscalls_morello{,_musl,_purecap}_skip )
+
+To use all relevant skip files relevant for pure-capability.
+
+These skip files are comprehensive only for morello release 1.6 and above.
Developers playground
---------------------
diff --git a/runtest/syscalls_morello_musl_skip b/runtest/syscalls_morello_musl_skip
new file mode 100644
index 000000000000..93fcb7e89886
--- /dev/null
+++ b/runtest/syscalls_morello_musl_skip
@@ -0,0 +1,18 @@
+# All the following tests from the syscalls test list are failing in Aarch64
+# Musl-based systems (Alpine, Debian...). Thus they depend on Musl or LTP,
+# rather than the kernel, to be fixed.
+# MUSL - Depends on Musl release >= morello-release-1.6.0
+bpf_prog02
+gethostbyname_r01
+mq_open01
+nftw01
+nftw6401
+open13
+perf_event_open02
+recvmmsg01
+sbrk01
+sendmsg01
+setgroups03
+sigrelse01
+sigtimedwait01
+sigwaitinfo01
diff --git a/runtest/syscalls_morello_purecap_skip b/runtest/syscalls_morello_purecap_skip
new file mode 100644
index 000000000000..4f60d9aff005
--- /dev/null
+++ b/runtest/syscalls_morello_purecap_skip
@@ -0,0 +1,12 @@
+# This skip file contains all the tests skipped from the syscalls command file
+# for testing the PCuABI kernel in purecap.
+
+# io_uring is not currently supported in purecap,
+# this test is expected to fail.
+io_uring01
+
+# These tests share capabilities between proccesses through shared memory.
+# This is explicitly prevented by the PCuABI, so there's no point running them.
+process_vm_readv02
+process_vm_readv03
+process_vm_writev02
diff --git a/runtest/syscalls_morello_skip b/runtest/syscalls_morello_skip
new file mode 100644
index 000000000000..bfa60570cb2f
--- /dev/null
+++ b/runtest/syscalls_morello_skip
@@ -0,0 +1,173 @@
+# This skip file contains all the tests skipped from the syscalls command file
+# because of either the build steup for Morello or the system the tests run on.
+# KERN - *: depends on Morello Linux kernel release >= morello-release-1.6.0
+
+# leapsec01 is skipped as systemd-timesyncd interfers with it and it doesn't
+# test any worthwhile functionality.
+leapsec01
+
+# We do not build tests under kernel/security yet, skip them for now.
+prot_hsymlinks
+dirtyc0w
+dirtyc0w_shmem
+dirtypipe
+
+# We do not build *_16 tests, skip them.
+chown01_16
+chown02_16
+chown03_16
+chown04_16
+chown05_16
+fchown01_16
+fchown02_16
+fchown03_16
+fchown04_16
+fchown05_16
+getegid01_16
+getegid02_16
+geteuid01_16
+geteuid02_16
+getgid01_16
+getgid03_16
+getgroups01_16
+getgroups03_16
+getresgid01_16
+getresgid02_16
+getresgid03_16
+getresuid01_16
+getresuid02_16
+getresuid03_16
+getuid01_16
+getuid03_16
+lchown01_16
+lchown02_16
+lchown03_16
+setfsgid01_16
+setfsgid02_16
+setfsgid03_16
+setfsuid01_16
+setfsuid02_16
+setfsuid03_16
+setfsuid04_16
+setgid01_16
+setgid02_16
+setgid03_16
+setgroups01_16
+setgroups02_16
+setgroups03_16
+setgroups04_16
+setregid01_16
+setregid02_16
+setregid03_16
+setregid04_16
+setresgid01_16
+setresgid02_16
+setresgid03_16
+setresgid04_16
+setresuid01_16
+setresuid02_16
+setresuid03_16
+setresuid04_16
+setresuid05_16
+setreuid01_16
+setreuid02_16
+setreuid03_16
+setreuid04_16
+setreuid05_16
+setreuid06_16
+setreuid07_16
+setuid01_16
+setuid03_16
+setuid04_16
+
+# We do not build *_64 tests, skip them.
+posix_fadvise01_64
+posix_fadvise02_64
+posix_fadvise03_64
+posix_fadvise04_64
+fcntl01_64
+fcntl02_64
+fcntl03_64
+fcntl04_64
+fcntl05_64
+fcntl06_64
+fcntl07_64
+fcntl08_64
+fcntl09_64
+fcntl10_64
+fcntl11_64
+fcntl12_64
+fcntl13_64
+fcntl14_64
+fcntl15_64
+fcntl16_64
+fcntl17_64
+fcntl18_64
+fcntl19_64
+fcntl20_64
+fcntl21_64
+fcntl22_64
+fcntl23_64
+fcntl24_64
+fcntl25_64
+fcntl26_64
+fcntl27_64
+fcntl28_64
+fcntl29_64
+fcntl30_64
+fcntl31_64
+fcntl32_64
+fcntl33_64
+fcntl34_64
+fcntl35_64
+fcntl36_64
+fcntl37_64
+fcntl38_64
+fcntl39_64
+fstat02_64
+fstat03_64
+fstatfs01_64
+fstatfs02_64
+ftruncate01_64
+ftruncate03_64
+ftruncate04_64
+lstat01_64
+lstat01A_64
+lstat02_64
+pread01_64
+pread02_64
+preadv01_64
+preadv02_64
+preadv03_64
+preadv201_64
+preadv202_64
+preadv203_64
+pselect01_64
+pselect02_64
+pselect03_64
+pwrite01_64
+pwrite02_64
+pwrite03_64
+pwrite04_64
+pwritev01_64
+pwritev02_64
+pwritev03_64
+pwritev201_64
+pwritev202_64
+sendfile02_64
+sendfile03_64
+sendfile04_64
+sendfile05_64
+sendfile06_64
+sendfile07_64
+sendfile08_64
+sendfile09_64
+stat01_64
+stat02_64
+stat03_64
+stat04_64
+statfs01_64
+statfs02_64
+statfs03_64
+truncate02_64
+truncate03_64
--
2.34.1
Add a set of skip files for running the syscalls set of tests in compat
or purecap:
- syscalls_morello_musl_skip skips all Musl related failures,
- syscalls_morello_skip is for skipped and not built tests in compat,
- syscalls_morello_purecap_skip is for tests skipped in purecap.
Update the README to reflect those additions and explain how to use
the skip files.
This is preparation for CI testing in Morello release 1.6 and later.
Signed-off-by: Teo Couprie Diaz <teo.coupriediaz(a)arm.com>
---
v5:
- Clarified the wording around syscalls_morello_skip thanks to
Kevin's comments.
- Added command line example for purecap skip files.
v4:
- Some README rephrasing to address Beata's comments
- Changed kernel version dependency comment in the musl skip file
- Renamed all skip files to accomodate for a purecap one
- Added purecap skip file
- Updated README and commit message for purecap skip file
v3:
- Added *_16 tests to the skip list
- Added tests from kernel/security as we don't build them yet
- Mentioned Morello 1.6 release
v2:
- Removed mentions of COMPAT
- Reworded comment around Alpine
- Added bpf_prog02 to the musl skips after further testing
README.rst | 30 +++++
runtest/syscalls_morello_musl_skip | 18 +++
runtest/syscalls_morello_purecap_skip | 8 ++
runtest/syscalls_morello_skip | 172 ++++++++++++++++++++++++++
4 files changed, 228 insertions(+)
create mode 100644 runtest/syscalls_morello_musl_skip
create mode 100644 runtest/syscalls_morello_purecap_skip
create mode 100644 runtest/syscalls_morello_skip
diff --git a/README.rst b/README.rst
index 8b6e3a7769d0..73edda443cc4 100644
--- a/README.rst
+++ b/README.rst
@@ -136,6 +136,36 @@ Running tests:
runltp -f morello_transitional,morello_transitional_extended
+Skipping tests:
+---------------
+
+In certain cases, you might want to skip tests that are known to be failing or are yet to be supported.
+
+This is done by passing a file containing the names of the tests to be skip with the option ``-S`` to
+``runltp``.
+
+We currently provide the following skip files under ``runtest/``:
+ - ``syscalls_morello_musl_skip``: Skips all tests failing on a regular AArch64 Musl based system.
+ - ``syscalls_morello_skip``: Skips all tests not considered due to the Morello build, or the run environment.
+ - ``syscalls_morello_purecap_skip``: Skips all tests not considered while testing with purecap binaries.
+
+``runltp`` does not support passing multiple skip files, however this can be circumvented by using
+process substitution.
+
+.. code-block::
+
+ ./runltp -f syscalls -S <( cat runtest/syscalls_morello{,_musl}_skip )
+
+To use all relevant skip files relevant for plain AArch64.
+
+.. code-block::
+
+ ./runltp -f syscalls -S <( cat runtest/syscalls_morello{,_musl,_purecap}_skip )
+
+To use all relevant skip files relevant for plain pure-capability.
+
+In order for the skip files to successfully filter-out expected/known failures in AArch64,
+morello-release-1.6.0 release, or newer is required.
Developers playground
---------------------
diff --git a/runtest/syscalls_morello_musl_skip b/runtest/syscalls_morello_musl_skip
new file mode 100644
index 000000000000..aa3dff6c9449
--- /dev/null
+++ b/runtest/syscalls_morello_musl_skip
@@ -0,0 +1,18 @@
+# All the following tests from the syscalls test list are failing in Aarch64
+# Musl-based systems (Alpine, Debian...). Thus they depend on Musl or LTP,
+# rather than the kernel, to be fixed.
+# MUSL - Depends on Musl release > morello-release-1.5.0
+bpf_prog02
+gethostbyname_r01
+mq_open01
+nftw01
+nftw6401
+open13
+perf_event_open02
+recvmmsg01
+sbrk01
+sendmsg01
+setgroups03
+sigrelse01
+sigtimedwait01
+sigwaitinfo01
diff --git a/runtest/syscalls_morello_purecap_skip b/runtest/syscalls_morello_purecap_skip
new file mode 100644
index 000000000000..e4d66ee1b27f
--- /dev/null
+++ b/runtest/syscalls_morello_purecap_skip
@@ -0,0 +1,8 @@
+# This skip file contains all the tests skipped from the syscalls command file
+# for testing the PCuABI kernel in purecap.
+
+# These tests share capabilities between proccesses through shared memory.
+# This is explicitly prevented by the PCuABI, so there's no point running them.
+process_vm_readv02
+process_vm_readv03
+process_vm_writev02
diff --git a/runtest/syscalls_morello_skip b/runtest/syscalls_morello_skip
new file mode 100644
index 000000000000..b9c0a2479ca9
--- /dev/null
+++ b/runtest/syscalls_morello_skip
@@ -0,0 +1,172 @@
+# This skip file contains all the tests skipped from the syscalls command file
+# because of either the build for Morello or the system the tests are run with.
+# KERN - *: depends on Morello Linux kernel release > morello-release-1.5.0
+
+# leapsec01 is skipped as systemd-timesyncd interfers with it and it doesn't
+# test any worthwhile functionality.
+leapsec01
+
+# We do not build tests under kernel/security yet, skip them for now.
+prot_hsymlinks
+dirtyc0w
+dirtypipe
+
+# We do not build *_16 tests, skip them.
+chown01_16
+chown02_16
+chown03_16
+chown04_16
+chown05_16
+fchown01_16
+fchown02_16
+fchown03_16
+fchown04_16
+fchown05_16
+getegid01_16
+getegid02_16
+geteuid01_16
+geteuid02_16
+getgid01_16
+getgid03_16
+getgroups01_16
+getgroups03_16
+getresgid01_16
+getresgid02_16
+getresgid03_16
+getresuid01_16
+getresuid02_16
+getresuid03_16
+getuid01_16
+getuid03_16
+lchown01_16
+lchown02_16
+lchown03_16
+setfsgid01_16
+setfsgid02_16
+setfsgid03_16
+setfsuid01_16
+setfsuid02_16
+setfsuid03_16
+setfsuid04_16
+setgid01_16
+setgid02_16
+setgid03_16
+setgroups01_16
+setgroups02_16
+setgroups03_16
+setgroups04_16
+setregid01_16
+setregid02_16
+setregid03_16
+setregid04_16
+setresgid01_16
+setresgid02_16
+setresgid03_16
+setresgid04_16
+setresuid01_16
+setresuid02_16
+setresuid03_16
+setresuid04_16
+setresuid05_16
+setreuid01_16
+setreuid02_16
+setreuid03_16
+setreuid04_16
+setreuid05_16
+setreuid06_16
+setreuid07_16
+setuid01_16
+setuid03_16
+setuid04_16
+
+# We do not build *_64 tests, skip them.
+posix_fadvise01_64
+posix_fadvise02_64
+posix_fadvise03_64
+posix_fadvise04_64
+fcntl01_64
+fcntl02_64
+fcntl03_64
+fcntl04_64
+fcntl05_64
+fcntl06_64
+fcntl07_64
+fcntl08_64
+fcntl09_64
+fcntl10_64
+fcntl11_64
+fcntl12_64
+fcntl13_64
+fcntl14_64
+fcntl15_64
+fcntl16_64
+fcntl17_64
+fcntl18_64
+fcntl19_64
+fcntl20_64
+fcntl21_64
+fcntl22_64
+fcntl23_64
+fcntl24_64
+fcntl25_64
+fcntl26_64
+fcntl27_64
+fcntl28_64
+fcntl29_64
+fcntl30_64
+fcntl31_64
+fcntl32_64
+fcntl33_64
+fcntl34_64
+fcntl35_64
+fcntl36_64
+fcntl37_64
+fcntl38_64
+fcntl39_64
+fstat02_64
+fstat03_64
+fstatfs01_64
+fstatfs02_64
+ftruncate01_64
+ftruncate03_64
+ftruncate04_64
+lstat01_64
+lstat01A_64
+lstat02_64
+pread01_64
+pread02_64
+preadv01_64
+preadv02_64
+preadv03_64
+preadv201_64
+preadv202_64
+preadv203_64
+pselect01_64
+pselect02_64
+pselect03_64
+pwrite01_64
+pwrite02_64
+pwrite03_64
+pwrite04_64
+pwritev01_64
+pwritev02_64
+pwritev03_64
+pwritev201_64
+pwritev202_64
+sendfile02_64
+sendfile03_64
+sendfile04_64
+sendfile05_64
+sendfile06_64
+sendfile07_64
+sendfile08_64
+sendfile09_64
+stat01_64
+stat02_64
+stat03_64
+stat04_64
+statfs01_64
+statfs02_64
+statfs03_64
+truncate02_64
+truncate03_64
--
2.34.1
Add a set of skip files for running the syscalls set of tests in compat
or purecap:
- syscalls_morello_musl_skip skips all Musl related failures,
- syscalls_morello_skip is for skipped and not built tests in compat,
- syscalls_morello_purecap_skip is for tests skipped in purecap.
Update the README to reflect those additions and explain how to use
the skip files.
This is preparation for CI testing in Morello release 1.6 and later.
Signed-off-by: Teo Couprie Diaz <teo.coupriediaz(a)arm.com>
---
v4:
- Some README rephrasing to address Beata's comments
- Changed kernel version dependency comment in the musl skip file
- Renamed all skip files to accomodate for a purecap one
- Added purecap skip file
- Updated README and commit message for purecap skip file
v3:
- Added *_16 tests to the skip list
- Added tests from kernel/security as we don't build them yet
- Mentioned Morello 1.6 release
v2:
- Removed mentions of COMPAT
- Reworded comment around Alpine
- Added bpf_prog02 to the musl skips after further testing
README.rst | 26 ++++
runtest/syscalls_morello_musl_skip | 18 +++
runtest/syscalls_morello_purecap_skip | 8 ++
runtest/syscalls_morello_skip | 172 ++++++++++++++++++++++++++
4 files changed, 224 insertions(+)
create mode 100644 runtest/syscalls_morello_musl_skip
create mode 100644 runtest/syscalls_morello_purecap_skip
create mode 100644 runtest/syscalls_morello_skip
diff --git a/README.rst b/README.rst
index 8b6e3a7769d0..3ec476a5985f 100644
--- a/README.rst
+++ b/README.rst
@@ -136,6 +136,32 @@ Running tests:
runltp -f morello_transitional,morello_transitional_extended
+Skipping tests:
+---------------
+
+In certain cases, you might want to skip tests that are known to be failing or are yet to be supported.
+
+This is done by passing a file containing the names of the tests to be skip with the option ``-S`` to
+``runltp``.
+
+We currently provide the following skip files under ``runtest/``:
+ - ``syscalls_morello_musl_skip``: Skips all tests failing on a regular AArch64 Musl based system.
+ - ``syscalls_morello_skip``: Skips all tests not considered while testing plain AArch64
+ with a PCuABI kernel.
+ - ``syscalls_morello_purecap_skip``: Skips all tests not considered while testing with purecap binaries.
+
+``runltp`` does not support passing multiple skip files, however this can be circumvented by using
+process substitution.
+
+.. code-block::
+
+ ./runltp -f syscalls -S <( cat runtest/syscalls_morello{,_musl}_skip )
+
+In order for the skip files to successfully filter-out expected/known failures in AArch64,
+morello-release-1.6.0 release, or newer is required.
+
+It is expected that the purecap skip file will be used in combination with the AArch64 one, as it is
+our current understanding that all AArch64 failures impact pure-capability tests similarly.
Developers playground
---------------------
diff --git a/runtest/syscalls_morello_musl_skip b/runtest/syscalls_morello_musl_skip
new file mode 100644
index 000000000000..aa3dff6c9449
--- /dev/null
+++ b/runtest/syscalls_morello_musl_skip
@@ -0,0 +1,18 @@
+# All the following tests from the syscalls test list are failing in Aarch64
+# Musl-based systems (Alpine, Debian...). Thus they depend on Musl or LTP,
+# rather than the kernel, to be fixed.
+# MUSL - Depends on Musl release > morello-release-1.5.0
+bpf_prog02
+gethostbyname_r01
+mq_open01
+nftw01
+nftw6401
+open13
+perf_event_open02
+recvmmsg01
+sbrk01
+sendmsg01
+setgroups03
+sigrelse01
+sigtimedwait01
+sigwaitinfo01
diff --git a/runtest/syscalls_morello_purecap_skip b/runtest/syscalls_morello_purecap_skip
new file mode 100644
index 000000000000..e4d66ee1b27f
--- /dev/null
+++ b/runtest/syscalls_morello_purecap_skip
@@ -0,0 +1,8 @@
+# This skip file contains all the tests skipped from the syscalls command file
+# for testing the PCuABI kernel in purecap.
+
+# These tests share capabilities between proccesses through shared memory.
+# This is explicitly prevented by the PCuABI, so there's no point running them.
+process_vm_readv02
+process_vm_readv03
+process_vm_writev02
diff --git a/runtest/syscalls_morello_skip b/runtest/syscalls_morello_skip
new file mode 100644
index 000000000000..e509f25f1406
--- /dev/null
+++ b/runtest/syscalls_morello_skip
@@ -0,0 +1,172 @@
+# This skip file contains all the tests skipped from the syscalls command file
+# for testing the PCuABI kernel in plain Aarch64.
+# KERN - *: depends on Morello Linux kernel release > morello-release-1.5.0
+
+# leapsec01 is skipped as systemd-timesyncd interfers with it and it doesn't
+# test any worthwhile functionality.
+leapsec01
+
+# We do not build tests under kernel/security yet, skip them for now.
+prot_hsymlinks
+dirtyc0w
+dirtypipe
+
+# We do not build *_16 tests, skip them.
+chown01_16
+chown02_16
+chown03_16
+chown04_16
+chown05_16
+fchown01_16
+fchown02_16
+fchown03_16
+fchown04_16
+fchown05_16
+getegid01_16
+getegid02_16
+geteuid01_16
+geteuid02_16
+getgid01_16
+getgid03_16
+getgroups01_16
+getgroups03_16
+getresgid01_16
+getresgid02_16
+getresgid03_16
+getresuid01_16
+getresuid02_16
+getresuid03_16
+getuid01_16
+getuid03_16
+lchown01_16
+lchown02_16
+lchown03_16
+setfsgid01_16
+setfsgid02_16
+setfsgid03_16
+setfsuid01_16
+setfsuid02_16
+setfsuid03_16
+setfsuid04_16
+setgid01_16
+setgid02_16
+setgid03_16
+setgroups01_16
+setgroups02_16
+setgroups03_16
+setgroups04_16
+setregid01_16
+setregid02_16
+setregid03_16
+setregid04_16
+setresgid01_16
+setresgid02_16
+setresgid03_16
+setresgid04_16
+setresuid01_16
+setresuid02_16
+setresuid03_16
+setresuid04_16
+setresuid05_16
+setreuid01_16
+setreuid02_16
+setreuid03_16
+setreuid04_16
+setreuid05_16
+setreuid06_16
+setreuid07_16
+setuid01_16
+setuid03_16
+setuid04_16
+
+# We do not build *_64 tests, skip them.
+posix_fadvise01_64
+posix_fadvise02_64
+posix_fadvise03_64
+posix_fadvise04_64
+fcntl01_64
+fcntl02_64
+fcntl03_64
+fcntl04_64
+fcntl05_64
+fcntl06_64
+fcntl07_64
+fcntl08_64
+fcntl09_64
+fcntl10_64
+fcntl11_64
+fcntl12_64
+fcntl13_64
+fcntl14_64
+fcntl15_64
+fcntl16_64
+fcntl17_64
+fcntl18_64
+fcntl19_64
+fcntl20_64
+fcntl21_64
+fcntl22_64
+fcntl23_64
+fcntl24_64
+fcntl25_64
+fcntl26_64
+fcntl27_64
+fcntl28_64
+fcntl29_64
+fcntl30_64
+fcntl31_64
+fcntl32_64
+fcntl33_64
+fcntl34_64
+fcntl35_64
+fcntl36_64
+fcntl37_64
+fcntl38_64
+fcntl39_64
+fstat02_64
+fstat03_64
+fstatfs01_64
+fstatfs02_64
+ftruncate01_64
+ftruncate03_64
+ftruncate04_64
+lstat01_64
+lstat01A_64
+lstat02_64
+pread01_64
+pread02_64
+preadv01_64
+preadv02_64
+preadv03_64
+preadv201_64
+preadv202_64
+preadv203_64
+pselect01_64
+pselect02_64
+pselect03_64
+pwrite01_64
+pwrite02_64
+pwrite03_64
+pwrite04_64
+pwritev01_64
+pwritev02_64
+pwritev03_64
+pwritev201_64
+pwritev202_64
+sendfile02_64
+sendfile03_64
+sendfile04_64
+sendfile05_64
+sendfile06_64
+sendfile07_64
+sendfile08_64
+sendfile09_64
+stat01_64
+stat02_64
+stat03_64
+stat04_64
+statfs01_64
+statfs02_64
+statfs03_64
+truncate02_64
+truncate03_64
--
2.34.1
In setup3, the following line can lead to an undefined behavior:
ifr = *(struct ifreq *)ifc.ifc_buf;
Indeed, at this point it can be assumed that ifc.ifc_buf is suitably
aligned for struct ifreq.
However, ifc.ifc_buf is assigned to buf which has no alignment
constraints. This means there exists cases where buf is not suitably
aligned to load a struct ifreq, which can generate a SIGBUS.
This is exacerbated in purecap because of the increased alignment
constraint of struct ifreq.
Force the alignment of buf to that of struct ifreq.
Signed-off-by: Teo Couprie Diaz <teo.coupriediaz(a)arm.com>
---
The line mentionning purecap will be dropped when upstreaming.
v2:
- Use struct ifreq directly for alignment
- Reformulate comments and commit message as the undefined behavior is
not spectific to purecap
- Change the attribute definition to be closer to more similar to
the rest of the codebase. Should be better for upstream.
testcases/kernel/syscalls/sockioctl/sockioctl01.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/sockioctl/sockioctl01.c b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
index 486236af9d6b..e63aa1921877 100644
--- a/testcases/kernel/syscalls/sockioctl/sockioctl01.c
+++ b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
@@ -52,7 +52,13 @@ static struct ifreq ifr;
static int sinlen;
static int optval;
-static char buf[8192];
+/*
+ * buf has no alignment constraints by default. However, it is used to load
+ * a struct ifreq in setup3, which requires it to have an appropriate alignment
+ * to prevent a possible undefined behavior.
+ */
+static char buf[8192]
+ __attribute__((aligned(__alignof__(struct ifreq))));
static void setup(void);
static void setup0(void);
--
2.34.1
Update the Makefiles for _16 and _64 tests in order to add them
automatically to the Morello skip file if they aren't built.
This commit "works" but very crudely and has some undesired
behaviors:
- Tests will be appended each time the build target is ran
- The skip files are modified directly in the source tree
---
include/mk/env_post.mk | 2 +-
testcases/kernel/syscalls/utils/compat_16.mk | 8 ++++++++
testcases/kernel/syscalls/utils/newer_64.mk | 9 +++++++++
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
index a00f31b08478..86c3a12f6983 100644
--- a/include/mk/env_post.mk
+++ b/include/mk/env_post.mk
@@ -83,7 +83,7 @@ INSTALL_MODE ?= 00775
$(abspath $(addprefix $(DESTDIR)/$(INSTALL_DIR)/,$(sort $(dir $(INSTALL_TARGETS) $(MAKE_TARGETS))))):
mkdir -p "$@"
$(foreach install_target,$(INSTALL_TARGETS),$(eval $(call generate_install_rule,$(install_target),$(abs_srcdir),$(INSTALL_DIR))))
-$(foreach make_target,$(MAKE_TARGETS),$(eval $(call generate_install_rule,$(make_target),$(abs_builddir),$(INSTALL_DIR))))
+$(foreach make_target,$(filter-out %.skip,$(MAKE_TARGETS)),$(eval $(call generate_install_rule,$(make_target),$(abs_builddir),$(INSTALL_DIR))))
else # else ! $(filter-out install,$(MAKECMDGOALS)),$(MAKECMDGOALS)
$(error You must define $$(prefix) before executing install)
diff --git a/testcases/kernel/syscalls/utils/compat_16.mk b/testcases/kernel/syscalls/utils/compat_16.mk
index 71fcc4b89ca3..2eb2367e0c28 100644
--- a/testcases/kernel/syscalls/utils/compat_16.mk
+++ b/testcases/kernel/syscalls/utils/compat_16.mk
@@ -56,6 +56,8 @@ MAKE_TARGETS := $(notdir $(patsubst %.c,%,$(SRCS)))
MAKE_TARGETS_OBJS_WO_COMPAT_16 := $(addsuffix .o,$(MAKE_TARGETS))
ifneq ($(TST_COMPAT_16_SYSCALL),no)
MAKE_TARGETS += $(addsuffix _16,$(MAKE_TARGETS))
+else
+MAKE_TARGETS += $(addsuffix _16.skip,$(MAKE_TARGETS))
endif
# XXX (garrcoop): This code should be put in question as it cannot be applied
@@ -78,3 +80,9 @@ endif
%_16.o: %.c $(COMPAT_16_H)
$(COMPILE.c) $(OUTPUT_OPTION) $<
+
+%_16.skip:
+ echo Skipping $(patsubst %.skip,%,$@)
+ # FIXME: How to only append once ?
+ # FIXME: How not to override the list in the source tree ?
+ echo $(patsubst %.skip,%,$@) >> $(top_srcdir)/runtest/syscalls_morello_skip
diff --git a/testcases/kernel/syscalls/utils/newer_64.mk b/testcases/kernel/syscalls/utils/newer_64.mk
index 5e798057a18e..cd1d453a99c7 100644
--- a/testcases/kernel/syscalls/utils/newer_64.mk
+++ b/testcases/kernel/syscalls/utils/newer_64.mk
@@ -31,6 +31,8 @@ MAKE_TARGETS := $(notdir $(patsubst %.c,%,$(SRCS)))
ifneq ($(TST_NEWER_64_SYSCALL),no)
MAKE_TARGETS += $(addsuffix _64,$(MAKE_TARGETS))
+else
+MAKE_TARGETS += $(addsuffix _64.skip,$(MAKE_TARGETS))
endif
# XXX (garrcoop): This code should be put in question as it cannot be applied
@@ -53,3 +55,10 @@ endif
%_64.o: %.c
$(COMPILE.c) $(OUTPUT_OPTION) $<
+
+%_64.skip:
+ echo Skipping $(patsubst %.skip,%,$@)
+ # FIXME: How to only append once ?
+ # FIXME: How not to override the list in the source tree ?
+ echo $(patsubst %.skip,%,$@) >> $(top_srcdir)/runtest/syscalls_morello_skip
+
--
2.34.1
Add two skip files for running the syscalls set of tests in compat.
One skips the tests failing because of Musl, the second the tests that
we skip or don't build at all.
Update the README to reflect those additions and explain how to use
the skip files.
This is preparation for CI testing in Morello release 1.6 and later.
Signed-off-by: Teo Couprie Diaz <teo.coupriediaz(a)arm.com>
---
v3:
- Added *_16 tests to the skip list
- Added tests from kernel/security as we don't build them yet
- Mentioned Morello 1.6 release
v2:
- Removed mentions of COMPAT
- Reworded comment around Alpine
- Added bpf_prog02 to the musl skips after further testing
README.rst | 25 ++++
runtest/syscalls_aarch64_pcuabi.skip | 172 +++++++++++++++++++++++++++
runtest/syscalls_musl.skip | 18 +++
3 files changed, 215 insertions(+)
create mode 100644 runtest/syscalls_aarch64_pcuabi.skip
create mode 100644 runtest/syscalls_musl.skip
diff --git a/README.rst b/README.rst
index 8b6e3a7769d0..ef1282f2b93f 100644
--- a/README.rst
+++ b/README.rst
@@ -136,6 +136,31 @@ Running tests:
runltp -f morello_transitional,morello_transitional_extended
+Skipping tests:
+---------------
+
+In certain cases, you might want to skip tests that are known to be failing or are yet to be supported.
+
+This is done by passing a file containing the names of the tests to be skip with the option ``-S`` to
+``runltp``.
+
+We currently provide the following skip files under ``runtest/``:
+ - ``syscalls_musl.skip``: Skips all tests failing on a regular Aarch64 Musl based system.
+ - ``syscalls_aarch64_pcuabi.skip``: Skips all tests not considered while testing plain Aarch64
+ with a PCuABI kernel.
+
+``runltp`` does not support passing multiple skip files, however this can be circumvented by using
+process substitution.
+
+For example, in plain Aarch64 on a Musl system with a PCuABI kernel to test all syscalls but skip all
+failures unrelated to the PCuABI kernel, one could run the following command:
+
+.. code-block::
+
+ ./runltp -f syscalls -S <( cat runtest/syscalls_{aarch64_pcuabi,musl}.skip )
+
+Using those two skip lists should result in a PASS on Morello release 1.6 and after, as multiple patches
+to Musl and the Linux kernel are needed on top of the 1.5 release.
Developers playground
---------------------
diff --git a/runtest/syscalls_aarch64_pcuabi.skip b/runtest/syscalls_aarch64_pcuabi.skip
new file mode 100644
index 000000000000..2097341de32b
--- /dev/null
+++ b/runtest/syscalls_aarch64_pcuabi.skip
@@ -0,0 +1,172 @@
+# This skip file contains all the tests skipped from the syscalls command file
+# for testing the PCuABI kernel in plain Aarch64.
+# LINUX - Depends on kernel release > morello-release-1.5.0
+
+# leapsec01 is skipped as systemd-timesyncd interfers with it and it doesn't
+# test any worthwhile functionality.
+leapsec01
+
+# We do not build tests under kernel/security yet, skip them for now.
+prot_hsymlinks
+dirtyc0w
+dirtypipe
+
+# We do not build *_16 tests, skip them.
+chown01_16
+chown02_16
+chown03_16
+chown04_16
+chown05_16
+fchown01_16
+fchown02_16
+fchown03_16
+fchown04_16
+fchown05_16
+getegid01_16
+getegid02_16
+geteuid01_16
+geteuid02_16
+getgid01_16
+getgid03_16
+getgroups01_16
+getgroups03_16
+getresgid01_16
+getresgid02_16
+getresgid03_16
+getresuid01_16
+getresuid02_16
+getresuid03_16
+getuid01_16
+getuid03_16
+lchown01_16
+lchown02_16
+lchown03_16
+setfsgid01_16
+setfsgid02_16
+setfsgid03_16
+setfsuid01_16
+setfsuid02_16
+setfsuid03_16
+setfsuid04_16
+setgid01_16
+setgid02_16
+setgid03_16
+setgroups01_16
+setgroups02_16
+setgroups03_16
+setgroups04_16
+setregid01_16
+setregid02_16
+setregid03_16
+setregid04_16
+setresgid01_16
+setresgid02_16
+setresgid03_16
+setresgid04_16
+setresuid01_16
+setresuid02_16
+setresuid03_16
+setresuid04_16
+setresuid05_16
+setreuid01_16
+setreuid02_16
+setreuid03_16
+setreuid04_16
+setreuid05_16
+setreuid06_16
+setreuid07_16
+setuid01_16
+setuid03_16
+setuid04_16
+
+# We do not build *_64 tests, skip them.
+posix_fadvise01_64
+posix_fadvise02_64
+posix_fadvise03_64
+posix_fadvise04_64
+fcntl01_64
+fcntl02_64
+fcntl03_64
+fcntl04_64
+fcntl05_64
+fcntl06_64
+fcntl07_64
+fcntl08_64
+fcntl09_64
+fcntl10_64
+fcntl11_64
+fcntl12_64
+fcntl13_64
+fcntl14_64
+fcntl15_64
+fcntl16_64
+fcntl17_64
+fcntl18_64
+fcntl19_64
+fcntl20_64
+fcntl21_64
+fcntl22_64
+fcntl23_64
+fcntl24_64
+fcntl25_64
+fcntl26_64
+fcntl27_64
+fcntl28_64
+fcntl29_64
+fcntl30_64
+fcntl31_64
+fcntl32_64
+fcntl33_64
+fcntl34_64
+fcntl35_64
+fcntl36_64
+fcntl37_64
+fcntl38_64
+fcntl39_64
+fstat02_64
+fstat03_64
+fstatfs01_64
+fstatfs02_64
+ftruncate01_64
+ftruncate03_64
+ftruncate04_64
+lstat01_64
+lstat01A_64
+lstat02_64
+pread01_64
+pread02_64
+preadv01_64
+preadv02_64
+preadv03_64
+preadv201_64
+preadv202_64
+preadv203_64
+pselect01_64
+pselect02_64
+pselect03_64
+pwrite01_64
+pwrite02_64
+pwrite03_64
+pwrite04_64
+pwritev01_64
+pwritev02_64
+pwritev03_64
+pwritev201_64
+pwritev202_64
+sendfile02_64
+sendfile03_64
+sendfile04_64
+sendfile05_64
+sendfile06_64
+sendfile07_64
+sendfile08_64
+sendfile09_64
+stat01_64
+stat02_64
+stat03_64
+stat04_64
+statfs01_64
+statfs02_64
+statfs03_64
+truncate02_64
+truncate03_64
diff --git a/runtest/syscalls_musl.skip b/runtest/syscalls_musl.skip
new file mode 100644
index 000000000000..aa3dff6c9449
--- /dev/null
+++ b/runtest/syscalls_musl.skip
@@ -0,0 +1,18 @@
+# All the following tests from the syscalls test list are failing in Aarch64
+# Musl-based systems (Alpine, Debian...). Thus they depend on Musl or LTP,
+# rather than the kernel, to be fixed.
+# MUSL - Depends on Musl release > morello-release-1.5.0
+bpf_prog02
+gethostbyname_r01
+mq_open01
+nftw01
+nftw6401
+open13
+perf_event_open02
+recvmmsg01
+sbrk01
+sendmsg01
+setgroups03
+sigrelse01
+sigtimedwait01
+sigwaitinfo01
--
2.25.1
In setup3, the following line introduces an undefined behavior in purecap:
ifr = *(struct ifreq *)ifc.ifc_buf;
Indeed, at this point it can be assumed that ifc.ifc_buf is suitably
aligned for struct ifreq, which is 16 in purecap as it stores a
capability.
However, ifc.ifc_buf is assigned to buf which has no alignment
constraints. This means there exists cases where buf is not suitably
aligned to load a struct ifreq, which will produce a segmentation fault.
Force the alignment of buf to 16 bytes in purecap.
Signed-off-by: Teo Couprie Diaz <teo.coupriediaz(a)arm.com>
---
testcases/kernel/syscalls/sockioctl/sockioctl01.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/sockioctl/sockioctl01.c b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
index 486236af9d6b..22e96b42ca0c 100644
--- a/testcases/kernel/syscalls/sockioctl/sockioctl01.c
+++ b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
@@ -42,6 +42,18 @@
#include "test.h"
#include "safe_macros.h"
+/*
+ * Aligning to 16 bytes is required in purecap as the test loads a struct ifreq
+ * from buf, which is 16 bytes aligned and might be loaded via capability
+ * registers. Unsuitable alignment would be an undefined behavior and could lead
+ * to a segmentation fault.
+ */
+#ifdef __CHERI_PURE_CAPABILITY__
+#define BUF_ALIGN __attribute__((aligned(16)))
+#else
+#define BUF_ALIGN
+#endif
+
char *TCID = "sockioctl01";
int testno;
@@ -52,7 +64,7 @@ static struct ifreq ifr;
static int sinlen;
static int optval;
-static char buf[8192];
+static BUF_ALIGN char buf[8192];
static void setup(void);
static void setup0(void);
--
2.25.1
Add two skip files for running the syscalls set of tests in compat.
One skips the tests failing because of Musl, the second the tests that
we skip or don't build at all.
Update the README to reflect those additions and explain how to use
the skip files.
Signed-off-by: Teo Couprie Diaz <teo.coupriediaz(a)arm.com>
---
v2:
- Removed mentions of COMPAT
- Reworded comment around Alpine
- Added bpf_prog02 to the musl skips after further testing
README.rst | 22 +++++++
runtest/syscalls_aarch64_pcuabi.skip | 96 ++++++++++++++++++++++++++++
runtest/syscalls_musl.skip | 17 +++++
3 files changed, 135 insertions(+)
create mode 100644 runtest/syscalls_aarch64_pcuabi.skip
create mode 100644 runtest/syscalls_musl.skip
diff --git a/README.rst b/README.rst
index 8b6e3a776..0c1646f46 100644
--- a/README.rst
+++ b/README.rst
@@ -136,6 +136,28 @@ Running tests:
runltp -f morello_transitional,morello_transitional_extended
+Skipping tests:
+---------------
+
+In certain cases, you might want to skip tests that are known to be failing or are yet to be supported.
+
+This is done by passing a file containing the names of the tests to be skip with the option ``-S`` to
+``runltp``.
+
+We currently provide the following skip files under ``runtest/``:
+ - ``syscalls_musl.skip``: Skips all tests failing on a regular Aarch64 Musl based system.
+ - ``syscalls_aarch64_pcuabi.skip``: Skips all tests not considered while testing plain Aarch64
+ with a PCuABI kernel.
+
+``runltp`` does not support passing multiple skip files, however this can be circumvented by using
+process substitution.
+
+For example, in plain Aarch64 on a Musl system with a PCuABI kernel to test all syscalls but skip all
+failures unrelated to the PCuABI kernel, one could run the following command:
+
+.. code-block::
+
+ ./runltp -f syscalls -S <( cat runtest/syscalls_{aarch64_pcuabi,musl}.skip )
Developers playground
---------------------
diff --git a/runtest/syscalls_aarch64_pcuabi.skip b/runtest/syscalls_aarch64_pcuabi.skip
new file mode 100644
index 000000000..be9712906
--- /dev/null
+++ b/runtest/syscalls_aarch64_pcuabi.skip
@@ -0,0 +1,96 @@
+# This skip file contains all the tests skipped from the syscalls command file
+# for testing the PCuABI kernel in plain Aarch64.
+
+# leapsec01 is skipped as systemd-timesyncd interfers with it and it doesn't
+# test any worthwhile functionality.
+leapsec01
+
+# We do not build most *_64 tests, skip them.
+posix_fadvise01_64
+posix_fadvise02_64
+posix_fadvise03_64
+posix_fadvise04_64
+fcntl01_64
+fcntl02_64
+fcntl03_64
+fcntl04_64
+fcntl05_64
+fcntl06_64
+fcntl07_64
+fcntl08_64
+fcntl09_64
+fcntl10_64
+fcntl11_64
+fcntl12_64
+fcntl13_64
+fcntl14_64
+fcntl15_64
+fcntl16_64
+fcntl17_64
+fcntl18_64
+fcntl19_64
+fcntl20_64
+fcntl21_64
+fcntl22_64
+fcntl23_64
+fcntl24_64
+fcntl25_64
+fcntl26_64
+fcntl27_64
+fcntl28_64
+fcntl29_64
+fcntl30_64
+fcntl31_64
+fcntl32_64
+fcntl33_64
+fcntl34_64
+fcntl35_64
+fcntl36_64
+fcntl37_64
+fcntl38_64
+fcntl39_64
+fstat02_64
+fstat03_64
+fstatfs01_64
+fstatfs02_64
+ftruncate01_64
+ftruncate03_64
+ftruncate04_64
+lstat01A_64
+lstat02_64
+pread01_64
+pread02_64
+preadv01_64
+preadv02_64
+preadv03_64
+preadv201_64
+preadv202_64
+preadv203_64
+pselect01_64
+pselect02_64
+pselect03_64
+pwrite01_64
+pwrite02_64
+pwrite03_64
+pwrite04_64
+pwritev01_64
+pwritev02_64
+pwritev03_64
+pwritev201_64
+pwritev202_64
+sendfile02_64
+sendfile03_64
+sendfile04_64
+sendfile05_64
+sendfile06_64
+sendfile07_64
+sendfile08_64
+sendfile09_64
+stat01_64
+stat02_64
+stat03_64
+statfs01_64
+statfs02_64
+statfs03_64
+truncate02_64
+truncate03_64
diff --git a/runtest/syscalls_musl.skip b/runtest/syscalls_musl.skip
new file mode 100644
index 000000000..016d2728c
--- /dev/null
+++ b/runtest/syscalls_musl.skip
@@ -0,0 +1,17 @@
+# All the following tests from the syscalls test list are failing in Aarch64
+# Musl-based systems (Alpine, Debian...). Thus they depend on Musl or LTP,
+# rather than the kernel, to be fixed.
+bpf_prog02
+gethostbyname_r01
+mq_open01
+nftw01
+nftw6401
+open13
+perf_event_open02
+recvmmsg01
+sbrk01
+sendmsg01
+setgroups03
+sigrelse01
+sigtimedwait01
+sigwaitinfo01
--
2.25.1