Skip to content

ground-rules: Add LTP build system rule#7

Open
metan-ucw wants to merge 2 commits intolinux-test-project:masterfrom
metan-ucw:master
Open

ground-rules: Add LTP build system rule#7
metan-ucw wants to merge 2 commits intolinux-test-project:masterfrom
metan-ucw:master

Conversation

@metan-ucw
Copy link
Copy Markdown
Member

Tests must use LTP build system.

Comment thread agents/ground-rules.md Outdated
Comment thread agents/ground-rules.md Outdated
Comment thread agents/ground-rules.md Outdated
This was missing from the file.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Comment thread AGENTS.md
`env_pre.mk` + `generic_trunk_target.mk` instead and recurse into
subdirectories automatically.

**Open POSIX testsuite** (`testcases/open_posix_testsuite/`) has its own
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This requires a different section specific to Open posix testing suite.

Comment thread AGENTS.md
### Building a Single Test

```sh
make -C testcases/kernel/syscalls/epoll_wait epoll_wait01
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unfortunately this is error prone. If LLM tries to compile the test, it will mess up everything if model is not smart enough, because the example is specific to epoll_wait testing suite. I would just remove this part, or use the syntax we have in ltp-review-smoke skill.

Comment thread AGENTS.md
```

This runs `scripts/checkpatch.pl` (coding style) and `tools/sparse/sparse-ltp`
(static analysis) on the source files.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also this section is already described in the ltp-review-smoke skill.

Comment thread AGENTS.md
Per-target flags can be added as:

```make
epoll_wait02: LDLIBS += -lrt
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

And also this is error prone.

Comment thread AGENTS.md
make install # install to /opt/ltp (default)
```

### Test Makefiles
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is already explained in the c-tests.md, so we are duplicating information.

Comment thread AGENTS.md
accept02: CFLAGS += -pthread
```

## Additional Resources
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Uff....I'm a bit puzzled, because we are giving info to the LLM to watch into the build_system.rst file contained in the LTP doc/ folder. But documentation in LTP is not generic enough to give a "dumb" LLM instructions for compiling tests or verifying the build system correctness.

I'm starting to think we should probably take the LTP build system documentation and update it so we can read it properly with an LLM, avoiding specific implementations. Then, the AGENTS.md will just point to it as it is now and we should achieve this task.

To make the LTP documentation as generic as possible, we should probably take ltp-review-smoke as example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants