open-quantum-safe / liboqs

C library for prototyping and experimenting with quantum-resistant cryptography
https://openquantumsafe.org/
Other
1.69k stars 419 forks source link

test_style failed with 127 and test_spdx - assert False #1096

Closed nasastry closed 2 years ago

nasastry commented 2 years ago

git head is at 9be13d2

Re-create steps:

                git clone -b main https://github.com/open-quantum-safe/liboqs.git
                cd liboqs

        and build:

                mkdir build && cd build
                cmake -GNinja ..
                ninja

Due to the error https://github.com/open-quantum-safe/liboqs/issues/1095 commented out '--numprocesses=auto' in build.ninja file.

And ran the tests:

FAILED tests/test_code_conventions.py::test_style - AssertionError: Got unexpected return code 127
FAILED tests/test_code_conventions.py::test_spdx - assert False
======================= 2 failed, 615 passed, 251 skipped in 261.89s (0:04:21) =======================

liboqs_run_tests.txt Attached the full run log.

Thanks!!

baentsch commented 2 years ago

Your run log contains this error message:

xargs: astyle: No such file or directory

-> astyle is missing. Is it possible you didn't read https://github.com/open-quantum-safe/liboqs#linuxmacos? This would also explain #1095 ... Please follow all statements in the README and close #1095 and #1096 if things improve then.

baentsch commented 2 years ago

Closing assuming https://github.com/open-quantum-safe/liboqs/issues/1095#issuecomment-927570521 applies here too.

oDinZu commented 4 months ago

Today on compilation via Arch Linux, I received a similar error. [gw0] [ 33%] FAILED tests/test_code_conventions.py::test_style It was the only error that failed the tests.

I currently have astyle 3.4.10-1 installed and am compiling 0.9.2 tag of oqs with 1 CPU.

I am doing a fresh compile again and will update this post if anything changes.

Show Test Results Details
================================== FAILURES =================================== _________________________________ test_style __________________________________ [gw0] linux -- Python 3.11.8 /usr/bin/python3 @helpers.filtered_test @pytest.mark.skipif(sys.platform.startswith("win"), reason="Not needed on Windows") def test_style(): > result = helpers.run_subprocess( ['tests/run_astyle.sh'] ) tests/test_code_conventions.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ command = ['tests/run_astyle.sh'], working_dir = '.' env = {'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'DEBUGINFOD_URLS': 'https://debuginfod.archlinux.org ', 'HOME': '/home/odinzu', 'LANG': 'en_US.UTF-8', ...} expected_returncode = 0, input = None, ignore_returncode = False def run_subprocess(command, working_dir='.', env=None, expected_returncode=0, input=None, ignore_returncode=False): """ Helper function to run a shell command and report success/failure depending on the exit status of the shell command. """ env_ = os.environ.copy() if env is not None: env_.update(env) env = env_ # Note we need to capture stdout/stderr from the subprocess, # then print it, which pytest will then capture and # buffer appropriately print(working_dir + " > " + " ".join(command)) result = subprocess.run( command, input=input, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=working_dir, env=env, ) if not(ignore_returncode) and (result.returncode != expected_returncode): print(result.stdout.decode('utf-8')) > assert False, "Got unexpected return code {}".format(result.returncode) E AssertionError: Got unexpected return code 255 tests/helpers.py:42: AssertionError ---------------------------- Captured stdout call ----------------------------- . > tests/run_astyle.sh Formatted src/kem/bike/functions_renaming.h Formatted src/common/sha3/xkcp_low/KeccakP-1600/plain-64bits/brg_endian.h Formatted src/common/sha3/xkcp_low/KeccakP-1600times4/avx2/brg_endian.h Formatted src/common/sha3/xkcp_low/KeccakP-1600times4/avx2/KeccakP-1600-times4-SIMD256.c Formatted src/common/sha3/sha3x4.h Formatted src/common/sha3/sha3.h Formatted src/common/aes/aes256_ni.c Formatted src/common/aes/aes_c.c Formatted src/common/sha2/sha2_armv8.c Formatted src/common/common.h Formatted src/common/pqclean_shims/compat.h Formatted tests/test_kem_mem.c Formatted tests/speed_common.c Formatted tests/test_sha3.c Formatted tests/speed_sig.c Error: Some files need reformatting. Check output above. =========================== short test summary info =========================== FAILED tests/test_code_conventions.py::test_style - AssertionError: Got unexpected return code 255 =========== 1 failed, 272 passed, 129 skipped in 201.08s (0:03:21) ============ FAILED: tests/CMakeFiles/run_tests /home/username/Apps/liboqs/build/tests/CMakeFiles/run_tests