]> git.feebdaed.xyz Git - 0xmirror/crun.git/commit
tests: add terminal tests for coverage
authorGiuseppe Scrivano <gscrivan@redhat.com>
Wed, 17 Dec 2025 22:19:34 +0000 (22:19 +0000)
committerGiuseppe Scrivano <gscrivan@redhat.com>
Mon, 22 Dec 2025 07:10:55 +0000 (08:10 +0100)
commit1404ccaa839a666dbab1fc40a3aa073400ec7049
treed93fe15c545daaf4602562e2c43a7c003df6ee8d
parent5ce5ad6dbe4192a2c72753bd91fbc4a92627f04d
tests: add terminal tests for coverage

Add tests for src/libcrun/terminal.c:

C unit tests (tests_libcrun_terminal.c) using isolated pty:
- test_cleanup_terminalp_null: NULL cleanup should not crash
- test_terminal_setup_size_invalid_fd: Invalid fd error handling
- test_terminal_setup_size_pty: Set size on isolated pty
- test_set_raw_invalid_fd: Invalid fd error handling
- test_set_raw_pty: Set raw mode on isolated pty
- test_set_raw_no_status: Set raw without saving status
- test_new_terminal: Verify pty creation

Add test_terminal.py to test terminal allocation code in
src/libcrun/terminal.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Makefile.am
tests/test_terminal.py [new file with mode: 0755]
tests/tests_libcrun_terminal.c [new file with mode: 0644]