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

Bug #1838961 reported by Po-Hsu Lin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Thadeu Lima de Souza Cascardo
linux (Ubuntu)
Fix Released
Undecided
Thadeu Lima de Souza Cascardo
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
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)

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
tags: added: 4.4 sru-20190722 ubuntu-ltp-syscalls
Revision history for this message
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)
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

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)
Changed in ubuntu-kernel-tests:
status: New → In Progress
Changed in linux-kvm (Ubuntu):
status: New → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.