Skip to content

CI: add GCC 11, GCC 12, Clang 13, Clang 14 - #18639

Closed
thesamesam wants to merge 3 commits into
openssl:masterfrom
thesamesam:warnings
Closed

thesamesam wants to merge 3 commits into
openssl:masterfrom
thesamesam:warnings

Conversation

@thesamesam

@thesamesam thesamesam commented Jun 23, 2022 •

Copy link
Copy Markdown
Contributor

Notably, this might have caught #18225, as Clang 14 wasn't - and is not yet until this PR - in OpenSSL's CI.

It makes sense to ensure CI tests compilers used in newer Linux distributions:

  • Fedora 36 ships with GCC 12
  • Ubuntu 22.04 ships with Clang 14

Comment thread .github/workflows/compiler-zoo.yml Resolved

@paulidale paulidale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work

@paulidale paulidale added branch: master Applies to master branch approval: review pending This pull request needs review by a committer labels Jun 23, 2022
@t8m t8m added triaged: feature The issue/pr requests/adds a feature approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Jun 24, 2022
CLA: trivial
Notably, this might have caught openssl#18225, as Clang 14 wasn't - and is not yet
until this commit - in OpenSSL's CI.

It makes sense to ensure CI tests compilers used in newer Linux distributions:
* Fedora 36 ships with GCC 12
* Ubuntu 22.04 ships with Clang 14

We switch from 'ubuntu-latest' (which can change meaning but currently points
to ubuntu-20.04) to ubuntu-20.04 for the older existing compilers, and
ubuntu-22.04 for the newer ones added by this commit.

CLA: trivial
@thesamesam

Copy link
Copy Markdown
Contributor Author

Before we merge, we might need to look at https://github.com/thesamesam/openssl/runs/7032755752?check_suite_focus=true#step:6:5 for the Clang 14 failure. The GCC 12 failure was already addressed by @t8m in #18627 (thanks!)

The Clang failure is:

test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning

How do we want to handle it?

@paulidale

Copy link
Copy Markdown
Contributor

Fixing test_test.c is easy -- change all the | to ||.

I used | originally so we'd see multiple errors if there were problems but it's not critical.

@thesamesam

thesamesam commented Jun 24, 2022 •

Copy link
Copy Markdown
Contributor Author

Okay, happy to throw that in here (or you may of course do it in a separate PR) if it's fine with you. I was reluctant to do it myself because I didn't get why it was single-| in the first place, but now I know!

EDIT: Done. Thanks!

```
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
```

CLA: Trivial
@t8m t8m added approval: done This pull request has the required number of approvals and removed approval: done This pull request has the required number of approvals labels Jun 24, 2022
@openssl-machine openssl-machine removed the approval: done This pull request has the required number of approvals label Jun 25, 2022
@openssl-machine

Copy link
Copy Markdown
Collaborator

This pull request is ready to merge

@openssl-machine openssl-machine added the approval: ready to merge The 24 hour grace period has passed, ready to merge label Jun 25, 2022
@paulidale

Copy link
Copy Markdown
Contributor

Merged, thanks for this test improvement.

@paulidale paulidale closed this Jun 27, 2022
openssl-machine pushed a commit that referenced this pull request Jun 27, 2022
CLA: trivial

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #18639)
openssl-machine pushed a commit that referenced this pull request Jun 27, 2022
Notably, this might have caught #18225, as Clang 14 wasn't - and is not yet
until this commit - in OpenSSL's CI.

It makes sense to ensure CI tests compilers used in newer Linux distributions:
* Fedora 36 ships with GCC 12
* Ubuntu 22.04 ships with Clang 14

We switch from 'ubuntu-latest' (which can change meaning but currently points
to ubuntu-20.04) to ubuntu-20.04 for the older existing compilers, and
ubuntu-22.04 for the newer ones added by this commit.

CLA: trivial

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #18639)
openssl-machine pushed a commit that referenced this pull request Jun 27, 2022
```
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
```

CLA: Trivial

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #18639)
@paulidale

Copy link
Copy Markdown
Contributor

I just noticed that these commits have CLA: trivial, they are well beyond what we'd consider trivial.
@thesamesam, could you please submit a completed ICLA?

@paulidale paulidale reopened this Jun 27, 2022
@thesamesam

Copy link
Copy Markdown
Contributor Author

I just noticed that these commits have CLA: trivial, they are well beyond what we'd consider trivial. @thesamesam, could you please submit a completed ICLA?

Happily! Let me do that now.

openssl-machine pushed a commit that referenced this pull request Jun 27, 2022
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #18639)
openssl-machine pushed a commit that referenced this pull request Jun 27, 2022
Notably, this might have caught #18225, as Clang 14 wasn't - and is not yet
until this commit - in OpenSSL's CI.

It makes sense to ensure CI tests compilers used in newer Linux distributions:
* Fedora 36 ships with GCC 12
* Ubuntu 22.04 ships with Clang 14

We switch from 'ubuntu-latest' (which can change meaning but currently points
to ubuntu-20.04) to ubuntu-20.04 for the older existing compilers, and
ubuntu-22.04 for the newer ones added by this commit.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #18639)
openssl-machine pushed a commit that referenced this pull request Jun 27, 2022
```
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
```

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #18639)
@paulidale paulidale closed this Jun 27, 2022
@thesamesam
thesamesam deleted the warnings branch June 27, 2022 04:04
@mattcaswell mattcaswell mentioned this pull request Jun 27, 2022
1 of 2 tasks
paulidale pushed a commit to paulidale/openssl that referenced this pull request Aug 23, 2022
```
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
```

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#18639)

Fixes openssl#19024
paulidale pushed a commit to paulidale/openssl that referenced this pull request Aug 23, 2022
```
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
```

Originally the fix for openssl#18639

Fixes openssl#19024
openssl-machine pushed a commit that referenced this pull request Aug 24, 2022
```
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
```

Originally the fix for #18639

Fixes #19024

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #19045)
sftcd pushed a commit to sftcd/openssl that referenced this pull request Sep 24, 2022
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#18639)
sftcd pushed a commit to sftcd/openssl that referenced this pull request Sep 24, 2022
Notably, this might have caught openssl#18225, as Clang 14 wasn't - and is not yet
until this commit - in OpenSSL's CI.

It makes sense to ensure CI tests compilers used in newer Linux distributions:
* Fedora 36 ships with GCC 12
* Ubuntu 22.04 ships with Clang 14

We switch from 'ubuntu-latest' (which can change meaning but currently points
to ubuntu-20.04) to ubuntu-20.04 for the older existing compilers, and
ubuntu-22.04 for the newer ones added by this commit.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#18639)
sftcd pushed a commit to sftcd/openssl that referenced this pull request Sep 24, 2022
```
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
```

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#18639)
thesamesam added a commit to thesamesam/openssl that referenced this pull request Oct 25, 2022
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#18639)

(cherry picked from commit 6332f4c)
Signed-off-by: Sam James <[email protected]>
thesamesam added a commit to thesamesam/openssl that referenced this pull request Oct 25, 2022
Notably, this might have caught openssl#18225, as Clang 14 wasn't - and is not yet
until this commit - in OpenSSL's CI.

It makes sense to ensure CI tests compilers used in newer Linux distributions:
* Fedora 36 ships with GCC 12
* Ubuntu 22.04 ships with Clang 14

We switch from 'ubuntu-latest' (which can change meaning but currently points
to ubuntu-20.04) to ubuntu-20.04 for the older existing compilers, and
ubuntu-22.04 for the newer ones added by this commit.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#18639)

(cherry picked from commit 712c13c)
Signed-off-by: Sam James <[email protected]>
uudiin pushed a commit to uudiin/openssl that referenced this pull request Nov 23, 2022
```
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
```

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#18639)

(cherry picked from commit 6162a24)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants