Bigtop
  1. Bigtop
  2. BIGTOP-524

Add tests to verify that our init scripts conform to the LSB specification

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.3.0, 0.4.0
    • Fix Version/s: None
    • Component/s: Tests
    • Labels:
      None

      Description

      I recently submitted BIGTOP-505 and BIGTOP-506, but we should proactively verify all our init scripts follow the LSB specification.
      This would avoid some issues where for instance third party tools get confused by the return code of some action.

      So we should add tests to ensure that init scripts follow http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

      Here are some cased to be checked (extract from the spec linked above):

      For all other init-script actions, the init script shall return an exit status of zero if the action was successful. Otherwise, the exit status shall be non-zero, as defined below. In addition to straightforward success, the following situations are also to be considered successful:
      
          restarting a service (instead of reloading it) with the force-reload argument
      
          running start on a service already running
      
          running stop on a service already stopped or not running
      
          running restart on a service already stopped or not running
      
          running try-restart on a service already stopped or not running
      

        Activity

        Hide
        Roman Shaposhnik added a comment -

        We do quite a bit of that here (more tests are welcome):
        https://github.com/apache/bigtop/blob/trunk/bigtop-tests/test-artifacts/package/src/main/groovy/org/apache/bigtop/itest/packagesmoke/PackageTestCommon.groovy#L133

        The trouble is that our automated package testing has fallen through the cracks.

        We really should make it a priority for Bigtop 0.4.0 to at least run this stuff.

        Show
        Roman Shaposhnik added a comment - We do quite a bit of that here (more tests are welcome): https://github.com/apache/bigtop/blob/trunk/bigtop-tests/test-artifacts/package/src/main/groovy/org/apache/bigtop/itest/packagesmoke/PackageTestCommon.groovy#L133 The trouble is that our automated package testing has fallen through the cracks. We really should make it a priority for Bigtop 0.4.0 to at least run this stuff.
        Hide
        Bruno Mahé added a comment - - edited

        Agreed. We should always run them.
        But still, the test cases you are pointing too are missing quite a few cases

        Show
        Bruno Mahé added a comment - - edited Agreed. We should always run them. But still, the test cases you are pointing too are missing quite a few cases

          People

          • Assignee:
            Unassigned
            Reporter:
            Bruno Mahé
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development