public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Masayoshi Mizuma <msys.mizuma@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/5] acpi_hotplug: Add ACPI based cpu and memory hotplug testing
Date: Mon, 20 Aug 2018 15:49:12 -0400	[thread overview]
Message-ID: <20180820194915.11805-3-msys.mizuma@gmail.com> (raw)
In-Reply-To: <20180820194915.11805-1-msys.mizuma@gmail.com>

From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>

This tests the following ACPI based cpu and memory hotplugs.

  1. Memory hot remove
  2. CPU hot remove
  3. ACPI container device hot remove
  4. ACPI container device hot add
  5. CPU hot add
  6. Memory hot add

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
---
 .../hotplug/acpi_hotplug/ACPIHOTPLUG_01.sh    | 92 +++++++++++++++++++
 1 file changed, 92 insertions(+)
 create mode 100755 testcases/kernel/hotplug/acpi_hotplug/ACPIHOTPLUG_01.sh

diff --git a/testcases/kernel/hotplug/acpi_hotplug/ACPIHOTPLUG_01.sh b/testcases/kernel/hotplug/acpi_hotplug/ACPIHOTPLUG_01.sh
new file mode 100755
index 000000000..e01b9ad79
--- /dev/null
+++ b/testcases/kernel/hotplug/acpi_hotplug/ACPIHOTPLUG_01.sh
@@ -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
-- 
2.18.0


  parent reply	other threads:[~2018-08-20 19:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20 19:49 [LTP] [PATCH 0/5] acpi_hotplug: Add new test for ACPI based cpu and memory hotplug Masayoshi Mizuma
2018-08-20 19:49 ` [LTP] [PATCH 1/5] acpi_hotplug: Add library file " Masayoshi Mizuma
2018-08-24 16:12   ` Cyril Hrubis
2018-08-24 18:27     ` Masayoshi Mizuma
2018-08-20 19:49 ` Masayoshi Mizuma [this message]
2018-08-20 19:49 ` [LTP] [PATCH 3/5] acpi_hotplug: Add ACPIHOTPLUG_01.sh under runtest Masayoshi Mizuma
2018-08-20 19:49 ` [LTP] [PATCH 4/5] acpi_hotplug: Add Makefile Masayoshi Mizuma
2018-08-20 19:49 ` [LTP] [PATCH 5/5] acpi_hotplug: Add README Masayoshi Mizuma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180820194915.11805-3-msys.mizuma@gmail.com \
    --to=msys.mizuma@gmail.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox