Merge ~ian-may/+git/autotest-client-tests:jammy-focal-pts-compat-mp-v2 into ~canonical-kernel-team/+git/autotest-client-tests:master

Proposed by Ian May
Status: Merged
Approved by: Po-Hsu Lin
Approved revision: f2b94838ea50355ff29a1908db6e43a6474b880a
Merge reported by: Po-Hsu Lin
Merged at revision: f2b94838ea50355ff29a1908db6e43a6474b880a
Proposed branch: ~ian-may/+git/autotest-client-tests:jammy-focal-pts-compat-mp-v2
Merge into: ~canonical-kernel-team/+git/autotest-client-tests:master
Diff against target: 102 lines (+19/-15)
3 files modified
ubuntu_performance_pts/control (+0/-1)
ubuntu_performance_pts/ubuntu_performance_pts.py (+17/-12)
ubuntu_performance_pts/user-config.xml (+2/-2)
Reviewer Review Type Date Requested Status
Po-Hsu Lin Approve
Review via email: mp+444611@code.launchpad.net

This proposal supersedes a proposal from 2023-06-02.

Description of the change

v2 Changes

- Add wrapper function for getting platform object via platform or distro module.

- Further investigation into openssl-3.0.1 test failure with squid.internal proxy. This can be replicated outside of autotest and PTS using

Works
wget https://github.com/openssl/openssl/archive/refs/tags/openssl-3.0.0.tar.gz

Fails
export https_proxy="http://squid.internal:3128"
wget https://github.com/openssl/openssl/archive/refs/tags/openssl-3.0.0.tar.gz

DGX Performance testing is moving from Bionic/Focal to Focal/Jammy. The ubuntu_performance_pts test needs some fixups for Jammy. These patches provide updates for Jammy compatibility with pts/john-the-ripper and pts/openssl

To post a comment you must log in.
Revision history for this message
Andrei Gherzan (agherzan) wrote : Posted in a previous version of this proposal

I'm unsure if I understand the "UBUNTU: SAUCE: ubuntu_performance_pts: update user-config.xml" change. I would recommend expanding git log a bit.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Posted in a previous version of this proposal

Apart from the comment from Andrei, I am curious why we don't need to use squid.internal proxy anymore.

Also, with older releases the platform.dist() will error out with:
  AttributeError: module 'platform' has no attribute 'dist'

Do we need to run this test with Focal or even older releases? If the answer is yes then we might need to modify this part.

Other than this the code is looking good.

review: Needs Information
Revision history for this message
Ian May (ian-may) wrote : Posted in a previous version of this proposal

> Apart from the comment from Andrei, I am curious why we don't need to use
> squid.internal proxy anymore.
>

I apologize for not providing better context. When using 'squid.internal' and running the openssl test "phoronix-test-suite batch-benchmark openssl-3.0.1". The test fails to download. I'll update the commit message with a summary.

$ sudo phoronix-test-suite batch-benchmark openssl-3.0.1

    Evaluating External Test Dependencies ........................................................................................................................................................................................................................

Phoronix Test Suite v10.8.4

    To Install: pts/openssl-3.0.1

    Determining File Requirements ................................................................................................................................................................................................................................
    Searching Download Caches ....................................................................................................................................................................................................................................

    1 Test To Install
        1 File To Download [14.41MB]
        430MB Of Disk Space Is Needed
        2 Minutes, 32 Seconds Estimated Install Time

    pts/openssl-3.0.1:
        Test Installation 1 of 1
        1 File Needed [14.41 MB / 1 Minute]
        Downloading: openssl-openssl-3.0.0.tar.gz [14.41MB]
            Download Failed: https://github.com/openssl/openssl/archive/refs/tags/openssl-3.0.0.tar.gz
            If able to locate the file elsewhere, place it in the download cache and re-run the command.

            Download Cache: /var/lib/phoronix-test-suite/download-cache/
            File Name: openssl-openssl-3.0.0.tar.gz
            SHA256: b39653402e398a2b89c3f1779f09fe273fda6b6d7873d2816b954b949a185b83
            Downloading of needed test files failed.

    [PROBLEM] pts/openssl-3.0.1 is not installed.

Removing the proxy the test downloads fine. If you know of a way to make this work via squid.internal I can pursue that method for as a resolution.

> Also, with older releases the platform.dist() will error out with:
> AttributeError: module 'platform' has no attribute 'dist'
>
> Do we need to run this test with Focal or even older releases? If the answer
> is yes then we might need to modify this part.

Thanks, there is a wrapper script for running the DGX Perf tests, it installs python2-minimal on Focal and Jammy which is why I didn't see any issues with platform.dist() in my testing. I'm adding a patch that will wrap that call to protect against errors on Python 3.8 and up.

>
> Other than this the code is looking good.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

LGTM. Thanks!

review: Approve
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Applied and pushed, thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ubuntu_performance_pts/control b/ubuntu_performance_pts/control
2index 9ccb7d7..80d6767 100644
3--- a/ubuntu_performance_pts/control
4+++ b/ubuntu_performance_pts/control
5@@ -17,7 +17,6 @@ result = job.run_test_detail(NAME, test_name='setup', tag='setup', subtest='setu
6 if result == 'GOOD':
7 jobs = [
8 [ 'john-the-ripper', 'john-the-ripper-blowfish', 30 ],
9- [ 'john-the-ripper', 'john-the-ripper-des', 30 ],
10 [ 'openssl', 'openssl', 30 ],
11 [ 'povray', 'povray', 80 ],
12 [ 'ttsiod-renderer', 'ttsiod-renderer', 30 ],
13diff --git a/ubuntu_performance_pts/phoronix-test-suite_10.8.4_all.deb b/ubuntu_performance_pts/phoronix-test-suite_10.8.4_all.deb
14new file mode 100644
15index 0000000..d3bcd8b
16Binary files /dev/null and b/ubuntu_performance_pts/phoronix-test-suite_10.8.4_all.deb differ
17diff --git a/ubuntu_performance_pts/phoronix-test-suite_7.8.0_all.deb b/ubuntu_performance_pts/phoronix-test-suite_7.8.0_all.deb
18deleted file mode 100644
19index 797f6bb..0000000
20Binary files a/ubuntu_performance_pts/phoronix-test-suite_7.8.0_all.deb and /dev/null differ
21diff --git a/ubuntu_performance_pts/ubuntu_performance_pts.py b/ubuntu_performance_pts/ubuntu_performance_pts.py
22index 60228c8..5130438 100644
23--- a/ubuntu_performance_pts/ubuntu_performance_pts.py
24+++ b/ubuntu_performance_pts/ubuntu_performance_pts.py
25@@ -86,13 +86,16 @@ class ubuntu_performance_pts(test.test):
26 if result.returncode != 0:
27 print("WARNING: could not set swap %s" % ("on" if swap_on else "off"))
28
29- def install_required_pkgs(self):
30- arch = platform.processor()
31+ def get_platform_distro(self):
32 try:
33- series = platform.dist()[2]
34+ return platform.dist()
35 except AttributeError:
36 import distro
37- series = distro.codename()
38+ return distro.linux_distribution(full_distribution_name=False)
39+
40+ def install_required_pkgs(self):
41+ arch = platform.processor()
42+ series = self.get_platform_distro()[2]
43 release = platform.release()
44
45 pkgs = [
46@@ -136,7 +139,7 @@ class ubuntu_performance_pts(test.test):
47 self.results += self.setup_config(pwd.getpwnam(username)[5])
48 self.results += self.setup_config(os.path.expanduser("~"))
49
50- self.results += utils.system_output('dpkg -i %s' % os.path.join(self.bindir, 'phoronix-test-suite_7.8.0_all.deb'), retain_output=True)
51+ self.results += utils.system_output('dpkg -i %s' % os.path.join(self.bindir, 'phoronix-test-suite_10.8.4_all.deb'), retain_output=True)
52 self.results += utils.system_output('phoronix-test-suite enterprise-setup', retain_output=True)
53 self.results += utils.system_output('yes n | phoronix-test-suite batch-setup', retain_output=True)
54
55@@ -228,15 +231,18 @@ class ubuntu_performance_pts(test.test):
56 print("NOTRUN: test not run, no data")
57
58 def run_john_the_ripper_blowfish(self, test_name, tag):
59- cmd = 'export PRESET_OPTIONS="john-the-ripper.run-test=Blowfish"; %s phoronix-test-suite batch-benchmark john-the-ripper-1.7.2' % force_times_to_run
60+ if self.get_platform_distro()[1].split('.')[0] > "20":
61+ cmd = 'export PRESET_OPTIONS="john-the-ripper.run-test=Blowfish"; %s phoronix-test-suite batch-benchmark john-the-ripper-1.8.0' % force_times_to_run
62+ else:
63+ cmd = 'export PRESET_OPTIONS="john-the-ripper.run-test=Blowfish"; %s phoronix-test-suite batch-benchmark john-the-ripper-1.7.2' % force_times_to_run
64 self.print_stats('john_the_ripper_blowfish', cmd)
65
66- def run_john_the_ripper_des(self, test_name, tag):
67- cmd = 'export PRESET_OPTIONS="john-the-ripper.run-test=Traditional DES"; %s phoronix-test-suite batch-benchmark john-the-ripper-1.6.2' % force_times_to_run
68- self.print_stats('john_the_ripper_des', cmd)
69-
70 def run_openssl(self, test_name, tag):
71- cmd = '%s phoronix-test-suite batch-benchmark openssl-1.11.0' % force_times_to_run
72+ #If series is greater than focal(20) we need to use Openssl-3
73+ if self.get_platform_distro()[1].split('.')[0] > "20":
74+ cmd = 'export PRESET_OPTIONS="openssl.algo=RSA4096"; %s phoronix-test-suite batch-benchmark openssl-3.0.1' % force_times_to_run
75+ else:
76+ cmd = 'export PRESET_OPTIONS="openssl.algo=RSA4096"; %s phoronix-test-suite batch-benchmark openssl-1.11.0' % force_times_to_run
77 self.print_stats(test_name, cmd)
78
79 def run_povray(self, test_name, tag):
80@@ -277,7 +283,6 @@ class ubuntu_performance_pts(test.test):
81 'git': self.run_generic,
82 'build-llvm': self.run_generic,
83 'john-the-ripper-blowfish' : self.run_john_the_ripper_blowfish,
84- 'john-the-ripper-des': self.run_john_the_ripper_des,
85 'openssl': self.run_openssl,
86 'osbench-files': self.run_osbench_files,
87 'osbench-processes': self.run_osbench_files,
88diff --git a/ubuntu_performance_pts/user-config.xml b/ubuntu_performance_pts/user-config.xml
89index de80ed8..19ba6cb 100644
90--- a/ubuntu_performance_pts/user-config.xml
91+++ b/ubuntu_performance_pts/user-config.xml
92@@ -56,8 +56,8 @@
93 <NoInternetCommunication>FALSE</NoInternetCommunication>
94 <NoNetworkCommunication>FALSE</NoNetworkCommunication>
95 <Timeout>20</Timeout>
96- <ProxyAddress>squid.internal</ProxyAddress>
97- <ProxyPort>3128</ProxyPort>
98+ <ProxyAddress></ProxyAddress>
99+ <ProxyPort></ProxyPort>
100 <ProxyUser></ProxyUser>
101 <ProxyPassword></ProxyPassword>
102 </Networking>

Subscribers

People subscribed via source and target branches

to all changes: