timer_create01 from ubuntu_ltp_syscalls failed on X-kvm / B-KVM

Bug #1838961 reported by Po-Hsu Lin on 2019-08-05
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Undecided
Thadeu Lima de Souza Cascardo
linux (Ubuntu)
Undecided
Thadeu Lima de Souza Cascardo
Xenial
Undecided
Unassigned
Bionic
Undecided
Unassigned

Bug Description

The timer_create01 failed on X-kvm

Steps to reproduce:

  git clone --depth=1 https://github.com/linux-test-project/ltp.git
  cd ltp; make autotools; ./configure; make; sudo make install
  echo "timer_create01 timer_create01" > /tmp/jobs
  sudo /opt/ltp/runltp -f /tmp/jobs

<<<test_start>>>
tag=timer_create01 stime=1565000454
cmdline="timer_create01"
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:1100: INFO: Timeout per run is 0h 05m 00s
incrementing stop
timer_create01.c:48: INFO: Testing notification type: SIGEV_NONE
timer_create01.c:93: PASS: Timer successfully created for CLOCK_REALTIME
timer_create01.c:93: PASS: Timer successfully created for CLOCK_MONOTONIC
timer_create01.c:93: PASS: Timer successfully created for CLOCK_PROCESS_CPUTIME_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_THREAD_CPUTIME_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_BOOTTIME
timer_create01.c:87: FAIL: Failed to create timer for CLOCK_BOOTTIME_ALARM: ???
timer_create01.c:87: FAIL: Failed to create timer for CLOCK_REALTIME_ALARM: ???
timer_create01.c:93: PASS: Timer successfully created for CLOCK_TAI
timer_create01.c:48: INFO: Testing notification type: SIGEV_SIGNAL
timer_create01.c:93: PASS: Timer successfully created for CLOCK_REALTIME
timer_create01.c:93: PASS: Timer successfully created for CLOCK_MONOTONIC
timer_create01.c:93: PASS: Timer successfully created for CLOCK_PROCESS_CPUTIME_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_THREAD_CPUTIME_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_BOOTTIME
timer_create01.c:87: FAIL: Failed to create timer for CLOCK_BOOTTIME_ALARM: ???
timer_create01.c:87: FAIL: Failed to create timer for CLOCK_REALTIME_ALARM: ???
timer_create01.c:93: PASS: Timer successfully created for CLOCK_TAI
timer_create01.c:48: INFO: Testing notification type: SIGEV_THREAD
timer_create01.c:93: PASS: Timer successfully created for CLOCK_REALTIME
timer_create01.c:93: PASS: Timer successfully created for CLOCK_MONOTONIC
timer_create01.c:93: PASS: Timer successfully created for CLOCK_PROCESS_CPUTIME_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_THREAD_CPUTIME_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_BOOTTIME
timer_create01.c:87: FAIL: Failed to create timer for CLOCK_BOOTTIME_ALARM: ???
timer_create01.c:87: FAIL: Failed to create timer for CLOCK_REALTIME_ALARM: ???
timer_create01.c:93: PASS: Timer successfully created for CLOCK_TAI
timer_create01.c:48: INFO: Testing notification type: SIGEV_THREAD_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_REALTIME
timer_create01.c:93: PASS: Timer successfully created for CLOCK_MONOTONIC
timer_create01.c:93: PASS: Timer successfully created for CLOCK_PROCESS_CPUTIME_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_THREAD_CPUTIME_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_BOOTTIME
timer_create01.c:87: FAIL: Failed to create timer for CLOCK_BOOTTIME_ALARM: ???
timer_create01.c:87: FAIL: Failed to create timer for CLOCK_REALTIME_ALARM: ???
timer_create01.c:93: PASS: Timer successfully created for CLOCK_TAI
timer_create01.c:48: INFO: Testing notification type: NULL
timer_create01.c:93: PASS: Timer successfully created for CLOCK_REALTIME
timer_create01.c:93: PASS: Timer successfully created for CLOCK_MONOTONIC
timer_create01.c:93: PASS: Timer successfully created for CLOCK_PROCESS_CPUTIME_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_THREAD_CPUTIME_ID
timer_create01.c:93: PASS: Timer successfully created for CLOCK_BOOTTIME
timer_create01.c:87: FAIL: Failed to create timer for CLOCK_BOOTTIME_ALARM: ???
timer_create01.c:87: FAIL: Failed to create timer for CLOCK_REALTIME_ALARM: ???
timer_create01.c:93: PASS: Timer successfully created for CLOCK_TAI

Summary:
passed 30
failed 10
skipped 0
warnings 0
<<<execution_status>>>

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-1052-kvm 4.4.0-1052.59
ProcVersionSignature: User Name 4.4.0-1052.59-kvm 4.4.181
Uname: Linux 4.4.0-1052-kvm x86_64
ApportVersion: 2.20.1-0ubuntu2.19
Architecture: amd64
Date: Mon Aug 5 10:17:57 2019
SourcePackage: linux-kvm
UpgradeStatus: No upgrade log present (probably fresh install)

Po-Hsu Lin (cypressyew) wrote :
tags: added: 4.4 sru-20190722 ubuntu-ltp-syscalls
Po-Hsu Lin (cypressyew) wrote :

Didn't see this on B 4.15 AMD64

summary: - timer_create01 from ubuntu_ltp_syscalls failed on X-kvm
+ timer_create01 from ubuntu_ltp_syscalls failed on X-kvm / B-KVM
Changed in ubuntu-kernel-tests:
assignee: nobody → Kai-Heng Feng (kaihengfeng)

Hi, I found this same issue on a Power system. The RTC does not support alarm there, so this will fail with -ENOTSUPP, which should be -EOPNOTSUPP instead. See kernel patch at [1].

[1] https://<email address hidden>/T/#u

That still require a change on LTP. That should be something like:

diff --git a/testcases/kernel/syscalls/timer_create/timer_create01.c b/testcases/kernel/syscalls/timer_create/timer_create01.c
index 258b6444c..f1ed00e03 100644
--- a/testcases/kernel/syscalls/timer_create/timer_create01.c
+++ b/testcases/kernel/syscalls/timer_create/timer_create01.c
@@ -77,7 +77,7 @@ static void run(unsigned int n)
                                &created_timer_id));

                if (TST_RET != 0) {
- if (possibly_unsupported(clock) && TST_ERR == EINVAL) {
+ if (possibly_unsupported(clock) && (TST_ERR == EINVAL || TST_ERR == ENOTSUP)) {
                                tst_res(TPASS | TTERRNO,
                                        "%s unsupported, failed as expected",
                                        get_clock_str(clock));

Changed in ubuntu-kernel-tests:
assignee: Kai-Heng Feng (kaihengfeng) → Thadeu Lima de Souza Cascardo (cascardo)
Changed in linux-kvm (Ubuntu):
assignee: nobody → Thadeu Lima de Souza Cascardo (cascardo)
Po-Hsu Lin (cypressyew) on 2019-09-26
Changed in ubuntu-kernel-tests:
status: New → In Progress
Changed in linux-kvm (Ubuntu):
status: New → In Progress
Po-Hsu Lin (cypressyew) wrote :

Passed on D-KVM

Changed in linux-kvm (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
affects: linux-kvm (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu Xenial):
status: New → Fix Released
Changed in linux (Ubuntu Bionic):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers