From Fedora Project Wiki
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__


* Name: Abhishek Kumar Singh
* FAS Account: Abhisheksingh
* Fedora userpage:[https://fedoraproject.org/wiki/User:Abhisheksingh https://fedoraproject.org/wiki/User:Abhisheksingh]


<h3> Personal Details </h3>
<h3> Contact Details </h3>


----
----


<ul>
<ul>
<li> Name: Abhishek Kumar Singh</li>
<li> Freenode IRC Nick: kanha</li>
<li> Freenode IRC Nick: kanha</li>
<li> Mobile No: +91 8893839740</li>
<li> Mobile No: +91 8893839740</li>
<li> Time Zone: IST(GMT + 5:30)</li>
<li> Time Zone: IST(GMT + 5:30)</li>
<li> Blog URL: abhisheksingh01.wordpress.com </li>
<li> Blog URL: [http://abhisheksingh01.wordpress.com http://abhisheksingh01.wordpress.com]</li>
<li> Email Address: abhishekkumarsingh.cse@gmail.com</li>
<li> Email Address: abhishekkumarsingh.cse@gmail.com</li>
</ul>
</ul>


----
----
'''NOTE''': We require all students to blog about the progress of their project.
You are strongly encouraged to register on the Freenode network and participate
in our IRC channels. For more information and other instructions contact Org Admins.
''please answer following questions''


===Why do you want to work with the Fedora Project?===
===Why do you want to work with the Fedora Project?===


I am passionate about OSS(Open Source Software). During the initial phase of my contribution to SSSD I got a chance to play with Fedora 18 and I was impressed by it to such an extent that I am a Fedora user now. Fedora is really cool and an awesome OS with everything being so lucid and the last but not the least an impressive GUI. It will be give me immense pleasure contributing to the product which I admire most.
I am passionate about Open Source Software. During the initial phase of my contribution to [https://fedorahosted.org/sssd/ SSSD] I got a chance to play with Fedora 18 and I was impressed by it to such an extent that I am a Fedora user now. Fedora is really cool and an awesome OS with everything being so lucid, attractive and the last but not the least an impressive GUI. It will be a pleasure contributing to a project like Fedora.  


===Do you have any past involvement with the Fedora project or any other open source project as a contributor?===
===Do you have any past involvement with the Fedora project or any other open source project as a contributor?===
I have contributed to other open source projects as well https://fedoraproject.org/wiki/User:Abhisheksingh/contributions .


===Did you participate with the past GSoC programs, if so which years, which organizations?===
===Did you participate with the past GSoC programs, if so which years, which organizations?===
Line 29: Line 39:
===Will you continue contributing/ supporting the Fedora project after the GSoC 2013 program, if yes, which team(s), you are interested with?===
===Will you continue contributing/ supporting the Fedora project after the GSoC 2013 program, if yes, which team(s), you are interested with?===


Yes, I will continue my support,contributions to Fedora project even after Gsoc 2013. I am interested in SSSD team and QA team.
Yes, I will continue my support, contributions to Fedora project even after Gsoc 2013. I am interested in SSSD team and QA team. There are lots of opportunities for contribution with the release of SSSD 1.9.5 and the upcoming new features in SSSD 1.10.
 
===Why should we choose you over other applicants?===
===Why should we choose you over other applicants?===


I have sound skills of programming skills in c(used in my project), c++ and python. I have acquired good knowledge of cmocka framework and have done some initial contribution in support of my proposal. I am willing to contribute and support my project through out my lifetime, also I have interest in contributing to SSSD and QA community after GSoC 2013.    
I have sound programming skills in C, C++ and Python. I have acquired good knowledge of cmocka framework and have done some initial contribution in support of my proposal. I am willing to contribute and support my project after the GSoC program finishes, I also have keen interest in contributing to SSSD and the QA community after GSoC 2013.




Line 39: Line 49:


<h3> Introduction </h3>
<h3> Introduction </h3>
<p> 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. </p>
<p> An idea of implementing a battery of unit tests for [https://fedorahosted.org/sssd/ SSSD](System Service Security Daemon) using cmocka unit test framework is proposed after having a thorough discussion with the SSSD upstream maintainer jhrozek (Jakub Hrozek, #sssd). Actually, it is not just writing better automated test codes but a total refinement of SSSD unit-tests using the cmocka unit testing framework in such a way that it will reduce complexity of unit testing code and making it efficient and provide a good mocking framework for better testing for other developers. Following are the details of the project and the proposed plan of action. </p>


<h3> Abstract </h3>
<h3> Abstract </h3>
<p> 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.</p>
<p> Implementing unit tests for SSSD modules using cmocka unit testing framework with proper refactoring, minimum boilerplates and better test coverage. The tests would focus on both covering the new features but mostly on creating test for the core SSSD features, providing developers with better confidence when writing new code</p>


<h3> Benefits to Fedora community </h3>
<h3> Benefits to Fedora community </h3>
Line 48: Line 58:
<ul>
<ul>
<li> 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.</li>
<li> 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.</li>
<li> Making SSSD tests less complicated and mocking based Unittesting framework would certainly result into an improved testing mechanism and error handling in SSSD. </li>
<li> Making SSSD tests less complicated and mock-based unittesting framework would certainly result into an improved testing mechanism and error handling in SSSD. </li>
<li> Improvement in the test coverage will result in improvement of code quality of mozbase. </li>
<li> Improvement in the test coverage will result in improvement of code quality of the SSSD. </li>
<li> A detailed documentation on the work to help the contributers for further improvements on the work. </li>
<li> Writing unit-test will help in deeper confidence in the correct behaviour of SSSD code and eventually result in easier resolution of many of the issuses related to SSSD</li>
<li> 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</li>
</ul>
</ul>


<h3> Project Details </h3>
<h3> Project Details </h3>


<p> 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 Linux based operating systems uses it including Fedora and others. 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. </p>
<p> 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 proof-of-concept. It has far greater goals. SSSD is an important part of the authentication picture for Fedora and other Linux distributions. Unfortunately 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 tests based on the cmocka framweork and complete refinement of old written SSSD tests using the check 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 behavior and minimum or no boilerplate code. It should also the coding style set by SSSD coding guidelines. </p>


<p> 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. </p>
<p> The other important feature of the framework should be that it should
be sustainable long-term in order to support further SSSD improvements.  
In other words, the tests must be easy to modify when the core SSSD code changes to minimize the time needed to fix the unit tests after architectural changes are performed to the SSSD. This feature would allow the SSSD developers to be more confident of refactoring changes in the daemon itself. </p>


====Tools Required During Development====
====Tools Required During Development====


<ul>
<ul>
<li> Concepts of Talloc and Tevent</li>
<li> the Talloc and Tevent libraries</li>
<li> Cmocka library </li>
<li> Cmocka library </li>
<li> Coverage tool : lcov </li>
<li> Coverage tool : lcov </li>
Line 71: Line 82:


====The outline of my work plans====
====The outline of my work plans====
<p> Modules of the SSSD which will be tested are : </p>
 
The initial stage of my work deals with becoming familiar with SSSD and learning concepts of cmocka unit-testing framework as mentioned in [https://fedorahosted.org/sssd/wiki/DesignDocs/TestCoverage plan].
 
The general idea for the unit tests is to cover the two most important parts:
<ul>
<li> retrieving user information </li>  
<li> authenticating users. </li>
</ul>
 
The following diagram gives a pictorial representation of the core components of SSSD and how they interact.
[[File:Sssdsoc.png]]
 
 
Basically the whole project is divided into two phases, which mimick how the SSSD itself is structured:
<ul>
<ul>
<li> util </li>
<li> '''Phase I''' : building provider tests
<li> '''Phase II''': building responder tests
</ul>
</ul>
Because of the large size of the SSSD project, the unit testing framework would focus on the core SSSD features that are enabled in most, if not all, SSSD deployments.
In particular, the unit tests would cover only the NSS and PAM responders, while the back end (provider) tests would cover the LDAP users and group code.
<h3>Time-line for Milestones</h3>
The project is planned to be split across following weekly phases:
'''[Project Week 1]'''
Learning the tevent library and the asynchronous model
'''[Project Week 2]''' 


<p> These modules further consists of different submodules that will be unit tested.</p>
Learning the tevent library and the async model. Might include some experimenting and reading the code.


=== Proposal Description ===
'''[Project Week 3]'''


Please describe your proposal in detail.  Include:
Reading the current NSS responder test and augmenting the "get user by name/ID tests"


* An overview of your proposal
'''[Project Week 4]'''
* 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


Adding a similar test for retrieving groups as added for users in the previous step.
'''[Project Week 5]'''
Adding another test for the initgroups operation.
'''[Project Week 6]''' 
Studying the PAM responder code.
'''[Project Week 7]'''
Adding a unit test that would cover the PAM responder. Only login (PAM authentication phase) can be covered.
'''[Project Week 8]''' 
Learning the backend and provider internals. The current DNS update tests might be a good start.
'''[Project Week 9]'''
Creating unit tests for retrieving LDAP users. These tests would not be big by themselves, but would include code to be reused by other LDAP tests later
'''[Project Week 10]'''
Creating unit tests for storing LDAP groups without nesting (RFC2307)
'''[Project Week 11]'''
Creating unit tests for storing LDAP groups with nesting (RFC2307bis)
'''[Project Week 12]'''
An extra week to polish the work before submission
<h3>Deliverables</h3>
Better and improved test codes of SSSD with following features:
<ul>
<li> Tests covering NSS and PAM responders </li>
<li>Contribute to the overall
code quality by uncovering issues with the unit tests </li>
<li>Less complex test infrastructure </li>
<li>More efficient testing mechanism </li>
</ul>


=== Have you communicated with a potential mentor?  If so, who? ===
=== Have you communicated with a potential mentor?  If so, who? ===
Yes, I am in touch with Jakub Hrozek (jhrozek, #sssd) for quite long time.

Latest revision as of 05:32, 4 May 2013


Contact Details



NOTE: We require all students to blog about the progress of their project. You are strongly encouraged to register on the Freenode network and participate in our IRC channels. For more information and other instructions contact Org Admins.

please answer following questions

Why do you want to work with the Fedora Project?

I am passionate about Open Source Software. During the initial phase of my contribution to SSSD I got a chance to play with Fedora 18 and I was impressed by it to such an extent that I am a Fedora user now. Fedora is really cool and an awesome OS with everything being so lucid, attractive and the last but not the least an impressive GUI. It will be a pleasure contributing to a project like Fedora.

Do you have any past involvement with the Fedora project or any other open source project as a contributor?

I have contributed to other open source projects as well https://fedoraproject.org/wiki/User:Abhisheksingh/contributions .

Did you participate with the past GSoC programs, if so which years, which organizations?

No

Will you continue contributing/ supporting the Fedora project after the GSoC 2013 program, if yes, which team(s), you are interested with?

Yes, I will continue my support, contributions to Fedora project even after Gsoc 2013. I am interested in SSSD team and QA team. There are lots of opportunities for contribution with the release of SSSD 1.9.5 and the upcoming new features in SSSD 1.10.

Why should we choose you over other applicants?

I have sound programming skills in C, C++ and Python. I have acquired good knowledge of cmocka framework and have done some initial contribution in support of my proposal. I am willing to contribute and support my project after the GSoC program finishes, I also have keen interest in contributing to SSSD and the QA community after GSoC 2013.


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 thorough discussion with the SSSD upstream maintainer jhrozek (Jakub Hrozek, #sssd). Actually, it is not just writing better automated test codes but a total refinement of SSSD unit-tests using the cmocka unit testing framework in such a way that it will reduce complexity of unit testing code and making it efficient and provide a good mocking framework for better testing for other developers. 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. The tests would focus on both covering the new features but mostly on creating test for the core SSSD features, providing developers with better confidence when writing new code

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 mock-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 the SSSD.
  • Writing unit-test will help in deeper confidence in the correct behaviour of SSSD code and eventually result in easier resolution of many of the issuses related to SSSD

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 proof-of-concept. It has far greater goals. SSSD is an important part of the authentication picture for Fedora and other Linux distributions. Unfortunately 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 tests based on the cmocka framweork and complete refinement of old written SSSD tests using the check 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 behavior and minimum or no boilerplate code. It should also the coding style set by SSSD coding guidelines.

The other important feature of the framework should be that it should be sustainable long-term in order to support further SSSD improvements. In other words, the tests must be easy to modify when the core SSSD code changes to minimize the time needed to fix the unit tests after architectural changes are performed to the SSSD. This feature would allow the SSSD developers to be more confident of refactoring changes in the daemon itself.

Tools Required During Development

  • the Talloc and Tevent libraries
  • Cmocka library
  • Coverage tool : lcov
  • Vim (IDE)


The outline of my work plans

The initial stage of my work deals with becoming familiar with SSSD and learning concepts of cmocka unit-testing framework as mentioned in plan.

The general idea for the unit tests is to cover the two most important parts:

  • retrieving user information
  • authenticating users.

The following diagram gives a pictorial representation of the core components of SSSD and how they interact.


Basically the whole project is divided into two phases, which mimick how the SSSD itself is structured:

  • Phase I : building provider tests
  • Phase II: building responder tests

Because of the large size of the SSSD project, the unit testing framework would focus on the core SSSD features that are enabled in most, if not all, SSSD deployments. In particular, the unit tests would cover only the NSS and PAM responders, while the back end (provider) tests would cover the LDAP users and group code.

Time-line for Milestones

The project is planned to be split across following weekly phases:

[Project Week 1]

Learning the tevent library and the asynchronous model

[Project Week 2]

Learning the tevent library and the async model. Might include some experimenting and reading the code.

[Project Week 3]

Reading the current NSS responder test and augmenting the "get user by name/ID tests"

[Project Week 4]

Adding a similar test for retrieving groups as added for users in the previous step.

[Project Week 5]

Adding another test for the initgroups operation.

[Project Week 6]

Studying the PAM responder code.

[Project Week 7]

Adding a unit test that would cover the PAM responder. Only login (PAM authentication phase) can be covered.

[Project Week 8]

Learning the backend and provider internals. The current DNS update tests might be a good start.

[Project Week 9]

Creating unit tests for retrieving LDAP users. These tests would not be big by themselves, but would include code to be reused by other LDAP tests later

[Project Week 10]

Creating unit tests for storing LDAP groups without nesting (RFC2307)

[Project Week 11]

Creating unit tests for storing LDAP groups with nesting (RFC2307bis)

[Project Week 12]

An extra week to polish the work before submission

Deliverables

Better and improved test codes of SSSD with following features:

  • Tests covering NSS and PAM responders
  • Contribute to the overall code quality by uncovering issues with the unit tests
  • Less complex test infrastructure
  • More efficient testing mechanism

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

Yes, I am in touch with Jakub Hrozek (jhrozek, #sssd) for quite long time.