Skip to contentSkip to conversation

Skip the test if "htop" is used.

PATCH Superseded SiliangYu 3 participants 5 messages Aug 14, 2019 – Aug 29, 2019

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

SiliangYu

author
#0 lore raw

PATCH v3 1/1 Skip the test if "htop" is used.

From: "Yu,Siliang" <[email protected]>

In clear linux os, "htop" is used instead "top", which doesn't support '-b'. Skip the test on clear linux.

---
 .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh     | 4 ++++
 1 file changed, 4 insertions(+)
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh +4 -0
index 18a11197e..da7a4df73 100755
@@ -49,6 +49,10 @@ done
 
 LOOP_COUNT=1
 
+if top -v | grep -q htop; then
+	tst_brkm TCONF "htop is used instead of top, Skip the test..."
+fi
+
 if [ $(get_present_cpus_num) -lt 2 ]; then
 	tst_brkm TCONF "system doesn't have required CPU hotplug support"
 fi
Signature · 1 line
2.22.0
#1 lore raw

PATCH v3 1/1 Skip the test if "htop" is used.

Quoted 3 lines

From: "Yu,Siliang" <[email protected]>

In clear linux os, "htop" is used instead "top", which doesn't support '-b'. Skip the test on clear linux.

There is a bug report in Clear Linux OS [1]:
original top program is named top2, maybe it'd make sense to test for it as well.

Quoted 1 line
Quoted 1 line
 .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh     | 4 ++++

...

testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh done · line 53

Quoted 2 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh +2 -0
+if top -v | grep -q htop; then
+	tst_brkm TCONF "htop is used instead of top, Skip the test..."

tst_brkm TCONF "htop is used instead of top, skip the test"
...

Kind regards,
Petr

[1] https://github.com/clearlinux/distribution/issues/277#issuecomment-442340322

#2 lore raw

PATCH v3 1/1 Skip the test if "htop" is used.

Quoted 4 lines · Petr Vorel
Quoted 2 lines

From: "Yu,Siliang"<[email protected]>
In clear linux os, "htop" is used instead "top", which doesn't support '-b'. Skip the test on clear linux.

There is a bug report in Clear Linux OS [1]:
original top program is named top2, maybe it'd make sense to test for it as well.

Hi,

Is the silly rename going to be changed by Clear Linux in future?

If yes, we may keep cpuhotplug06.sh to detect the issue.
If no, we may update cpuhotplug06.sh to use top2 if top is provided by htop.

Best Regards,
Xiao Yang

Quoted 16 lines
Quoted 1 line
Quoted 1 line
  .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh     | 4 ++++

...

testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh done · line 53

Quoted 2 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh +2 -0
+if top -v | grep -q htop; then
+	tst_brkm TCONF "htop is used instead of top, Skip the test..."

tst_brkm TCONF "htop is used instead of top, skip the test"
...

Kind regards,
Petr

[1] https://github.com/clearlinux/distribution/issues/277#issuecomment-442340322

#3 lore raw

PATCH v3 1/1 Skip the test if "htop" is used.

Hi,

Quoted 10 lines · Petr Vorel
Quoted 4 lines
Quoted 2 lines

From: "Yu,Siliang"<[email protected]>
In clear linux os, "htop" is used instead "top", which doesn't support '-b'. Skip the test on clear linux.

There is a bug report in Clear Linux OS [1]:
original top program is named top2, maybe it'd make sense to test for it as well.

Is the silly rename going to be changed by Clear Linux in future?

If yes, we may keep cpuhotplug06.sh to detect the issue.
If no, we may update cpuhotplug06.sh to use top2 if top is provided by htop.

+1. Let's wait for the reply on Github issue [1].

Quoted 2 lines

Best Regards,
Xiao Yang

Kind regards,
Petr

Quoted 1 line
Quoted 1 line

[1] https://github.com/clearlinux/distribution/issues/277#issuecomment-442340322

#4 lore raw

PATCH v3 1/1 Skip the test if "htop" is used.

In reply to Xiao Yang

Hi,

Quoted 1 line

Is the silly rename going to be changed by Clear Linux in future?

According to [2], they does not going to change it.

Quoted 2 lines

If yes, we may keep cpuhotplug06.sh to detect the issue.
If no, we may update cpuhotplug06.sh to use top2 if top is provided by htop.

I suggest to use proposed solution with extra tip:

if top -v | grep -q htop; then
tst_brkm TCONF "htop is used instead of top, skip the test (workaround: alias top='/path/to/real/top')"
fi

And leave user to solve it:
alias top='top2'

Kind regards,
Petr