Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kdump test #2904

Merged
merged 1 commit into from May 24, 2017
Merged

kdump test #2904

merged 1 commit into from May 24, 2017

Conversation

yxususe
Copy link
Contributor

@yxususe yxususe commented May 17, 2017

No description provided.

@Soulofdestiny Soulofdestiny added notready WIP Work in progress labels May 17, 2017
@okurz okurz changed the title WIP [WIP] kdump test May 17, 2017
@okurz
Copy link
Member

okurz commented May 17, 2017

looks nice so far. But I don't fully understand what each test module is ensuring now. I recommend you put a full header into tests/toolchain/kdump.pm with a summary of what the module should test. Also we should avoid to fill up lib/utils.pm more. I suggest to actually put that helper function which you extracted - good job on that by the way - into a baseclass of both test modules.

@mnowaksuse your review would be appreciated.

@@ -501,12 +501,13 @@ sub load_extra_tests() {
# sysauth test scenarios run in the console
loadtest "sysauth/sssd";
}
# finished console test and back to desktop
loadtest "console/consoletest_finish";
# kdump is not supported on aarch64, see BSC#990418
if (!check_var('ARCH', 'aarch64')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would still enable them even for aarch64. Also the bug reference is wrong bsc#1037407. BSC#990418 is already closed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, consoletest_finish is moved to the end. Because often it couldn't finish, and then the following tests will be skipped. Thanks for the hint about bug reference, I'll have a look.

@yxususe
Copy link
Contributor Author

yxususe commented May 18, 2017

Hi Oliver, kdump and crash test have the same set up steps, thus to avoid code duplication, the set up steps are extracted. Theoretically We could still merge them, because crash is based on kdump anyway. crash will do one more work than kdump, which is to analyse vmcore file generated by kdump. The problem now is that kdump is not stable, it behaves randomly on if it can be enabled or not. Besides that, the tests already function as expected on openSUSE Leap. At the moment I'm testing them on SLES and Tumbleweed, and it still needs to be improved. Thanks for your suggestions, I will try it out.

@yxususe
Copy link
Contributor Author

yxususe commented May 18, 2017

I did an update of my WIP.

@yxususe yxususe force-pushed the kdump_test branch 2 times, most recently from 02a3ff1 to 68acd17 Compare May 22, 2017 09:40
@yxususe
Copy link
Contributor Author

yxususe commented May 22, 2017

I did an update of my WIP. Could you also have a look? @michalnowak mnowak

@mnowaksuse
Copy link

@yxususe I will. Note that there's whitespace issue in Travis.

@yxususe
Copy link
Contributor Author

yxususe commented May 22, 2017

Thanks @michalnowak, the whitespace issue is fixed now.

script_run 'zypper ref';
zypper_call('-v in $(rpmquery kernel-default | sed "s/kernel-default/kernel-default-debuginfo/")');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you keep versioned installation of kernel-default-debuginfo package, please? We used to have problems with wrong kernel-default-debuginfo versions in SUT's repositories, which led to weird issues with crash'es infrastructure.

# make sure kdump is enabled after reboot
validate_script_output "yast2 kdump show 2>&1", sub { m/Kdump is enabled/ }, 90;
#validate_script_output "yast2 kdump show 2>&1", sub { m/Kdump is enabled/ }, 90;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead "code". Remove it, perhaps.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not perhaps, please remove :-)

# finished console test and back to desktop
loadtest "console/consoletest_finish";
# kdump is not supported on aarch64, see BSC#990418
# kdump is not supported on aarch64, see BSC#1037407

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make BSC lowercase, as it's the one we usually go.

Copy link
Member

@okurz okurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see inline comments and also provide verification runs for openSUSE and SLE.

@@ -1,32 +1,27 @@
# SUSE's openQA tests
#
# Copyright © 2016-2017 SUSE LLC
# Copyright © 2017 SUSE LLC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please keep old as it refers to the content, not the file

# make sure kdump is enabled after reboot
validate_script_output "yast2 kdump show 2>&1", sub { m/Kdump is enabled/ }, 90;
#validate_script_output "yast2 kdump show 2>&1", sub { m/Kdump is enabled/ }, 90;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not perhaps, please remove :-)

# without any warranty.

# Summary: Run 'crash' utility on a kernel memory dump
# Maintainer: Michal Nowak <mnowak@suse.com>
Copy link

@mnowaksuse mnowaksuse May 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to claim maintainership, or co-maintainership at least.

select_console 'root-console';

# soft failure ref bsc#1022064 if kdump could not be enabled
return 1 unless kdump_is_active;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why to just exit the test with soft-fail? Rather die instead as we spotted bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already a bug for it: https://bugzilla.suse.com/show_bug.cgi?id=957053. And when I run tests, often it fails because kdump doesn't work properly. Should we always let the test fail?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I run tests, often it fails because kdump doesn't work properly

It looks to me like a definition of product bug. Then the test should always fail. Or I am missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the test always fails, what do we do with the ticket then? Resolved or rejected? For resolved we need at least one successful test run on o3.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can always keep the ticket open in "Feedback" status limbo and wait for the product being fixed.

Copy link
Contributor Author

@yxususe yxususe May 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks for the hint.

@yxususe
Copy link
Contributor Author

yxususe commented May 22, 2017

I've done most modifications, except for die or soft failure part. But there's some issue with test run. I'm still testing it.

# finished console test and back to desktop
loadtest "console/consoletest_finish";
# kdump is not supported on aarch64, see BSC#990418
# kdump is not supported on aarch64, see bsc#1037407
if (!check_var('ARCH', 'aarch64')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you have kdump_is_active function, you can also enable this for aarch64, we can at least start testing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I'll do it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@foursixnine what do you mean "we can start testing it". bsc#990418 is "RESOLVED WONTFIX" and bsc#1037407 is still open.

@yxususe in this PR please focus on one thing at a time. In this case I recommend to not enable testing on something that can not work. We can later on add it with a special switch to add a scenario to the test development group. We can hardly handle more "known" failures and rather should focus on having some more green jobs first.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okurz I mean that since the feature is already there, why don't test it?.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. But as long as the bug is still open we won't expect it to pass, no?

@yxususe yxususe force-pushed the kdump_test branch 2 times, most recently from f4ea83e to b0652d9 Compare May 24, 2017 12:24
@yxususe
Copy link
Contributor Author

yxususe commented May 24, 2017

I updated PR with Oliver's suggestion to leave enough time for crash:
assert_script_run "$crash_cmd", 600;
validate_script_output "$crash_cmd", sub { m/PANIC/ }, 600;

And so far the result of testruns is good: http://f146.suse.de/tests/348 http://f146.suse.de/tests/352
Now I'm waiting for test result on SLE: http://f146.suse.de/tests/360

@okurz
Copy link
Member

okurz commented May 24, 2017

validation tests look fine so far. I recommend you update your commit message itself and the PR description. Please also revert the change reg. enabling the test for aarch64.

@yxususe
Copy link
Contributor Author

yxususe commented May 24, 2017

The commit message is updated. Change referring aarch64 is reverted.
Testrun on SLE failed because of a known issue:
Test died: needle 'grub2' not found at /var/lib/openqa/share/tests/sle/lib/opensusebasetest.pm line 348.

@okurz okurz changed the title [WIP] kdump test kdump test May 24, 2017
@okurz okurz merged commit 9495686 into os-autoinst:master May 24, 2017
@okurz okurz removed notready WIP Work in progress labels May 25, 2017
dzedro added a commit to dzedro/os-autoinst-distri-opensuse that referenced this pull request May 25, 2017
dzedro added a commit to dzedro/os-autoinst-distri-opensuse that referenced this pull request May 25, 2017
@yxususe yxususe deleted the kdump_test branch June 8, 2017 10:53
yxususe pushed a commit to yxususe/os-autoinst-distri-opensuse that referenced this pull request Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants