From patchwork Wed Apr 15 09:28:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1271034 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492H9g0Qhbz9sSt for ; Wed, 15 Apr 2020 19:29:10 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 1746F3C2AF5 for ; Wed, 15 Apr 2020 11:29:08 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) by picard.linux.it (Postfix) with ESMTP id 7F9133C2AFE for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id B8FFC1A01190 for ; Wed, 15 Apr 2020 11:28:22 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3C04DAE48; Wed, 15 Apr 2020 09:28:21 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 15 Apr 2020 11:28:02 +0200 Message-Id: <20200415092809.20240-2-pvorel@suse.cz> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200415092809.20240-1-pvorel@suse.cz> References: <20200415092809.20240-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Subject: [LTP] [RFC PATCH 1/8] lib: Fix linking error multiple TCID definitions with -fno-common X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" -fno-common is a default for gcc-10 and if not used on many targets implies a speed and code size penalty on global variable references. It requires either defining variable in header as extern or moving it to C source. https://gcc.gnu.org/gcc-10/porting_to.html Due different TCID handling in legacy API (which defines TCID in the test source) and new API (TCID defined in the library header) it's not enough to simply move that definition into tst_test.c because that would mean that old API test would end up with multiple definitions one in the corresponding test and one in the new library library code. To workaround this added definition in tst_test.c with weak linker attribute. Keeping TCID as extern in tst_test.h is needed because it's used in some new API tests (e.g. CHECK_MFD_NEW() in memfd_create01.c). Suggested-by: Cyril Hrubis Tested-by: Petr Vorel Signed-off-by: Petr Vorel --- include/tst_test.h | 6 ++---- lib/tst_test.c | 5 +++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/tst_test.h b/include/tst_test.h index 42c02b549..fa54f9cde 100644 --- a/include/tst_test.h +++ b/include/tst_test.h @@ -319,9 +319,7 @@ int main(int argc, char *argv[]) #define TST_TEST_TCONF(message) \ static struct tst_test test = { .tconf_msg = message } \ -/* - * This is a hack to make the testcases link without defining TCID - */ -const char *TCID; + +extern const char *TCID; #endif /* TST_TEST_H__ */ diff --git a/lib/tst_test.c b/lib/tst_test.c index e502c2c1a..64cd3ac33 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -32,6 +32,11 @@ #include "old_device.h" #include "old_tmpdir.h" +/* + * Hack to get TCID defined in newlib tests + */ +const char *TCID __attribute__((weak)); + #define LINUX_GIT_URL "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=" #define CVE_DB_URL "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-" From patchwork Wed Apr 15 09:28:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1271031 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492H930rfLz9s71 for ; Wed, 15 Apr 2020 19:28:39 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 387393C2B22 for ; Wed, 15 Apr 2020 11:28:36 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) by picard.linux.it (Postfix) with ESMTP id 6D0723C2AF7 for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id C1C0F1401644 for ; Wed, 15 Apr 2020 11:28:22 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 593A6AE4B; Wed, 15 Apr 2020 09:28:21 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 15 Apr 2020 11:28:03 +0200 Message-Id: <20200415092809.20240-3-pvorel@suse.cz> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200415092809.20240-1-pvorel@suse.cz> References: <20200415092809.20240-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-6.smtp.seeweb.it Subject: [LTP] [RFC PATCH 2/8] controllers: Simplify fullpath definition X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" PATH_MAX has been in in all libc for a long time. Signed-off-by: Petr Vorel --- testcases/kernel/controllers/libcontrollers/libcontrollers.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.h b/testcases/kernel/controllers/libcontrollers/libcontrollers.h index cdde9f9e6..f999f705e 100644 --- a/testcases/kernel/controllers/libcontrollers/libcontrollers.h +++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.h @@ -42,11 +42,7 @@ #include #include -#ifdef PATH_MAX char fullpath[PATH_MAX]; -#else -char fullpath[1024]; /* Guess */ -#endif int FLAG; volatile int timer_expired; From patchwork Wed Apr 15 09:28:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1271033 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492H9S63J5z9sSc for ; Wed, 15 Apr 2020 19:29:00 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id F073C3C2B19 for ; Wed, 15 Apr 2020 11:28:57 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) by picard.linux.it (Postfix) with ESMTP id 6FBED3C2AFC for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id BC533201156 for ; Wed, 15 Apr 2020 11:28:22 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 75325AE47; Wed, 15 Apr 2020 09:28:21 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 15 Apr 2020 11:28:04 +0200 Message-Id: <20200415092809.20240-4-pvorel@suse.cz> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200415092809.20240-1-pvorel@suse.cz> References: <20200415092809.20240-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it Subject: [LTP] [RFC PATCH 3/8] controllers: Fix linking with -fno-common X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" by moving definitions to libcontrollers.c and adding extern declarations to libcontrollers.h. Signed-off-by: Petr Vorel --- .../controllers/cpuctl/cpuctl_def_task01.c | 2 -- .../controllers/cpuctl/cpuctl_def_task02.c | 2 -- .../controllers/cpuctl/cpuctl_def_task03.c | 2 -- .../controllers/cpuctl/cpuctl_def_task04.c | 2 -- .../kernel/controllers/cpuctl/cpuctl_test01.c | 2 -- .../kernel/controllers/cpuctl/cpuctl_test02.c | 1 - .../kernel/controllers/cpuctl/cpuctl_test03.c | 2 -- .../kernel/controllers/cpuctl/cpuctl_test04.c | 2 -- .../libcontrollers/libcontrollers.c | 11 ++++++++ .../libcontrollers/libcontrollers.h | 28 +++++++------------ 10 files changed, 21 insertions(+), 33 deletions(-) diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c index 90119e4ad..578c60c89 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c @@ -81,8 +81,6 @@ extern void cleanup(void) /* Report exit status */ } -volatile int timer_expired = 0; - int main(int argc, char *argv[]) { diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c index dc1546e88..658c6fd3f 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c @@ -76,8 +76,6 @@ extern void cleanup(void) /* Report exit status */ } -volatile int timer_expired = 0; - int main(int argc, char *argv[]) { diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c index 92b451793..a700ca515 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c @@ -76,8 +76,6 @@ extern void cleanup(void) /* Report exit status */ } -volatile int timer_expired = 0; - int main(int argc, char *argv[]) { diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c index 108e576e1..1726f810d 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c @@ -76,8 +76,6 @@ extern void cleanup(void) /* Report exit status */ } -volatile int timer_expired = 0; - int main(int argc, char *argv[]) { diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test01.c b/testcases/kernel/controllers/cpuctl/cpuctl_test01.c index d7be1c80c..8f6d11de0 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_test01.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_test01.c @@ -79,8 +79,6 @@ extern void cleanup(void) tst_exit(); /* Report exit status */ } -volatile int timer_expired = 0; - int main(int argc, char *argv[]) { diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test02.c b/testcases/kernel/controllers/cpuctl/cpuctl_test02.c index 2a5cd4a11..52ad8aa2f 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_test02.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_test02.c @@ -78,7 +78,6 @@ extern void cleanup(void) } int migrate_task(); -volatile int timer_expired = 0; int main(void) { diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test03.c b/testcases/kernel/controllers/cpuctl/cpuctl_test03.c index 8a80d6932..0e0a26dc3 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_test03.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_test03.c @@ -76,8 +76,6 @@ extern void cleanup(void) tst_exit(); /* Report exit status */ } -volatile int timer_expired = 0; - int main(int argc, char *argv[]) { diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test04.c b/testcases/kernel/controllers/cpuctl/cpuctl_test04.c index 791a58dd2..dae0d4c05 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_test04.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_test04.c @@ -77,8 +77,6 @@ extern void cleanup(void) tst_exit(); /* Report exit status */ } -volatile int timer_expired = 0; - int main(int argc, char *argv[]) { diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.c b/testcases/kernel/controllers/libcontrollers/libcontrollers.c index 75766fc19..e9917271c 100644 --- a/testcases/kernel/controllers/libcontrollers/libcontrollers.c +++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.c @@ -35,6 +35,17 @@ #include "libcontrollers.h" +char fullpath[PATH_MAX]; +int FLAG; +volatile int timer_expired = 0; +int retval; +unsigned int num_line; +unsigned int current_shares; +unsigned int total_shares; +unsigned int *shares_pointer; +char target[LINE_MAX]; +struct dirent *dir_pointer; + /* * Function: scan_shares_file() * This function scans all the shares files under the mountpoint diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.h b/testcases/kernel/controllers/libcontrollers/libcontrollers.h index f999f705e..7d7b8324b 100644 --- a/testcases/kernel/controllers/libcontrollers/libcontrollers.h +++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.h @@ -42,24 +42,16 @@ #include #include -char fullpath[PATH_MAX]; - -int FLAG; -volatile int timer_expired; - -int retval; - -unsigned int num_line;//?? - -unsigned int current_shares; - -unsigned int total_shares; - -unsigned int *shares_pointer;//?? - -char target[LINE_MAX]; - -struct dirent *dir_pointer; +extern char fullpath[PATH_MAX]; +extern int FLAG; +extern volatile int timer_expired; +extern int retval; +extern unsigned int num_line; +extern unsigned int current_shares; +extern unsigned int total_shares; +extern unsigned int *shares_pointer; +extern char target[LINE_MAX]; +extern struct dirent *dir_pointer; enum{ GET_SHARES =1, From patchwork Wed Apr 15 09:28:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1271030 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492H8z746Qz9s71 for ; Wed, 15 Apr 2020 19:28:35 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 0BAB83C2B0F for ; Wed, 15 Apr 2020 11:28:25 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) by picard.linux.it (Postfix) with ESMTP id 5FC213C2AF5 for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id CC6DB1A01194 for ; Wed, 15 Apr 2020 11:28:22 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9CE25AE4E; Wed, 15 Apr 2020 09:28:21 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 15 Apr 2020 11:28:05 +0200 Message-Id: <20200415092809.20240-5-pvorel@suse.cz> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200415092809.20240-1-pvorel@suse.cz> References: <20200415092809.20240-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Subject: [LTP] [RFC PATCH 4/8] kernel/mem: Fix linking error with -fno-common X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Adding missing extern. Signed-off-by: Petr Vorel --- testcases/kernel/mem/include/mem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/kernel/mem/include/mem.h b/testcases/kernel/mem/include/mem.h index a12c2231f..cce9c0497 100644 --- a/testcases/kernel/mem/include/mem.h +++ b/testcases/kernel/mem/include/mem.h @@ -37,7 +37,7 @@ static inline void clean_node(unsigned long *array) #define MLOCK 2 #define KSM 3 -long overcommit; +extern long overcommit; void oom(int testcase, int lite, int retcode, int allow_sigkill); void testoom(int mempolicy, int lite, int retcode, int allow_sigkill); From patchwork Wed Apr 15 09:28:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1271038 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492HBR1sp9z9s71 for ; Wed, 15 Apr 2020 19:29:51 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id A0F8D3C2B28 for ; Wed, 15 Apr 2020 11:29:48 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) by picard.linux.it (Postfix) with ESMTP id F2C213C2AF5 for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 754FC1A01183 for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B1458AE5A; Wed, 15 Apr 2020 09:28:21 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 15 Apr 2020 11:28:06 +0200 Message-Id: <20200415092809.20240-6-pvorel@suse.cz> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200415092809.20240-1-pvorel@suse.cz> References: <20200415092809.20240-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Subject: [LTP] [RFC PATCH 5/8] hugepage: Fix linking error with -fno-common X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" by moving definitions to tst_hugepage.c and adding extern declarations to tst_hugepage.h. Fixes: 156f91396 ("hugetlb: move nr_opt to tst_hugepage.h") Signed-off-by: Petr Vorel --- include/tst_hugepage.h | 4 ++-- lib/tst_hugepage.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/tst_hugepage.h b/include/tst_hugepage.h index 30e00a377..60c03c5c5 100644 --- a/include/tst_hugepage.h +++ b/include/tst_hugepage.h @@ -9,8 +9,8 @@ #define PATH_HUGEPAGES "/sys/kernel/mm/hugepages/" #define PATH_NR_HPAGES "/proc/sys/vm/nr_hugepages" -char *nr_opt; /* -s num Set the number of the been allocated hugepages */ -char *Hopt; /* -H /.. Location of hugetlbfs, i.e. -H /var/hugetlbfs */ +extern char *nr_opt; /* -s num Set the number of the been allocated hugepages */ +extern char *Hopt; /* -H /.. Location of hugetlbfs, i.e. -H /var/hugetlbfs */ /* * Try the best to request a specified number of huge pages from system, diff --git a/lib/tst_hugepage.c b/lib/tst_hugepage.c index 34fd27ede..52667a14e 100644 --- a/lib/tst_hugepage.c +++ b/lib/tst_hugepage.c @@ -9,6 +9,8 @@ #include "tst_hugepage.h" unsigned long tst_hugepages; +char *nr_opt; +char *Hopt; unsigned long tst_request_hugepages(unsigned long hpages) { From patchwork Wed Apr 15 09:28:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1271035 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492H9r6P62z9s71 for ; Wed, 15 Apr 2020 19:29:20 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id F36AE3C2AF6 for ; Wed, 15 Apr 2020 11:29:17 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) by picard.linux.it (Postfix) with ESMTP id B03B53C2AF5 for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 761611A0118E for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CC11FAE61; Wed, 15 Apr 2020 09:28:21 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 15 Apr 2020 11:28:07 +0200 Message-Id: <20200415092809.20240-7-pvorel@suse.cz> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200415092809.20240-1-pvorel@suse.cz> References: <20200415092809.20240-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Subject: [LTP] [RFC PATCH 6/8] hugetlb: Fix linking error with -fno-common X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Adding missing extern. Signed-off-by: Petr Vorel --- testcases/kernel/mem/hugetlb/lib/hugetlb.c | 2 ++ testcases/kernel/mem/hugetlb/lib/hugetlb.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/mem/hugetlb/lib/hugetlb.c b/testcases/kernel/mem/hugetlb/lib/hugetlb.c index cd1b27eb3..4bb2d500e 100644 --- a/testcases/kernel/mem/hugetlb/lib/hugetlb.c +++ b/testcases/kernel/mem/hugetlb/lib/hugetlb.c @@ -39,6 +39,8 @@ #include #include "hugetlb.h" +key_t shmkey; + /* * getipckey() - generates and returns a message key used by the "get" * calls to create an IPC resource. diff --git a/testcases/kernel/mem/hugetlb/lib/hugetlb.h b/testcases/kernel/mem/hugetlb/lib/hugetlb.h index 88890ebfb..f75109f3e 100644 --- a/testcases/kernel/mem/hugetlb/lib/hugetlb.h +++ b/testcases/kernel/mem/hugetlb/lib/hugetlb.h @@ -34,7 +34,7 @@ */ #define MODE_MASK 0x01FF -key_t shmkey; /* an IPC key generated by ftok() */ +extern key_t shmkey; /* an IPC key generated by ftok() */ int getipckey(void); int getuserid(char *user); From patchwork Wed Apr 15 09:28:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1271036 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492HB36HJ5z9s71 for ; Wed, 15 Apr 2020 19:29:31 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id F24A93C2AFE for ; Wed, 15 Apr 2020 11:29:28 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) by picard.linux.it (Postfix) with ESMTP id C17BE3C2AF6 for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 7F623140162F for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EA0B5AE57; Wed, 15 Apr 2020 09:28:21 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 15 Apr 2020 11:28:08 +0200 Message-Id: <20200415092809.20240-8-pvorel@suse.cz> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200415092809.20240-1-pvorel@suse.cz> References: <20200415092809.20240-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-6.smtp.seeweb.it Subject: [LTP] [RFC PATCH 7/8] realtime: Fix linking error with -fno-common X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" by declaring iters_per_us as static and moving from header into C source. Signed-off-by: Petr Vorel --- testcases/realtime/include/librttest.h | 1 - testcases/realtime/lib/librttest.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/realtime/include/librttest.h b/testcases/realtime/include/librttest.h index c18236200..b829f4089 100644 --- a/testcases/realtime/include/librttest.h +++ b/testcases/realtime/include/librttest.h @@ -66,7 +66,6 @@ extern char *optarg; #define _MAXTHREADS 256 #define CALIBRATE_LOOPS 100000 -unsigned long iters_per_us; #define NS_PER_MS 1000000 #define NS_PER_US 1000 diff --git a/testcases/realtime/lib/librttest.c b/testcases/realtime/lib/librttest.c index 36790581e..722d99d50 100644 --- a/testcases/realtime/lib/librttest.c +++ b/testcases/realtime/lib/librttest.c @@ -63,6 +63,7 @@ static LIST_HEAD(_threads); static atomic_t _thread_count = { -1 }; +static unsigned long iters_per_us; pthread_mutex_t _buffer_mutex; char *_print_buffer = NULL; From patchwork Wed Apr 15 09:28:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1271037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492HBF5sZKz9s71 for ; Wed, 15 Apr 2020 19:29:41 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id C91093C2B0C for ; Wed, 15 Apr 2020 11:29:38 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) by picard.linux.it (Postfix) with ESMTP id C245B3C2AF7 for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 7EE04140162B for ; Wed, 15 Apr 2020 11:28:23 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 28835AE63; Wed, 15 Apr 2020 09:28:22 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 15 Apr 2020 11:28:09 +0200 Message-Id: <20200415092809.20240-9-pvorel@suse.cz> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200415092809.20240-1-pvorel@suse.cz> References: <20200415092809.20240-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-6.smtp.seeweb.it Subject: [LTP] [RFC PATCH 8/8] travis: Build with -fno-common X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" This is the default with gcc-10, but use it with all compilers. Signed-off-by: Petr Vorel --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index e3d268c83..50fb527e4 100755 --- a/build.sh +++ b/build.sh @@ -9,7 +9,7 @@ set -e -CFLAGS="${CFLAGS:--Werror=implicit-function-declaration}" +CFLAGS="${CFLAGS:--Werror=implicit-function-declaration -fno-common}" CC="${CC:-gcc}" DEFAULT_PREFIX="$HOME/ltp-install"