From Fedora Project Wiki


Personal Details


  • Name: Abhishek Kumar Singh
  • Freenode IRC Nick: kanha
  • Mobile No: +91 8893839740
  • Time Zone: IST(GMT + 5:30)
  • Blog URL: abhisheksingh01.wordpress.com
  • Email Address: abhishekkumarsingh.cse@gmail.com

Implement a battery of unit tests for SSSD

Introduction

An idea of implementing a battery of unit tests for SSSD(System Service Security Daemon) using cmocka unit test framework is proposed after having a good discussion with jhrozek(Jakub Hrozek, #sssd). Actually, it is not just writing better automated test codes but a total refinement of SSSD unit-tests including cmocka unit testing framework in such a way that it will reduce complexity of code make it efficient and provide a good mocking framework for better testing. Following are the details of the project and the proposed plan of action.

Abstract

Implementing unit tests for SSSD modules using cmocka unit testing framework with proper refactoring, minimum boilerplates and better test coverage. Doing sanity checking, resulting in efficient test codes.

Benefits to Fedora community

  • Contributing the set of unit tests to the SSSD would greatly improve its stability long-term and would help raise confidence when pushing new SSSD versions into Fedora or other distributions.
  • Making SSSD tests less complicated and mocking based Unittesting framework would certainly result into an improved testing mechanism and error handling in SSSD.
  • Improvement in the test coverage will result in improvement of code quality of mozbase.
  • A detailed documentation on the work to help the contributers for further improvements on the work.
  • Writing unit-test will help in deep extensibilty to the behaviour of SSSD code and eventually results in solving many of the issuses related to SSSD-testing on bug tracker

Project Details

The aim of the project is not just quality assurance of SSSD but to provide a proper implementation of a Unit testing framework rather than just a POC(proof of concept). It has far greater goals. SSSD is so important that all of XYZ use SSSD to some degree, including Talos, mochitest, reftest, Autophone, and Eideticker. But the Current version of SSSD lacks proper unit testing framework for exercising the code which are only reachable when SSSD is connected to the network. This project deals more about writing new efficient cmocka based tests and complete refinement of old written SSSD tests using cmocka framework. The idea here is to dig deeper into testing to provide and maintain long-term robustness and quality of SSSD. It is also important that the new cmocka based tests should be less complex and more efficient. It should have more automated behaviour and minimum or no boilerplates. It should also follow proper coding styles followed by SSSD.

One other feature of the framework should be that it should be sustainable and support further improvements. It means that if the tests need to be implemented further because of addition or enhancement of new feature(s) or tests need to be modified after a year or something, only slight change in the fixers should be enough and an automated process would be taking care of implementation of respective fixers to the tests. Since, it would be quite troublesome to implement all the tests again and again with each new modification or new release of SSSD dependencies, this feature is quite necessary from development perspective.

Tools Required During Development

  • Cmocka library
  • Coverage tool : lcov
  • Vim (IDE)


The outline of my work plans

Modules of the SSSD which will be tested are :

  • util

These modules further consists of different submodules that will be unit tested.

Proposal Description

Please describe your proposal in detail. Include:

* An overview of your proposal
* The need you believe it fulfills
* Any relevant experience you have
* How do you intend to implement your proposal
* Final deliverable of the proposal at the end of the period
* A rough timeline for your progress
* Any other details you feel we should consider


Have you communicated with a potential mentor? If so, who?