LSE/OS TEST FRAMEWORK SPECIFICATIONS

Generic Requirements on the LSE/OS Test Framework

  • Test framework directory shall be lseos/test
  • Tests for services shall live in subdirectory of the test directory. E.g. tests for lseos/lseos-unix/libunix/stdio shall live in lseos/test/stdio_libunix_lseos-unix
  • All the functions don't need to be tested: only the function that have been specified for being tested
  • There shall be one C file for each function to test
  • For a given function, there shall be many tests, at least one test for each use case.
  • The test must be automatic: it means that it has to determine itself that it has failed.
  • The test framework links statically with all the modules
  • There shall be an option for the test framework to test a specific module or a specific function
  • There shall be an option for the test framework to decide to continue or not if test failures where encountered.
  • The test framework shall save a log file on all test results (passed and failed)

    Some tests requires to be done first, so this specification describes tests from highes priority to lowest:

    Find memory leak bug in lseos/lseos-unix/libunix/stdio
    General description: We took the lib from an old version of BSD. It is very simple but we are pretty sure there is a memory leak in the functions.
    Target: Find the memory leak(s) in this library using the best possible method, especially open files, do a lot of huge and small fwrite(), fread(), etc.
    Note: This test does not require to be in the test framework. The stdio regression maybe useful but not mandatory to achieve this test (there is a test specification for it).

    Regress lseos/lseos-unix/libunix/stdio
    General description: Incorporate stdio unit tests in test framework
    Target: The following functions have to be tested:
  • fgetc()
  • fgets()
  • fputc()
  • fputs()
  • fread()
  • fwrite()
  • ungetc()
  • Regress libarea
    General description:Regress the lseos/lseos-lib/libarea.
    Target:Automatize the lseos/lseos-lib/libarea/xarea/tests (that were manual tests for xarea), re-write them in C and integrate them in the test framework

    Regress sysinterf
    General description:Regress the lseos/lseos-lib/libc/sysinterf.
    Target:All the functions (that are mostly syscalls). For testing a syscall correctly, the test writer must understand fully the mechanism of the internal service
    Note: This is a very long task