Skip to content

Commit

Permalink
Merge pull request #16884 from richiejp/bcc2
Browse files Browse the repository at this point in the history
extra_tests_kernel: Add BCC tools test
  • Loading branch information
pevik committed Apr 18, 2023
2 parents ac76f8e + e764538 commit a833c06
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/main_common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2539,7 +2539,11 @@ sub load_extra_tests_kernel {
loadtest "kernel/module_build";
loadtest "kernel/tuned";
loadtest "kernel/fwupd" if is_sle('15+');
loadtest "kernel/bpftrace" if is_tumbleweed || is_sle('>=15-sp5');

if (is_tumbleweed || is_sle('>=15-sp5')) {
loadtest "kernel/bpftrace";
loadtest "kernel/bcc";
}
}

# Scheduling set for validation of specific installation
Expand Down
30 changes: 30 additions & 0 deletions tests/kernel/bcc.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2023 SUSE LLC
# SPDX-License-Identifier: GPL-2.0-or-later

# Package: bpftrace
# Summary: Compile and attach eBPF probes with BCC tools
# Maintainer: kernel-qa@suse.de

use Mojo::Base qw(opensusebasetest);
use testapi;
use utils 'zypper_call';
use version_utils 'is_sle';
use serial_terminal 'select_serial_terminal';

sub run {
select_serial_terminal;

zypper_call('in bcc-tools');

my $tools_dir = '/usr/share/bcc/tools';

assert_script_run("$tools_dir/btrfsdist 5 2");
assert_script_run("$tools_dir/btrfsslower -d 10");
assert_script_run("$tools_dir/filetop -a 5 10");
}

1;

=head1 Discussion
Smoke test for a small selection of BCC tools.

0 comments on commit a833c06

Please sign in to comment.