Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for crashes from unusually-shaped tasks #3759

Open
djmitche opened this issue Jan 18, 2025 · 1 comment
Open

Test for crashes from unusually-shaped tasks #3759

djmitche opened this issue Jan 18, 2025 · 1 comment
Assignees

Comments

@djmitche
Copy link
Collaborator

TaskChampion allows any string:string map in a task. Taskwarrior should do something sensible with any such input.

Let's add some tests for this, probably fixing some of the worst related bugs first.

@djmitche
Copy link
Collaborator Author

The main place we see issues is in reports or commands like info, so I think the tests will need to run such commands.

I got a start at this in a .cpp test method, but it seems rather difficult to get everything set up to run commands without actually handing over control of the process to Context -- Context::initialize appears to be required, but also makes a lot of global assumptions, trying to load .taskrc and so on.

I then got a start at a Python test, but I would need some way to create arbitrary TaskChampion tasks -- Taskwarrior is pretty effective at not making tasks it cannot understand. I thought of making a small make_tc_task binary that could be run from Python and would basically call create_task and task_data.set based on the command-line arguments. However, there's no way to create a binary during a run of make test, so this requires a bit of a hack to get it built.

@djmitche djmitche moved this from Ready to In progress in Taskwarrior Development Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

1 participant