efivarfs test in ubuntu_kernel_selftest failed on the second run
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-kernel-tests |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
Xenial |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Won't Fix
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Po-Hsu Lin |
Bug Description
== SRU Justification ==
If you run the test selftest/efivarfs test suite twice, it will fail on
the second run.
This is because the test file created in the first run will obtain the
immutable property, and it will make the second attempt failed with
premission denied error.
== Fix ==
* 1f0ea958 (selftests: efivarfs: return Kselftest Skip code for skipped tests)
* dff6d2ae (selftests/
This issue exists in X/B/D, fixed in newer releases.
For Xenial it lacks the crucial commit which allows the selftest
framework to handle KSFT_SKIP return code (3f4435b5), so the first
commit has to be backported to keep using 0 as its return value. The
second commit is a backport with fuzzy adjustments.
For Bionic, the first commit is a clean cherry-pick, the second is a
backport with fuzzy adjustments.
For Disco, it just needs the second commit, which is also a backport
with fuzzy adjustments as well.
== Test ==
Patch tested against the affected kernels, and it works as expected.
== Regression Potential ==
Low, changes limited to testing tools.
== Original Bug Report ==
This seems to be an issue to the test case, if you run the test suite twice, it will fail on the second run.
The first run will create the test file:
$ ll /sys/firmware/
-rw------- 1 root root 0 Dec 24 07:16 /sys/firmware/
This is cause the open(O_WRONLY) test in test_create_read failed with premission denied on the second run.
This issue can be reproduced with upstream kernel tree on Xenial as well.
$ sudo make -C linux/tools/
make: Entering directory '/home/
for TARGET in efivarfs; do \
make -C $TARGET; \
done;
make[1]: Entering directory '/home/
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/
for TARGET in efivarfs; do \
make -C $TARGET run_tests; \
done;
make[1]: Entering directory '/home/
-------
running test_create
-------
./efivarfs.sh: line 48: /sys/firmware/
[PASS]
-------
running test_create_empty
-------
./efivarfs.sh: line 65: /sys/firmware/
[PASS]
-------
running test_create_read
-------
open(O_WRONLY): Permission denied
[FAIL]
-------
running test_delete
-------
[PASS]
-------
running test_zero_
-------
[PASS]
-------
running test_open_unlink
-------
[PASS]
-------
running test_valid_
-------
[PASS]
-------
running test_invalid_
-------
[PASS]
selftests: efivarfs.sh [FAIL]
make[1]: Leaving directory '/home/
make: Leaving directory '/home/
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-
ProcVersionSign
Uname: Linux 4.4.0-141-generic x86_64
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Dec 24 05:10 seq
crw-rw---- 1 root audio 116, 33 Dec 24 05:10 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CurrentDmesg:
[92859.670497] smpboot: CPU 111 is now offline
[92859.723040] kvm: disabled by bios
[92859.750562] smpboot: Booting Node 1 Processor 111 APIC 0x7d
[92859.821706] kvm: disabled by bios
Date: Tue Dec 25 06:30:01 2018
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
Lsusb:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0b1f:03e9 Insyde Software Corp.
Bus 001 Device 002: ID 0000:0001
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Intel Corporation S2600WFT
PciMultimedia:
ProcFB: 0 astdrmfb
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.157.21
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/29/2016
dmi.bios.vendor: Intel Corporation
dmi.bios.version: SE5C620.
dmi.board.
dmi.board.name: S2600WFT
dmi.board.vendor: Intel Corporation
dmi.board.version: H48104-410
dmi.chassis.
dmi.chassis.type: 23
dmi.chassis.vendor: .......
dmi.chassis.
dmi.modalias: dmi:bvnIntelCor
dmi.product.name: S2600WFT
dmi.product.
dmi.sys.vendor: Intel Corporation
summary: |
- efivarfs test in ubuntu_kernel_selftest failed on Xenial AMD64 + efivarfs test in ubuntu_kernel_selftest failed on the second run with + Xenial AMD64 |
description: | updated |
Changed in linux (Ubuntu): | |
status: | Incomplete → In Progress |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
Changed in ubuntu-kernel-tests: | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
status: | New → In Progress |
no longer affects: | linux (Ubuntu Eoan) |
tags: | added: cscc |
tags: | added: ubuntu-kernel-selftests |
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in linux (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in linux (Ubuntu Disco): | |
status: | New → Confirmed |
Changed in linux (Ubuntu Bionic): | |
status: | New → Confirmed |
Changed in linux (Ubuntu Xenial): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Bionic): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Disco): | |
status: | In Progress → Fix Committed |
Changed in ubuntu-kernel-tests: | |
status: | In Progress → Fix Released |
tags: |
added: verification-done-bionic removed: verification-needed-bionic |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1809704
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.