Bug 1088455

Summary: strace does not know about CLOCK_BOOTTIME
Product: [Fedora] Fedora Reporter: john.haxby <john.haxby>
Component: straceAssignee: Dmitry V. Levin <ldv>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dvlasenk, ldv, schwab
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.9-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-19 14:22:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch none

Description john.haxby@oracle.com 2014-04-16 16:20:07 UTC
Description of problem:

Given this tiny program:

        #include <time.h>

        int main () {
                struct timespec t;
                clock_gettime(CLOCK_BOOTTIME, &t);
                return 0;
        }

strace prints "0x7 /* CLOCK_??? */" instead of CLOCK_BOOTTIME

Version-Release number of selected component (if applicable):
   strace-4.8-1.fc20.x86_64


How reproducible: every time


Steps to Reproduce:
1. Compile the tiny program above
2. strace -e clock_gettime ./a.out
3. Observe clock_gettime system call

Actual results:

   clock_gettime(0x7 /* CLOCK_??? */, {17973, 83774407}) = 0


Expected results:

   clock_gettime(CLOCK_BOOTTIME, {17973, 83774407}) = 0

Additional info:

I've attached a proposed patch, but strace itself doesn't build with the current kernel and headers (some different problem I've not looked into).  The patch itself is trivial though.

Comment 1 john.haxby@oracle.com 2014-04-16 16:21:06 UTC
Created attachment 886932 [details]
proposed patch