From patchwork Tue Jul 11 09:57:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 118399 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp365335vqm; Tue, 11 Jul 2023 03:06:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlEOJNgAd3B1lCDe8z8LRtwApjY8ncH8SfX4XluyjkmDgZ+AWdcALo/qZF8sKkRkRIxOhFgh X-Received: by 2002:a17:906:c2cf:b0:98e:2097:f23e with SMTP id ch15-20020a170906c2cf00b0098e2097f23emr11641885ejb.77.1689069999658; Tue, 11 Jul 2023 03:06:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689069999; cv=none; d=google.com; s=arc-20160816; b=CMk4IZqtoEtN5tDm492aSMXi4KMpciqHlw0wAhMHTjfPb9rgbBIcHgHOh9UOIbJ/6+ 287IxTNM3XjwGZ3uT11mosK9bjkhM+fTciyyJOLkCBDRAHyHVU+xzO1dj5FF1VJQwNkn kPblmx2hjVKfk6mFIQ/dUiigHFASUlgf1D4f3N9ullQiiiD5QcfBCvCSnH+Q6OhNP2bl mhFNkR9pc69swNHpo5cXItaSvP5U0VMODSfcFldHIvTkJo2gnrZyd0c1ypZCfYQr/N7m G4n2rJWTa07DVNwWEnt2lR0TqUP/y7jc/zAQ4cXFk2HyV+bE6jzmdJGpP1Sczwld72Dx M0gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=dEirgnlsbZQfo28/K7OyOLnBUr2xZOrFJhhCphkEJ3g=; fh=GoPf+47+efClFlAFFag1oe9ThSFMIi+bCGMUMZAe96c=; b=pl4woy/1/fmmOarA1OZYnxay2x+cNf6P+sViCESiE5+NTH2qGnBh0J2sdQB7p00cDa A/a2VRo/99T8x6kDIQrL9T4ThbvOceUIyZ3aSHCUNDm6TPNKux7EycItqMC7OuXsQsu4 ZZr2Uq0uyC6OLvbUCeszV3fjgUckqQesxOI6Lw5GDdnhxKOo0pxC1Ukn5ralQO3O2r5e J0McPV1qmDVow0Mii4PQG9HEDN/JqP6XCXLpgiJxc0O1B70m1mbk5c56M/vyAB7RAz62 zJL6yEWKNJc+ezMcAV61Vp5DV/yyzt/7VntnXrO1sol/voXZLKfbekTp5MQAlqZk2IIU HIRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m19-20020a170906849300b0099332c48e49si1649209ejx.133.2023.07.11.03.06.15; Tue, 11 Jul 2023 03:06:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232158AbjGKJ5a (ORCPT + 99 others); Tue, 11 Jul 2023 05:57:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231330AbjGKJ5U (ORCPT ); Tue, 11 Jul 2023 05:57:20 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F0F0912E; Tue, 11 Jul 2023 02:57:13 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8BxpPB4J61kA3YDAA--.9956S3; Tue, 11 Jul 2023 17:57:12 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx3yN2J61kzH4oAA--.9186S3; Tue, 11 Jul 2023 17:57:11 +0800 (CST) From: Tiezhu Yang To: Shuah Khan , Shuah Khan , Thomas Gleixner Cc: linux-kselftest@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: [PATCH v2 1/2] selftests/vDSO: Add support for LoongArch Date: Tue, 11 Jul 2023 17:57:04 +0800 Message-Id: <1689069425-17414-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1689069425-17414-1-git-send-email-yangtiezhu@loongson.cn> References: <1689069425-17414-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf8Bx3yN2J61kzH4oAA--.9186S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoW7Wr48CF1fuF4kXw1DAr1UArc_yoW8JF48pa n7G3s8Kw4xK3Waq3WfJ3s8Ww4YkrZxAFW8tr43W3y3Zr15Awn7Xrs7KFWagFW2939Yqrs5 Ar1Igw4a9F48J3XCm3ZEXasCq-sJn29KB7ZKAUJUUUUx529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUB2b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r126r13M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVWxJr0_GcWln4kS14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12 xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q 6rW5McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64 vIr41lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_ Jr0_Gr1l4IxYO2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8Gjc xK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0 cI8IcVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8V AvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E 14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU4eMKDUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771118263897209925 X-GMAIL-MSGID: 1771118263897209925 There exist the following errors when build vDSO selftests on LoongArch: # make headers && cd tools/testing/selftests/vDSO && make ... error: 'VDSO_VERSION' undeclared (first use in this function) ... error: 'VDSO_NAMES' undeclared (first use in this function) We can see that VDSO_VERSION should be LINUX_5.10 and VDSO_NAMES should be 1 for LoongArch in arch/loongarch/vdso/vdso.lds.S, add them to support LoongArch. Signed-off-by: Tiezhu Yang --- tools/testing/selftests/vDSO/vdso_config.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h index cdfed40..7b543e7 100644 --- a/tools/testing/selftests/vDSO/vdso_config.h +++ b/tools/testing/selftests/vDSO/vdso_config.h @@ -53,15 +53,19 @@ #if __riscv_xlen == 32 #define VDSO_32BIT 1 #endif +#elif defined(__loongarch__) +#define VDSO_VERSION 6 +#define VDSO_NAMES 1 #endif -static const char *versions[6] = { +static const char *versions[7] = { "LINUX_2.6", "LINUX_2.6.15", "LINUX_2.6.29", "LINUX_2.6.39", "LINUX_4", "LINUX_4.15", + "LINUX_5.10" }; static const char *names[2][6] = { From patchwork Tue Jul 11 09:57:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 118402 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp371312vqm; Tue, 11 Jul 2023 03:18:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlGFx+f4VujJWY1DrZkSL0j0lw6jDZvjaBxEUcJV2Mgw9U5yFjAckuPtfK60F0VeMyZgjPew X-Received: by 2002:a17:906:1001:b0:989:1a52:72a1 with SMTP id 1-20020a170906100100b009891a5272a1mr19989908ejm.28.1689070706431; Tue, 11 Jul 2023 03:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689070706; cv=none; d=google.com; s=arc-20160816; b=UkNMrzI3g6FKUKkGMYlLAYx6d2HS58N0gyTpODi4Qm8AHq624f3Y5UJCsVif5mnoOT su6aWwZAnKESU7NmPzlupZ0Z5fvqUZV3cnIEN/dpw7PhQzZajoRskRG7X1zY61tY/1Qd 2GMIXGNkXiLb30sY9rqHJKexFA4cMqhxNghdrWee1bJlgDjdz9MqY1DFvmnhadb584vf mv8nnEirsVuOSTZocT46fZoH42uC0RDsyrvh+QFrkLemSvRczZr0gereqde/rBW5K/jT FQiGQkwY8WLskN0zzV0RfDFwXWIIhkw7yc1kaacu8rHvyP6dTgHlrACJQuOXociaabNf bFGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=9jjx7gxywUoJCyQ1DQWGOh6zCGMLsPM1/lIn7aD94/4=; fh=GoPf+47+efClFlAFFag1oe9ThSFMIi+bCGMUMZAe96c=; b=yKaLdQZb1I0+cobBYLboPFmIGPrKgKeNxrMFwxBrL3X7uGJW0LcZD8gkHbvOWCHe56 BprBaKhRTE2jaXoJYR4lq/cAfNIGYDAFxfsOb5Q8NjdSdbchQnt/ZSQ79HOM3coEgrex BoPpEK2+36sPk6xNDFA7GpZAbIpLLdi/RTIVNvgirQRxD2pSI9ktV6ZOTB0qTThuS6rK UD/OSZeMvo2UZlbyCua/ymZuxpTmdsnYDmv+YsTklmw7t9xraZ9j6YYyaoEXnPoresxy mhQAAqeUUmH5TIW3+UUkYO1q+gsQGYntsozSv1iQDGxBA/wWNnGHjvOohKDiMHWcbiaQ /Ztw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y14-20020a170906070e00b00992aea2c6a1si1566161ejb.542.2023.07.11.03.18.03; Tue, 11 Jul 2023 03:18:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231678AbjGKJ50 (ORCPT + 99 others); Tue, 11 Jul 2023 05:57:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231719AbjGKJ5V (ORCPT ); Tue, 11 Jul 2023 05:57:21 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ED30C100; Tue, 11 Jul 2023 02:57:14 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8DxRvF5J61kCXYDAA--.10244S3; Tue, 11 Jul 2023 17:57:13 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx3yN2J61kzH4oAA--.9186S4; Tue, 11 Jul 2023 17:57:12 +0800 (CST) From: Tiezhu Yang To: Shuah Khan , Shuah Khan , Thomas Gleixner Cc: linux-kselftest@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: [PATCH v2 2/2] selftests/vDSO: Get version and name for all archs Date: Tue, 11 Jul 2023 17:57:05 +0800 Message-Id: <1689069425-17414-3-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1689069425-17414-1-git-send-email-yangtiezhu@loongson.cn> References: <1689069425-17414-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf8Bx3yN2J61kzH4oAA--.9186S4 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoWxuFy5Gw1UAFWkKF1kGF48uFX_yoWrAw13pa n7Kry2kw48tayYgw1Iyw1Dur4rJrn7Ga18Aw48AFW3AF47Zw48JrWDGFyrX3ZxurWvvrs8 u3WFgr4F9aykJagCm3ZEXasCq-sJn29KB7ZKAUJUUUUx529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUB2b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVWxJr0_GcWln4kS14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12 xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q 6rW5McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64 vIr41lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_ Jr0_Gr1l4IxYO2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8Gjc xK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0 cI8IcVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8V AvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E 14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU4Xo7DUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771119005292614111 X-GMAIL-MSGID: 1771119005292614111 It could not find __vdso_getcpu and __vdso_gettimeofday when test getcpu and gettimeofday on LoongArch. # make headers && cd tools/testing/selftests/vDSO && make # ./vdso_test_getcpu Could not find __vdso_getcpu # ./vdso_test_gettimeofday Could not find __vdso_gettimeofday One simple way is to add LoongArch case to define version and name, just like commit d942f231afc0 ("selftests/vDSO: Add riscv getcpu & gettimeofday test"), but it is not the best way. Since each architecture has already defined names and versions in vdso_config.h, it is proper to include vdso_config.h to get version and name for all archs. Signed-off-by: Tiezhu Yang --- tools/testing/selftests/vDSO/vdso_test_getcpu.c | 16 +++++-------- .../selftests/vDSO/vdso_test_gettimeofday.c | 26 ++++++---------------- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/tools/testing/selftests/vDSO/vdso_test_getcpu.c b/tools/testing/selftests/vDSO/vdso_test_getcpu.c index 1df5d05..b758f68 100644 --- a/tools/testing/selftests/vDSO/vdso_test_getcpu.c +++ b/tools/testing/selftests/vDSO/vdso_test_getcpu.c @@ -13,13 +13,7 @@ #include "../kselftest.h" #include "parse_vdso.h" - -#if defined(__riscv) -const char *version = "LINUX_4.15"; -#else -const char *version = "LINUX_2.6"; -#endif -const char *name = "__vdso_getcpu"; +#include "vdso_config.h" struct getcpu_cache; typedef long (*getcpu_t)(unsigned int *, unsigned int *, @@ -27,6 +21,8 @@ typedef long (*getcpu_t)(unsigned int *, unsigned int *, int main(int argc, char **argv) { + const char *version = versions[VDSO_VERSION]; + const char **name = (const char **)&names[VDSO_NAMES]; unsigned long sysinfo_ehdr; unsigned int cpu, node; getcpu_t get_cpu; @@ -40,9 +36,9 @@ int main(int argc, char **argv) vdso_init_from_sysinfo_ehdr(getauxval(AT_SYSINFO_EHDR)); - get_cpu = (getcpu_t)vdso_sym(version, name); + get_cpu = (getcpu_t)vdso_sym(version, name[4]); if (!get_cpu) { - printf("Could not find %s\n", name); + printf("Could not find %s\n", name[4]); return KSFT_SKIP; } @@ -50,7 +46,7 @@ int main(int argc, char **argv) if (ret == 0) { printf("Running on CPU %u node %u\n", cpu, node); } else { - printf("%s failed\n", name); + printf("%s failed\n", name[4]); return KSFT_FAIL; } diff --git a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c index e411f28..ee4f1ca 100644 --- a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c +++ b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c @@ -18,25 +18,13 @@ #include "../kselftest.h" #include "parse_vdso.h" - -/* - * ARM64's vDSO exports its gettimeofday() implementation with a different - * name and version from other architectures, so we need to handle it as - * a special case. - */ -#if defined(__aarch64__) -const char *version = "LINUX_2.6.39"; -const char *name = "__kernel_gettimeofday"; -#elif defined(__riscv) -const char *version = "LINUX_4.15"; -const char *name = "__vdso_gettimeofday"; -#else -const char *version = "LINUX_2.6"; -const char *name = "__vdso_gettimeofday"; -#endif +#include "vdso_config.h" int main(int argc, char **argv) { + const char *version = versions[VDSO_VERSION]; + const char **name = (const char **)&names[VDSO_NAMES]; + unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR); if (!sysinfo_ehdr) { printf("AT_SYSINFO_EHDR is not present!\n"); @@ -47,10 +35,10 @@ int main(int argc, char **argv) /* Find gettimeofday. */ typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); - gtod_t gtod = (gtod_t)vdso_sym(version, name); + gtod_t gtod = (gtod_t)vdso_sym(version, name[0]); if (!gtod) { - printf("Could not find %s\n", name); + printf("Could not find %s\n", name[0]); return KSFT_SKIP; } @@ -61,7 +49,7 @@ int main(int argc, char **argv) printf("The time is %lld.%06lld\n", (long long)tv.tv_sec, (long long)tv.tv_usec); } else { - printf("%s failed\n", name); + printf("%s failed\n", name[0]); return KSFT_FAIL; }