From 430b824f26e2a6244e52bc6c263c2fbab7bd5b13 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 26 Apr 2022 17:00:10 +0200 Subject: [PATCH] fix tests on ppc64le (#2046706) --- .gitignore | 2 +- clknetsim-phc2sys.patch | 22 ++++++++++++++++++++++ linuxptp.spec | 9 ++++++++- sources | 2 +- 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 clknetsim-phc2sys.patch diff --git a/.gitignore b/.gitignore index 7ecf210..1892f88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /linuxptp-3.1.1.tgz /linuxptp-testsuite-ff37e2.tar.gz -/clknetsim-c4ccc2.tar.gz +/clknetsim-9ed48d.tar.gz diff --git a/clknetsim-phc2sys.patch b/clknetsim-phc2sys.patch new file mode 100644 index 0000000..1d2b649 --- /dev/null +++ b/clknetsim-phc2sys.patch @@ -0,0 +1,22 @@ +commit 2c62b9a3d8aa61bbb45a522c47be1ff2261e9b0e +Author: Miroslav Lichvar +Date: Mon Mar 14 11:40:50 2022 +0100 + + bash: remove default options for phc2sys + + Don't set any options by default for phc2sys to avoid conflict between + -O and -a. + +diff --git a/clknetsim.bash b/clknetsim.bash +index becc94d..eed622c 100644 +--- a/clknetsim.bash ++++ b/clknetsim.bash +@@ -82,7 +82,7 @@ start_client() { + args+=($opts) + ;; + phc2sys) +- args=(-s /dev/ptp0 -O 0 $opts $config) ++ args=($opts $config) + ;; + nsm) + args=($opts) diff --git a/linuxptp.spec b/linuxptp.spec index e0f799f..5cb796a 100644 --- a/linuxptp.spec +++ b/linuxptp.spec @@ -1,6 +1,6 @@ %global _hardened_build 1 %global testsuite_ver ff37e2 -%global clknetsim_ver c4ccc2 +%global clknetsim_ver 9ed48d %global selinuxtype targeted %bcond_without selinux @@ -29,6 +29,8 @@ Source22: linuxptp.te # fix handling of zero-length messages Patch1: linuxptp-zerolength.patch +# revert phc2sys options needed by the older version of test suite +Patch2: clknetsim-phc2sys.patch BuildRequires: gcc gcc-c++ make systemd @@ -64,6 +66,11 @@ linuxptp SELinux policy module %patch1 -p1 -b .zerolength mv linuxptp-testsuite-%{testsuite_ver}* testsuite mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim + +pushd testsuite/clknetsim +%patch2 -p1 -R -b .phc2sys +popd + mkdir selinux cp -p %{SOURCE20} %{SOURCE21} %{SOURCE22} selinux diff --git a/sources b/sources index 7c6f028..05833d0 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (linuxptp-3.1.1.tgz) = c3c40987fe68480a8473097ebc3c506fb4f8f3b6456bbe637b2b3cb0b3e0182f1513b511fdc04b3607d5f7d8bd1bd22502bb86eb13f9fa4fa63a3331846b33ec SHA512 (linuxptp-testsuite-ff37e2.tar.gz) = 5d5c4ec2a8ff7955b3c5eb75d5cc03fb1d4ef0e973fbf4f988cd3487d3723bfdaf8908c3c6063f9b7ad12fad8b5c117d2fd88df496d31d3e44d8f6a8fdb53d27 -SHA512 (clknetsim-c4ccc2.tar.gz) = d2f71b2036e33ee92cd3590079dac04bc57bf2e9909f11e9ba66cd61c9946e92d2ebbdfd03c359cf39c6c8c07b28557d35fee3cb57eec75f5b1201858aa1d701 +SHA512 (clknetsim-9ed48d.tar.gz) = ec35c7ca5ea3d19e8ae7c75854b0954dd6887cc5b93f35a3ee57964ec1bb1d5c9ea429357d634bccf34aafc4999ad0a9ef56e5c1c109c383ff2b3b99042012cc