Re: [GSoC 2024][v2 Proposal]Move existing tests to a unit testing framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Aishwarya Narayanan <aishnana.03@xxxxxxxxx> writes:
> Dear Git Organization,
> I'm writing to follow up on my Google Summer of Code proposal, "Move
> Existing Tests to a Unit Testing Framework."
> After careful consideration and based on our discussions, I've refined
> the project summary and deliverables to focus specifically on Move
> existing tests to a unit testing framework.This email aims to gather
> feedback and initiate a discussion on the
> feasibility and implementation of this idea.

It's always better to send updates as responses to your previous emails.
This allows for reviewers to contain context in a single thread.

> Related Works
>
> https://lore.kernel.org/git/CAHCXyj3U69qyhYewOLY9hN2rvi_5ZuSxQEBJbDxrKefm9MzVWg@xxxxxxxxxxxxxx/
> - Microproject Approach
>
> https://lore.kernel.org/git/ZgQffea0krKmZUEt@tanuki/ - [RFC PATCH]
>              Description: While printf might be unlikely to fail
> here,I felt the change aligns with the project's goal of ensuring Git
> command exit codes are captured. This approach is more robust and
> avoids potential issues in the future.
>                Status: Declined
>

It would be nice if you could also add a summary on the approach and
what went wrong and why.

> https://public-inbox.org/git/xmqqttkqwfwe.fsf@gitster.g/ - [RFC PATCH]
> Fix Git command exit code suppression in test script
> t2104-update-index-skip-worktree.sh
> Description: This patch increases the robustness of Git's testing
> framework by guaranteeing that Git commands' exit codes are
> appropriately examined during test execution. Previously, suppressed
> exit codes allowed tests to pass despite Git command failures. This
> fix stores the output of Git commands in variables and examines their
> exit codes to detect errors.The discussion focuses on improvements to
> the patch submission process, such as adhering to coding principles
> and referencing appropriate documentation for proper formatting and
> test script adjustments.
> Status: Declined
>

This patch actually was reviewed by Junio [1] and there was no follow up
from your side. I'm not sure how this was considered Declined, so it
would be nice to have some reasoning about it.

>
>  https://public-inbox.org/git/CAHCXyj1hUVNNuCOgsNv4GJUi79_o9iWZDvV8Ocz3DodreYoL7g@xxxxxxxxxxxxxx/
>   - GSoC 2024 [PATCH v2] Fix Git command exit code suppression in test
> script t2104-update-index-skip-worktree.sh
>                                  Description: This patch resolves an
> issue in Git test scripts in which the exit code of git ls-files -t
> may be disregarded, resulting in tests passing despite Git command
> failures. The new version guarantees that Git commands used in
> pipelines produce captured output and perform adequate exit code
> checks. It also enhances code style by adhering to established rules.
> This adds to more robust Git testing by ensuring the identification
> and reporting of Git command errors within test scripts.
> Status: Under Review

This seems to be the same patch as the previous. A new thread was
created here instead of replying to the previous thread.

> Porting Unit Tests:
>
> [1]https://lore.kernel.org/git/cover.1692297001.git.steadmon@xxxxxxxxxx/
>
> This patch series provides unit test functionality for the Git project.
> The series includes the following patches:
> A project plan document that outlines the goals for introducing unit
> tests, as well as a review of potential frameworks and the features
> used to assess them.
> An implementation of the TAP unit test framework with a sample unit
> test and Makefile integration.
> Changes were made to the Git build system so that the unit tests could
> be run in CI.
> The TAP framework was selected because of the following advantages:
> Simple to use and comprehend.
> Widely used and integrates seamlessly with existing Git tools.
>
> The project plan document mentions a number of outstanding TODOs,

Maybe I missed it, but where are the TODOs stated?

> Next Steps:
>
> A following commit will port the relevant code from
> t/helper/test-date.c to the new unit test file t/unit-tests/t-date.c,
> using the newly introduced functions for pre-requisite checks.
>
> [5]Unit Testing in Git:
>
> https://github.com/git/git/blob/master/Documentation/technical/unit-tests.txt
> discusses unit testing for the Git project. This gives an idea of the
> background and importance of unit testing in the project applying to.
>
>
>
> During GSoc
> The main goals of this project are:
> 1. Understand the existing "reftable" unit tests: Examine the present
> implementation of the "reftable" unit tests in
> 't0032-reftable-unittest.sh' to ensure that you understand their
> functionality and purpose.
> 2. Learn the new unit testing framework: Get a thorough grasp of Git's
> new unit testing framework, including setup, usage, and recommended
> practices.
> 3.Ensuring test coverage and reliability: Check that the converted
> tests have sufficient code coverage and accurately simulate the
> expected behaviour of the "reftable" capability. Test and validate the
> new tests thoroughly to ensure their reliability.
> 4. Documentation and code comments: Document the conversion process,
> including any issues encountered and the reasoning behind design
> decisions. Update the code comments and documentation to reflect the
> changes to the tests.
> Deliverables

Kaartic's review in the previous version mentions [2]:

    Your project summary and the deliverables below seem to mention that
    you're going to work on migration of the reftable unit tests but the
    project title seems to be "Move existing tests to a unit testing
    framework'.

It seems this version is the same...

> Closing Remarks
> Finally, I'd like to express my gratitude to the community and, in
> particular, my mentors, Patrick Steinhardt,Christian Couder,Kaartic
> Sivaraam,Karthik Nayak,Junio C Hamano. They did and continue to do an
> exceptional task of maintaining and empowering the Git open-source
> community, as well as offering much-needed and kind assistance to a
> new contributor like me.
> ---
> Sincerely,
> Aishwarya Narayanan
>

It would also be nice if you mentioned what exactly is different in this
version compared to the previous.

[1]: https://public-inbox.org/git/xmqqttkqwfwe.fsf@gitster.g/
[2]: https://lore.kernel.org/git/CA+ARAtpqD0um9bVrjRKG0DmrxVR-46uSKfDKnO+H1rUp0i+4Ww@xxxxxxxxxxxxxx/#t

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux