CVS commit: src/tests/modules
Module Name:src Committed By: nia Date: Wed Mar 1 21:08:38 UTC 2023 Modified Files: src/tests/modules: t_klua_pr_52864.sh Log Message: delete attribution per request of contributor To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/modules/t_klua_pr_52864.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/modules
Module Name:src Committed By: nia Date: Wed Mar 1 21:08:38 UTC 2023 Modified Files: src/tests/modules: t_klua_pr_52864.sh Log Message: delete attribution per request of contributor To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/modules/t_klua_pr_52864.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/modules/t_klua_pr_52864.sh diff -u src/tests/modules/t_klua_pr_52864.sh:1.2 src/tests/modules/t_klua_pr_52864.sh:1.3 --- src/tests/modules/t_klua_pr_52864.sh:1.2 Tue Jan 9 15:16:02 2018 +++ src/tests/modules/t_klua_pr_52864.sh Wed Mar 1 21:08:38 2023 @@ -1,12 +1,9 @@ #! /usr/bin/atf-sh -# $NetBSD: t_klua_pr_52864.sh,v 1.2 2018/01/09 15:16:02 martin Exp $ +# $NetBSD: t_klua_pr_52864.sh,v 1.3 2023/03/01 21:08:38 nia Exp $ # # Copyright (c) 2018 The NetBSD Foundation, Inc. # All rights reserved. # -# This code is derived from software contributed to The NetBSD Foundation -# by Sevan Janiyan -# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met:
CVS commit: src/tests/modules/x86_pte_tester
Module Name:src Committed By: mlelstv Date: Sun Aug 21 14:06:42 UTC 2022 Modified Files: src/tests/modules/x86_pte_tester: x86_pte_tester.c Log Message: requires pmap_private.h now. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/modules/x86_pte_tester/x86_pte_tester.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/modules/x86_pte_tester/x86_pte_tester.c diff -u src/tests/modules/x86_pte_tester/x86_pte_tester.c:1.2 src/tests/modules/x86_pte_tester/x86_pte_tester.c:1.3 --- src/tests/modules/x86_pte_tester/x86_pte_tester.c:1.2 Sun Apr 26 11:56:38 2020 +++ src/tests/modules/x86_pte_tester/x86_pte_tester.c Sun Aug 21 14:06:42 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: x86_pte_tester.c,v 1.2 2020/04/26 11:56:38 maxv Exp $ */ +/* $NetBSD: x86_pte_tester.c,v 1.3 2022/08/21 14:06:42 mlelstv Exp $ */ /* * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -40,6 +40,7 @@ #if defined(__x86_64__) # include +# include # define NLEVEL 4 #else # error "Unsupported configuration"
CVS commit: src/tests/modules/x86_pte_tester
Module Name:src Committed By: mlelstv Date: Sun Aug 21 14:06:42 UTC 2022 Modified Files: src/tests/modules/x86_pte_tester: x86_pte_tester.c Log Message: requires pmap_private.h now. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/modules/x86_pte_tester/x86_pte_tester.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/tests/modules
On 22.02.2020 15:54, Paul Goyette wrote: > On Sat, 22 Feb 2020, Kamil Rytarowski wrote: > > While there, it would be good to implement modctl(MODCTL_MODSTAT, > &modstat) to check whether a specific module is loaded into the kernel > and retrieve modstat_t describing it. > > modstat_t m; > strlcpy(&m.ms_name, "haxm", MAXMODNAME); > if (modctl(MODCTL_MODSTAT, &modstat) == -1) > err(EXIT_FAILURE, "modctl: haxm"); > > I have got use-cases for these checks and I envision their wider usage > in future. We already have 3 use-cases in ATF tests. I can probably do this fairly quickly. But I'll have to look closer at the argument/result passing, especially WRT the module's list of "required" modules. >>> >>> Thinking a bit more, it's probably easiest just to retrieve the entire >>> list of modules with modctl(MODCTL_STAT, ...) and then scan the returned >>> list and compare against ms_name, as is done in modstat(8). >>> >>> Before I invest much time in this, I'd appreciate other opinions on >>> whether a new option is necessary/desirable. >>> >>> >> >> Performance is probably not critical so it sounds fine. >> >> I would like to have at least get_modstat_info() from t_modctl.c in >> libutil. > > Sure that seems reasonable to me. > > Assuming that noone else objects, please feel free to move it. I > think we should also update the test program to use the new libutil > version (rather than duplicating the code). Also update the libutil > man page? > > I guess that the return type of get_modstat_info() should be changed > to int rather than bool? And that it shouldn't directly print error > messages? :) > > I will do it and share a patch. signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/tests/modules
On Sat, 22 Feb 2020, Kamil Rytarowski wrote: While there, it would be good to implement modctl(MODCTL_MODSTAT, &modstat) to check whether a specific module is loaded into the kernel and retrieve modstat_t describing it. modstat_t m; strlcpy(&m.ms_name, "haxm", MAXMODNAME); if (modctl(MODCTL_MODSTAT, &modstat) == -1) err(EXIT_FAILURE, "modctl: haxm"); I have got use-cases for these checks and I envision their wider usage in future. We already have 3 use-cases in ATF tests. I can probably do this fairly quickly.?? But I'll have to look closer at the argument/result passing, especially WRT the module's list of "required" modules. Thinking a bit more, it's probably easiest just to retrieve the entire list of modules with modctl(MODCTL_STAT, ...) and then scan the returned list and compare against ms_name, as is done in modstat(8). Before I invest much time in this, I'd appreciate other opinions on whether a new option is necessary/desirable. Performance is probably not critical so it sounds fine. I would like to have at least get_modstat_info() from t_modctl.c in libutil. Sure that seems reasonable to me. Assuming that noone else objects, please feel free to move it. I think we should also update the test program to use the new libutil version (rather than duplicating the code). Also update the libutil man page? I guess that the return type of get_modstat_info() should be changed to int rather than bool? And that it shouldn't directly print error messages? :) ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+
Re: CVS commit: src/tests/modules
On 22.02.2020 15:32, Paul Goyette wrote: > On Sat, 22 Feb 2020, Paul Goyette wrote: > >>> While there, it would be good to implement modctl(MODCTL_MODSTAT, >>> &modstat) to check whether a specific module is loaded into the kernel >>> and retrieve modstat_t describing it. >>> >>> modstat_t m; >>> strlcpy(&m.ms_name, "haxm", MAXMODNAME); >>> if (modctl(MODCTL_MODSTAT, &modstat) == -1) >>> err(EXIT_FAILURE, "modctl: haxm"); >>> >>> I have got use-cases for these checks and I envision their wider usage >>> in future. We already have 3 use-cases in ATF tests. >> >> I can probably do this fairly quickly. But I'll have to look closer >> at the argument/result passing, especially WRT the module's list of >> "required" modules. > > Thinking a bit more, it's probably easiest just to retrieve the entire > list of modules with modctl(MODCTL_STAT, ...) and then scan the returned > list and compare against ms_name, as is done in modstat(8). > > Before I invest much time in this, I'd appreciate other opinions on > whether a new option is necessary/desirable. > > Performance is probably not critical so it sounds fine. I would like to have at least get_modstat_info() from t_modctl.c in libutil. signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/tests/modules
On Sat, 22 Feb 2020, Paul Goyette wrote: While there, it would be good to implement modctl(MODCTL_MODSTAT, &modstat) to check whether a specific module is loaded into the kernel and retrieve modstat_t describing it. modstat_t m; strlcpy(&m.ms_name, "haxm", MAXMODNAME); if (modctl(MODCTL_MODSTAT, &modstat) == -1) err(EXIT_FAILURE, "modctl: haxm"); I have got use-cases for these checks and I envision their wider usage in future. We already have 3 use-cases in ATF tests. I can probably do this fairly quickly. But I'll have to look closer at the argument/result passing, especially WRT the module's list of "required" modules. Thinking a bit more, it's probably easiest just to retrieve the entire list of modules with modctl(MODCTL_STAT, ...) and then scan the returned list and compare against ms_name, as is done in modstat(8). Before I invest much time in this, I'd appreciate other opinions on whether a new option is necessary/desirable. ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+
Re: CVS commit: src/tests/modules
On Sat, 22 Feb 2020, Kamil Rytarowski wrote: I have got no opinion. Please rearrange the directories as needed. It's too much bother for now to move things around. But for future changes it would be good to put new "helper" modules in the same area as the tests being helped. While there, it would be good to implement modctl(MODCTL_MODSTAT, &modstat) to check whether a specific module is loaded into the kernel and retrieve modstat_t describing it. modstat_t m; strlcpy(&m.ms_name, "haxm", MAXMODNAME); if (modctl(MODCTL_MODSTAT, &modstat) == -1) err(EXIT_FAILURE, "modctl: haxm"); I have got use-cases for these checks and I envision their wider usage in future. We already have 3 use-cases in ATF tests. I can probably do this fairly quickly. But I'll have to look closer at the argument/result passing, especially WRT the module's list of "required" modules. ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+
Re: CVS commit: src/tests/modules
I have got no opinion. Please rearrange the directories as needed. While there, it would be good to implement modctl(MODCTL_MODSTAT, &modstat) to check whether a specific module is loaded into the kernel and retrieve modstat_t describing it. modstat_t m; strlcpy(&m.ms_name, "haxm", MAXMODNAME); if (modctl(MODCTL_MODSTAT, &modstat) == -1) err(EXIT_FAILURE, "modctl: haxm"); I have got use-cases for these checks and I envision their wider usage in future. We already have 3 use-cases in ATF tests. On 22.02.2020 04:41, Paul Goyette wrote: > OK, I over-reacted and didn't completely read the original commit > message. > > The t_builtin.c stuff is indeed a test-of-module-functionality > so it does belong here. > > But some of the other stuff here does not belong, such as the > threadpool, fetchstore, and kcov stuff. As far as I can see, > those all belong somewhere else, probably in the tests/sys/... > hierarchy. > > Anyway, my apologies for over-reacting to this commit. And > thanks to riastradh@ for pointing this out (on IRC). > > > > On Fri, 21 Feb 2020, Paul Goyette wrote: > >> Really, the tests/modules directory should be only used for tests-that- >> relate-to-module-functionality. It should NOT be used for modules- >> that-support-tests-of-other-functionality. >> >> In the future, please do not put support modules here; put them in the >> samae place as the tests that they support. >> >> >> On Sat, 22 Feb 2020, Kamil Rytarowski wrote: >> >>> Module Name: src >>> Committed By: kamil >>> Date: Sat Feb 22 00:18:55 UTC 2020 >>> >>> Modified Files: >>> src/tests/modules: t_builtin.c >>> >>> Log Message: >>> Avoid undefined behavior in disabledstat >>> >>> t_builtin.c:174:16, member access within misaligned address >>> 0x741271c25004 >>> for type 'struct modstat_t' >>> >>> t_builtin.c:175:4, member access within misaligned address >>> 0x741271c251c4 >>> for type 'struct modstat_t' >>> >>> >>> To generate a diff of this commit: >>> cvs rdiff -u -r1.4 -r1.5 src/tests/modules/t_builtin.c >>> >>> Please note that diffs are not public domain; they are subject to the >>> copyright notices on the relevant files. >>> >>> >>> !DSPAM:5e5073af66043393299806! >>> >>> >> >> ++--+---+ >> | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | >> | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | >> | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | >> ++--+---+ >> > > ++--+---+ > | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | > | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | > | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | > ++--+---+ signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/tests/modules
OK, I over-reacted and didn't completely read the original commit message. The t_builtin.c stuff is indeed a test-of-module-functionality so it does belong here. But some of the other stuff here does not belong, such as the threadpool, fetchstore, and kcov stuff. As far as I can see, those all belong somewhere else, probably in the tests/sys/... hierarchy. Anyway, my apologies for over-reacting to this commit. And thanks to riastradh@ for pointing this out (on IRC). On Fri, 21 Feb 2020, Paul Goyette wrote: Really, the tests/modules directory should be only used for tests-that- relate-to-module-functionality. It should NOT be used for modules- that-support-tests-of-other-functionality. In the future, please do not put support modules here; put them in the samae place as the tests that they support. On Sat, 22 Feb 2020, Kamil Rytarowski wrote: Module Name:src Committed By: kamil Date: Sat Feb 22 00:18:55 UTC 2020 Modified Files: src/tests/modules: t_builtin.c Log Message: Avoid undefined behavior in disabledstat t_builtin.c:174:16, member access within misaligned address 0x741271c25004 for type 'struct modstat_t' t_builtin.c:175:4, member access within misaligned address 0x741271c251c4 for type 'struct modstat_t' To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/modules/t_builtin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. !DSPAM:5e5073af66043393299806! ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+ ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+
Re: CVS commit: src/tests/modules
Really, the tests/modules directory should be only used for tests-that- relate-to-module-functionality. It should NOT be used for modules- that-support-tests-of-other-functionality. In the future, please do not put support modules here; put them in the samae place as the tests that they support. On Sat, 22 Feb 2020, Kamil Rytarowski wrote: Module Name:src Committed By: kamil Date: Sat Feb 22 00:18:55 UTC 2020 Modified Files: src/tests/modules: t_builtin.c Log Message: Avoid undefined behavior in disabledstat t_builtin.c:174:16, member access within misaligned address 0x741271c25004 for type 'struct modstat_t' t_builtin.c:175:4, member access within misaligned address 0x741271c251c4 for type 'struct modstat_t' To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/modules/t_builtin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. !DSPAM:5e5073af66043393299806! ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+
Re: CVS commit: src/tests/modules
On Tue, Apr 17, 2012 at 03:35:07PM +0300, Jukka Ruohonen wrote: > On Tue, Apr 17, 2012 at 12:59:25PM +0200, Joerg Sonnenberger wrote: > > On Tue, Apr 17, 2012 at 06:23:52AM +, Jukka Ruohonen wrote: > > > Module Name: src > > > Committed By: jruoho > > > Date: Tue Apr 17 06:23:52 UTC 2012 > > > > > > Modified Files: > > > src/tests/modules: t_modctl.c > > > > > > Log Message: > > > Avoid zero-length format string. > > > > This shouldn't be needed, -Wno-format-zero-length should take care of > > it. > > Hmm. The change reverted: > > $ cd /usr/src/tests/modules > $ make > cc1: warnings being treated as errors > t_modctl.c: In function 'atfu_cmd_load_body': > t_modctl.c:297:2: error: zero-length gnu_printf format string > *** Error code 1 Are you sure that your /usr/share/mk is up-to-date? Joerg
Re: CVS commit: src/tests/modules
On Tue, Apr 17, 2012 at 12:59:25PM +0200, Joerg Sonnenberger wrote: > On Tue, Apr 17, 2012 at 06:23:52AM +, Jukka Ruohonen wrote: > > Module Name:src > > Committed By: jruoho > > Date: Tue Apr 17 06:23:52 UTC 2012 > > > > Modified Files: > > src/tests/modules: t_modctl.c > > > > Log Message: > > Avoid zero-length format string. > > This shouldn't be needed, -Wno-format-zero-length should take care of > it. Hmm. The change reverted: $ cd /usr/src/tests/modules $ make cc1: warnings being treated as errors t_modctl.c: In function 'atfu_cmd_load_body': t_modctl.c:297:2: error: zero-length gnu_printf format string *** Error code 1 - Jukka.
Re: CVS commit: src/tests/modules
On Tue, Apr 17, 2012 at 06:23:52AM +, Jukka Ruohonen wrote: > Module Name: src > Committed By: jruoho > Date: Tue Apr 17 06:23:52 UTC 2012 > > Modified Files: > src/tests/modules: t_modctl.c > > Log Message: > Avoid zero-length format string. This shouldn't be needed, -Wno-format-zero-length should take care of it. Joerg