Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Below unit tests are always failing #1694

Open
adlingepa opened this issue Jun 20, 2020 · 4 comments
Open

Below unit tests are always failing #1694

adlingepa opened this issue Jun 20, 2020 · 4 comments

Comments

@adlingepa
Copy link

adlingepa commented Jun 20, 2020

The following tests are failing at our machines,
17 - test_aktualizr_fullostree (Failed)
50 - test_aktualizr_secondary_ostree (Failed)
82 - test_ip_secondary (Failed)
86 - test_treehub_failure (Failed)
87 - test_misc_ostree_update (Failed)
Errors while running CTest

Could you please confirm whether this is our environment issue or doing something wrong?
Where to check the failure logs ?
aktualizr-tests-failure_build-logs.txt

@adlingepa adlingepa changed the title Below UTs are always failing Below unit tests are always failing Jun 20, 2020
@pattivacek
Copy link
Collaborator

Hello! Unfortunately, we can't see any details of the tests that are failing. Can you try to run the tests with verbose output? For example, try CTEST_OUTPUT_ON_FAILURE=1 CTEST_PARALLEL_LEVEL=8 ctest -V.

Further information that might help:

  • Are these problems persistent?
  • Does your environment deviate from what we describe in the requirements and dependencies?
  • What have you tried so far?

@adlingepa
Copy link
Author

adlingepa commented Jun 23, 2020

Hello Patrick!
Thank you for your response. Here are the information which might useful for your reference,

Are these problems persistent?

Yes, Each time we tried to run all the unit tests these are failing.

Does your environment deviate from what we describe in the requirements and dependencies?

Followed each and every step given in guide for requirements and building.

What have you tried so far?

1.Followed all the steps to install all the dependencies.
2.cmake command used : cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_OSTREE=ON ..
3.complied with the command : make build_tests
4.For the running the unit tests we tried following options
a.make test
b.make check
5. Tried on different machine by doing fresh setup
still UTs are failing

Now we tried as per your suggestion but for a single test (for all tests it taking too long time),
CTEST_OUTPUT_ON_FAILURE=1 CTEST_PARALLEL_LEVEL=8 ctest -V -R test_aktualizr_fullostree
We got the failure logs, which tells that,

	Current versions in storage and reported by OSTree do not match
	Current version for ECU ID: CA:FE:A6:D2:84:9D is unknown

Do we need to setup some ECU version before executing the tests ?
If there are some special steps needed to set up the environment and run the unit tests for ostree please guide us to do so.
Attached output file for you reference.

P.S. Also added complete logs for all tests, and displayed current git status and last few commits

Thank you !!
fullostree_ut_failure.log
complete_logs_ut_failure.log

@mike-sul
Copy link
Collaborator

@adlingepa The tests fail because of this
Installing package using ostree package manager 17: ostree_sysroot_deploy_tree: Failed to find kernel in /usr/lib/modules, /usr/lib/ostree-boot or /boot
It means that that the ostree-backed rootfs (/tmp/aktualizr-9603-7f38-07d3-725c/e592-bb6c-dir/sysroot) copied from /ostree_repo is "broken", vmlinuz should be there. (/ostree_repo is generated by make_ostree_sysroot target). Or, as an option the ostree/libostree version you use is not the version that the tests expects so the emulated rootfs does not fulfill requirements of your version. The tests expect v2018.9 version of ostree.

@adlingepa
Copy link
Author

adlingepa commented Jul 19, 2020

Hello mike-sul !
Thank you for your response. Sorry but I was busy with another activity to check your response and respond you back.
I am executing these tests on my Ubuntu-Linux host machine having version 18.04.4 LTS (Bionic Beaver).

  1. Kernel files are available at /boot directory
prashant@L-10750:~/work/OTA/Uptane/aktualizr$ ls -l /boot/vmlinuz-*
-rw------- 1 root root 8380064 Jun 23 07:45 /boot/vmlinuz-4.15.0-109-generic
-rw------- 1 root root 8380064 Jul 10 01:07 /boot/vmlinuz-4.15.0-111-generic

However there is no directory named /ostree_repo at root (/) location

prashant@L-10750:~/work/OTA/Uptane/aktualizr$ ls /
bin   cdrom  dev  home        initrd.img.old  lib32  libx32      media  opt   Quarantine  run   snap  sys  usr  vmlinuz
boot  core   etc  initrd.img  lib             lib64  lost+found  mnt    proc  root        sbin  srv   tmp  var  vmlinuz.old

Who will be create the directory /ostree_repo at root ?
Will it require to execute tests with sudo access to generate /ostree_repo at root ?

  1. For this Ubuntu version the latest ostree version available is v2018.8
prashant@L-10750:~/work/OTA/Uptane/aktualizr$ ostree --version 
libostree:
 Version: 2018.8
 Features:
  - libsoup
  - gpgme
  - libarchive
  - selinux
  - libmount
  - release
  - p2p

I tried to update this to v2018.9, but it couldn't be installed due to other dependencies.
How should I change the test's expected version of ostree as v2018.8 ?

ostree_unit_test_failure.log

Thank you !!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants