[LTP] [PATCH 2/2] metaparse: Map arrays with designated initializers to JSON objects
Andrea Cervesato
andrea.cervesato@suse.com
Fri Jul 11 11:28:55 CEST 2025
Hi!
This patch is actually causing documentation build failure due to the
way we are defining .hugepages as:
.hugepages = {TST_NO_HUGEPAGES},
The shmget02 metadata (for instance) will have an empty hugepages
dictionary:
"shmget02": {
"needs_tmpdir": "1",
"needs_root": "1",
"forks_child": "1",
"save_restore": [
[
"/proc/sys/kernel/shmmax",
"8192",
"TCONF_MISSING|TBROK_RO"
]
],
"doc": [
"Test for ENOENT, EEXIST, EINVAL, EACCES, EPERM errors.",
"",
"- ENOENT - No segment exists for the given key and IPC_CREAT was
not specified.",
"- EEXIST - the segment exists and IPC_CREAT | IPC_EXCL is given.",
"- EINVAL - A new segment was to be created and size is less than
SHMMIN or",
" greater than SHMMAX. Or a segment for the given key exists, but
size is",
" gran eater than the size of that segment.",
"- EACCES - The user does not have permission to access the shared
memory segment.",
"- EPERM - The SHM_HUGETLB flag was specified, but the caller was not",
" privileged (did not have the CAP_IPC_LOCK capability) and is not
a member",
" of the sysctl_hugetlb_shm_group group.",
"- ENOMEM - The SHM_HUGETLB flag was specified, the caller was
privileged but",
" not have enough hugepage memory space."
],
"hugepages": {
},
"fname": "testcases/kernel/syscalls/ipc/shmget/shmget02.c"
}
Which will cause the following error in the documentation build:
Traceback (most recent call last):
File
"/home/acer/Projects/ltp/doc/.venv/lib/python3.12/site-packages/sphinx/events.py",
line 98, in emit
results.append(listener.handler(self.app, *args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/acer/Projects/ltp/doc/conf.py", line 518, in
generate_test_catalog
text.extend(_generate_setup_table(conf))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/acer/Projects/ltp/doc/conf.py", line 407, in
_generate_setup_table
values.append(f'{value[0]}, {value[1]}')
~~~~~^^^
KeyError: 0
- Andrea
More information about the ltp
mailing list