Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3352711pxu; Tue, 15 Dec 2020 05:10:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhThdYcrJF6uIjuF0bwZE3XgXnHi/eBdlYpQebU5OMb+dvS2lGYJRHye7QYBuU4VE76I8y X-Received: by 2002:a50:ee8e:: with SMTP id f14mr13975468edr.176.1608037838424; Tue, 15 Dec 2020 05:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608037838; cv=none; d=google.com; s=arc-20160816; b=qv+JVycTxOcn4LYb8q+9oR9b0guAhnUhd5aLCkWQOEF2K/EmDsPA81Obm3gQI40Zk+ XAE851zq2wHX4WKFEMJ7bXauNezOMx1rDxzatur4cUNplXqCxXc13ssxHZggKB/jbQ2a WlmV19VNoYU67kHrwDTegX0Rqh4ipgB3L0qjdKGiqbaBcrjQGVLK+s1m5h3+x1xalz8H ogg7acpOxqVYPHnaVimiDYloZ3gDP26FlcuWYmaWCgdotBCqDlXUA25tpFY2v86vT73F 9N704PwqmScDYkiDzqxPKjKHca4g/ppzBHxsIZDEA1KYI1+C2ZKECyluhX75G+V3l85T wBnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=M6JcWbpI6jGa01OPHXVMD2J1Jt7vqUJ1vGYJXmb3BYg=; b=RAZL7j02LQkOIUdUJi6c1aq1UQVW1JoXgk9W5TazFlI/7/7rDJRcINscVokziyY9rR lstpinnMo9RVvGdsdFcr25RH7G74JtB2+rGh2axskvhg/c+v61mv6QaiAzS2/gEEXbT7 RcmXRuL0p/h/ri2br7H0xjlcfzveEKQ+Sx+6SH3euDuC83OWBYOEJplTrn+fOX8/HuvK fMYFcg6gP9kQsGR0fQoqVL81yGNefLIRA7lOIVYqW208cqLAec1zWMKLaCH3Exb6V/75 9rnABdjfzaxgydPBnsS7qu0CEIOYsbQVNw55aoWxHhmn+DxYG4/7WKmxS3eiVsc3RIdF f0sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rajagiritech-edu-in.20150623.gappssmtp.com header.s=20150623 header.b=GySPu3JP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si851251eds.266.2020.12.15.05.10.14; Tue, 15 Dec 2020 05:10:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rajagiritech-edu-in.20150623.gappssmtp.com header.s=20150623 header.b=GySPu3JP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729408AbgLONGr (ORCPT + 99 others); Tue, 15 Dec 2020 08:06:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729312AbgLONGl (ORCPT ); Tue, 15 Dec 2020 08:06:41 -0500 Received: from mail-vs1-xe41.google.com (mail-vs1-xe41.google.com [IPv6:2607:f8b0:4864:20::e41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ED61C0617A6 for ; Tue, 15 Dec 2020 05:06:01 -0800 (PST) Received: by mail-vs1-xe41.google.com with SMTP id e15so9408754vsa.0 for ; Tue, 15 Dec 2020 05:06:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rajagiritech-edu-in.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M6JcWbpI6jGa01OPHXVMD2J1Jt7vqUJ1vGYJXmb3BYg=; b=GySPu3JPn5oY5z7HEHsmBkWTtINCkr42KRf5OqSuvPZXiIDp/6j7IIku1ErEVbzbla TO5zYrJ5XkzpcCLkXeCcTcbXnTxbbUur4fxOhLOIvmsA0qPIy3/RrNvvHREkfCMaRgtI XCgva/BiX2NszgfeuU/PudEkoE5XxRM2hnmkdGwsWBaFDPKuNnjCggRyl3WPnjL7MSCY +3x/R1vUsVoavfWw8teVdheWGKGsNZcw0FO0fxpNKKi8TCaGePbm/Wtc7FrrcXk9HYFN R+SmturpAPzB8742ZBC8IbFa4yieJ94bSrF59pQ9Uh94V0k5behe+HT2G0XgFdo7suIh qSXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M6JcWbpI6jGa01OPHXVMD2J1Jt7vqUJ1vGYJXmb3BYg=; b=esyOBl2jcDft0Bw6sdSMVrAplXMxv4/DzAFbzOrXYtDa2acsHtFljNiJFkzoVk70XP xTY4kf16xS86WBEyUP9O4dXWHixHLZrugcfx3XlHH67lffXlTY0KteBfyC5Fl/1ac8T9 9NztooS/96RIRw8mB49yCzH5NPv+2fCGPboKR05kRpphtnu/aODjNDtAb6OcJ7kTdgjF he1pt4H/SCKRSdCg0WNQnBzJoEynPI0B0Bsn1ujx810IpWwjMoyGC/Y2tkzcZPulczBP P2d6erR9eUEdwsMgU9F82fXyFJjf/yAsIpEoiVpgM7mpJ02e7B2iLzLCk5XmOu9OJOw3 Qfzw== X-Gm-Message-State: AOAM5317CD6oBf7JPJk6doZCL0L2mjONGzcG8L96+/FDt7Mm90ej0jxr XasdJHx6FN/lISq+07n06dkVxemSqDlGcvzZ56MwkA== X-Received: by 2002:a05:6102:18c:: with SMTP id r12mr28967382vsq.34.1608037560466; Tue, 15 Dec 2020 05:06:00 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jeffrin Thalakkottoor Date: Tue, 15 Dec 2020 18:35:24 +0530 Message-ID: Subject: [WARNING ]Re: related to fixing depreciated api To: Shuah Khan Cc: "open list:KERNEL SELFTEST FRAMEWORK" , lkml Content-Type: multipart/mixed; boundary="000000000000942ce605b6806b4a" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000942ce605b6806b4a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Dec 14, 2020 at 10:12 PM Jeffrin Jose T wrote: > > hello, > > i have worked on to fix depreciated api issue from > tools/testing/selftests/intel_pstate/aerf.c > > i met with the following error related... > > --------------x------------------x-----------------> > $pwd > /home/jeffrin/UP/linux-kselftest/tools/testing/selftests/intel_pstate > $make > gcc -Wall -D_GNU_SOURCE aperf.c /home/jeffrin/UP/linux- > kselftest/tools/testing/selftests/kselftest_harness.h > /home/jeffrin/UP/linux-kselftest/tools/testing/selftests/kselftest.h - > lm -o /home/jeffrin/UP/linux- > kselftest/tools/testing/selftests/intel_pstate/aperf > aperf.c: In function =E2=80=98main=E2=80=99: > aperf.c:58:2: warning: =E2=80=98ftime=E2=80=99 is deprecated [-Wdeprecate= d- > declarations] > 58 | ftime(&before); > | ^~~~~ > In file included from aperf.c:9: > /usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here > 39 | extern int ftime (struct timeb *__timebuf) > | ^~~~~ > aperf.c:67:2: warning: =E2=80=98ftime=E2=80=99 is deprecated [-Wdeprecate= d- > declarations] > 67 | ftime(&after); > | ^~~~~ > In file included from aperf.c:9: > /usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here > 39 | extern int ftime (struct timeb *__timebuf) > | ^~~~~ > $ > ----------------x---------------x----------------------> > > > from ftime manual i found that it is depreciated... > > This function is deprecated, and will be removed in a future version > of the GNU C library. Use clock_gettime(2) instead. > > > now clock_gettime gives new data structure. > > struct timespec { > time_t tv_sec; /* seconds */ > long tv_nsec; /* nanoseconds */ > }; > > > i worked on with the new data structure and some errors that came > along. > typical final output looks good but values of runtime and typical > frequency > does not look normal during "sudo bash run.sh". > > output of "git diff" and a portion of output of "sudo bash run.sh". > is attached. > > > > -- > software engineer > rajagiri school of engineering and technology - autonomous > > --=20 software engineer rajagiri school of engineering and technology --000000000000942ce605b6806b4a Content-Type: text/plain; charset="US-ASCII"; name="diff-or.txt" Content-Disposition: attachment; filename="diff-or.txt" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kipzzvmd0 ZGlmZiAtLWdpdCBhL3Rvb2xzL3Rlc3Rpbmcvc2VsZnRlc3RzL2ludGVsX3BzdGF0ZS9hcGVyZi5j IGIvdG9vbHMvdGVzdGluZy9zZWxmdGVzdHMvaW50ZWxfcHN0YXRlL2FwZXJmLmMKaW5kZXggZjZj ZDAzYTg3NDkzLi43ZTM1ZTc4NzJmMTYgMTAwNjQ0Ci0tLSBhL3Rvb2xzL3Rlc3Rpbmcvc2VsZnRl c3RzL2ludGVsX3BzdGF0ZS9hcGVyZi5jCisrKyBiL3Rvb2xzL3Rlc3Rpbmcvc2VsZnRlc3RzL2lu dGVsX3BzdGF0ZS9hcGVyZi5jCkBAIC02LDcgKzYsNyBAQAogI2luY2x1ZGUgPHN5cy90eXBlcy5o PgogI2luY2x1ZGUgPHN5cy9zdGF0Lmg+CiAjaW5jbHVkZSA8ZmNudGwuaD4KLSNpbmNsdWRlIDxz eXMvdGltZWIuaD4KKyNpbmNsdWRlIDx0aW1lLmg+CiAjaW5jbHVkZSA8c2NoZWQuaD4KICNpbmNs dWRlIDxlcnJuby5oPgogI2luY2x1ZGUgPHN0cmluZy5oPgpAQCAtMjIsMTAgKzIyLDEyIEBAIGlu dCBtYWluKGludCBhcmdjLCBjaGFyICoqYXJndikgewogCWxvbmcgbG9uZyB0c2MsIG9sZF90c2Ms IG5ld190c2M7CiAJbG9uZyBsb25nIGFwZXJmLCBvbGRfYXBlcmYsIG5ld19hcGVyZjsKIAlsb25n IGxvbm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U6ICU0LjJmXG4iLCAxLjAqdG90YWwvMTAw MDAwMCk7IAorCXByaW50ZigiZnJlcTogJTcuMGZcbiIsIHRzYyAvICgxLjAgKiBhcGVyZiAvMS4w ICogKG1wZXJmKSkgLyB0b3RhbCk7CiAJcmV0dXJuIDA7CiB9Cg== --000000000000942ce605b6806b4a Content-Type: text/plain; charset="US-ASCII"; name="shot.txt" Content-Disposition: attachment; filename="shot.txt" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kiq00i4n1 U2V0dGluZyBtYXhpbXVtIGZyZXF1ZW5jeSB0byA1MDAKbGF1bmNoaW5nIGFwZXJmIGxvYWQgb24g MApsYXVuY2hpbmcgYXBlcmYgbG9hZCBvbiAxCmxhdW5jaGluZyBhcGVyZiBsb2FkIG9uIDIKbGF1 bmNoaW5nIGFwZXJmIGxvYWQgb24gMwpzbGVlcGluZyBmb3IgNSBzZWNvbmRzCndhaXRpbmcgZm9y IGpvYiBpZCA3NTIxCnJ1blRpbWU6IDAuMDAKZnJlcTogICAgIGluZgpydW5UaW1lOiAwLjAwCmZy ZXE6ICAgICBpbmYKcnVuVGltZTogMC4wMApmcmVxOiAgICAgaW5mCnJ1blRpbWU6IDAuMDAKZnJl cTogICAgIGluZgp3YWl0aW5nIGZvciBqb2IgaWQgNzUyMgp3YWl0aW5nIGZvciBqb2IgaWQgNzUy Mwp3YWl0aW5nIGZvciBqb2IgaWQgNzUyNApTZXR0aW5nIG1heGltdW0gZnJlcXVlbmN5IHRvIDQw MApsYXVuY2hpbmcgYXBlcmYgbG9hZCBvbiAwCmxhdW5jaGluZyBhcGVyZiBsb2FkIG9uIDEKbGF1 bmNoaW5nIGFwZXJmIGxvYWQgb24gMgpsYXVuY2hpbmcgYXBlcmYgbG9hZCBvbiAzCnNsZWVwaW5n IGZvciA1IHNlY29uZHMKd2FpdGluZyBmb3Igam9iIGlkIDc1NDAKcnVuVGltZTogMC4wMApmcmVx OiAgICAgaW5mCnJ1blRpbWU6IDAuMDAK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JMjMwMDAwCjEyMDAJICAgICAgMTIwMAkgICAgMAkJICAweDQwMAkJMjMwMDAwCjExMDAJICAg ICAgMTEwMAkgICAgMAkJICAweDQwMAkJMjMwMDAwCjEwMDAJICAgICAgOTk5CSAgICAtMQkJICAw eDQwMAkJMjMwMDAwCjkwMAkgICAgICA5MDAJICAgIDAJCSAgMHg0MDAJCTIzMDAwMAo4MDAJICAg ICAgODAwCSAgICAwCQkgIDB4NDAwCQkyMzAwMDAKNzAwCSAgICAgIDcwMAkgICAgMAkJICAweDQw MAkJMjMwMDAwCjYwMAkgICAgICA2MDAJICAgIDAJCSAgMHg0MDAJCTIzMDAwMAo1MDAJICAgICAg NTAwCSAgICAwCQkgIDB4NDAwCQkyMzAwMDAKNDAwCSAgICAgIDQwMAkgICAgMAkJICAw --000000000000942ce605b6806b4a--