• Akinobu Mita's avatar
    fault-injection: add selftests for cpu and memory hotplug · d89dffa9
    Akinobu Mita authored
    This adds two selftests
    
    * tools/testing/selftests/cpu-hotplug/on-off-test.sh is testing script
    for CPU hotplug
    
    1. Online all hot-pluggable CPUs
    2. Offline all hot-pluggable CPUs
    3. Online all hot-pluggable CPUs again
    4. Exit if cpu-notifier-error-inject.ko is not available
    5. Offline all hot-pluggable CPUs in preparation for testing
    6. Test CPU hot-add error handling by injecting notifier errors
    7. Online all hot-pluggable CPUs in preparation for testing
    8. Test CPU hot-remove error handling by injecting notifier errors
    
    * tools/testing/selftests/memory-hotplug/on-off-test.sh is doing the
    similar thing for memory hotplug.
    
    1. Online all hot-pluggable memory
    2. Offline 10% of hot-pluggable memory
    3. Online all hot-pluggable memory again
    4. Exit if memory-notifier-error-inject.ko is not available
    5. Offline 10% of hot-pluggable memory in preparation for testing
    6. Test memory hot-add error handling by injecting notifier errors
    7. Online all hot-pluggable memory in preparation for testing
    8. Test memory hot-remove error handling by injecting notifier errors
    Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
    Suggested-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Cc: Pavel Machek <pavel@ucw.cz>
    Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
    Cc: Greg KH <greg@kroah.com>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Michael Ellerman <michael@ellerman.id.au>
    Cc: Dave Jones <davej@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    d89dffa9
on-off-test.sh 3.88 KB