new file mode 100755
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018, FUJITSU LIMITED. All rights reserved.
+
+TST_SETUP=_setup
+TST_CLEANUP=_cleanup
+TST_TESTFUNC=test
+TST_CNT=6
+
+. tst_test.sh
+. ACPIHOTPLUG_lib.sh
+
+test1()
+{
+ if [[ ${#HOTPLUGABLE_NODES[@]} -eq 0 ]]; then
+ tst_brk TCONF "Memory hotplug may be not supported in this system"
+ fi
+ memory_hp "hotremove"
+ if [[ $? -eq 0 ]]; then
+ tst_res TPASS "memory hotremove success"
+ else
+ tst_res TFAIL "memory hotremove failed"
+ fi
+}
+
+test2()
+{
+ if [[ -z $HOTPLUGABLE_CONTAINER ]]; then
+ tst_brk TCONF "CPU hotplug may be not supported in this system"
+ fi
+ cpu_hp "hotremove"
+ if [[ $? -eq 0 ]]; then
+ tst_res TPASS "cpu hotremove success"
+ else
+ tst_res TFAIL "cpu hotremove failed"
+ fi
+}
+
+test3()
+{
+ if [[ -z $HOTPLUGABLE_CONTAINER ]]; then
+ tst_brk TCONF "ACPI container hotplug may be not supported in this system"
+ fi
+ container_hp "hotremove"
+ if [[ $? -eq 0 ]]; then
+ tst_res TPASS "ACPI container hotremove success"
+ else
+ tst_res TFAIL "ACPI container hotremove failed"
+ fi
+}
+
+test4()
+{
+ if [[ -z $HOTPLUGABLE_CONTAINER ]]; then
+ tst_brk TCONF "ACPI container hotplug may be not supported in this system"
+ fi
+ container_hp "hotadd"
+ if [[ $? -eq 0 ]]; then
+ tst_res TPASS "ACPI container hotadd success"
+ else
+ tst_res TFAIL "ACPI container hotadd failed"
+ fi
+}
+
+test5()
+{
+ if [[ -z $HOTPLUGABLE_CONTAINER ]]; then
+ tst_brk TCONF "CPU hotplug may be not supported in this system"
+ fi
+ cpu_hp "hotadd"
+ if [[ $? -eq 0 ]]; then
+ tst_res TPASS "cpu hotadd success"
+ else
+ tst_res TFAIL "cpu hotadd failed"
+ fi
+}
+
+
+test6()
+{
+ if [[ ${#HOTPLUGABLE_NODES[@]} -eq 0 ]]; then
+ tst_brk TCONF "Memory hotplug may be not supported in this system"
+ fi
+ memory_hp "hotadd"
+ if [[ $? -eq 0 ]]; then
+ tst_res TPASS "memory hotadd success"
+ else
+ tst_res TFAIL "memory hotadd failed"
+ fi
+}
+tst_run