ticket #3889
Hello, Last year I tried to do work and help to contribute to RTEMS. I didn't get too far but now I think I now I have a better shot at it! I was able to complete the BSP and tools build, and run the hello world examples. I want to work on small tickets first and work my way into the source code. The ticket is asking for a test clock_create with clock monotonic. here is the link for the ticket I'm referring to https://devel.rtems.org/ticket/3889 .My thinking is to look for code that does something similar. In the ticket it says that there is a test with clock_realtime. I was on the discord and someone suggested me to looking to the coverage tests. How come i don't see the function clock_create when looking at the annotated assembly code? Also I think the test should be based on this https://git.rtems.org/rtems/tree/testsuites/psxtests/psxtimer02/psxtimer.c Thanks Zack___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Fw: Re: ticket #3889
I found a part of the assembly that says that the path is not called. if ( ( flags & POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC ) != 0 ) { 40005594: 12 80 00 39 bne 40005678 <_POSIX_Condition_variables_Wait_support+0x118> <== NEVER TAKEN 40005598: f4 27 bf e8 st %i2, [ %fp + -24 ] So if i'm correct The BSP supports this fuction of CLOCK_Monotonic (because the assembly is archetcture specific)? Which means that there is a need for the test I assume? Also does leon= the same as the bsp erc32-sis (or the one in the tutorial) Zack Sent with [ProtonMail](https://protonmail.com) Secure Email. ‐‐‐ Original Message ‐‐‐ On Saturday, March 27, 2021 7:50 PM, Joel Sherrill wrote: > On Sat, Mar 27, 2021 at 2:33 PM zack_on_the_speed_chanel > wrote: > >> Hello, >> Last year I tried to do work and help to contribute to RTEMS. I didn't get >> too far but now I think I now I have a better shot at it! I was able to >> complete the BSP and tools build, and run the hello world examples. I want >> to work on small tickets first and work my way into the source code. The >> ticket is asking for a test clock_create with clock monotonic. here is the >> link for the ticket I'm referring to https://devel.rtems.org/ticket/3889 .My >> thinking is to look for code that does something similar. In the ticket it >> says that there is a test with clock_realtime. I was on the discord and >> someone suggested me to looking to the coverage tests. How come i don't see >> the function clock_create when looking at the annotated assembly code? Also >> I think the test should be based on this >> https://git.rtems.org/rtems/tree/testsuites/psxtests/psxtimer02/psxtimer.c > > That was me on Discord. :) > > Yep. psxtimer02 is a good test to start from since it is doing similar cases > on a different clock. > > The coverage I was suggesting to look at is here: > > https://ftp.rtems.org/pub/rtems/people/joel/coverage/coverage-2021-02-28/ > > Drill down to leon3 and posix and look at the timer methods (create, settime, > gettime) for current coverage. > > But I warn you, it may or may not actually support the CLOCK_REALTIME and > CLOCK_MONOTONIC as required here: > > https://pubs.opengroup.org/onlinepubs/9699919799/functions/timer_create.html > > So coverage may be high because the implementation of the posix methods > themselves are missing something. > > Pull the thread a bit to see if the methods support the clock value in > question. If so, we just need tests. If not, some code gets added to the > timer manager and tests get added. > > --joel > >> Thanks >> Zack >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Fw: Re: ticket #3889
with the -rtems-test=Yes when you build the bsp? Sent with [ProtonMail](https://protonmail.com) Secure Email. ‐‐‐ Original Message ‐‐‐ On Sunday, March 28, 2021 12:37 AM, Joel Sherrill wrote: > Did you enable all the tests and try to run it before you made modifications? > > On Sat, Mar 27, 2021, 7:35 PM zack_on_the_speed_chanel > wrote: > >> What file do i have to check in ? I thought posix was a standard so the code >> is platform agnostic? Is there code specific to the BSP? Also I tried to >> modify the psxtimer02 test file and change it the clock_monotonic to see >> what happens but when i run ./waf it does not reflect the changes I have >> made. I don't see a corresponding executable in >> /quick-start/src/rtems/build/sparc/erc32/testsuites/psxtests >> >> Thanks >> Zack >> >> Sent with [ProtonMail](https://protonmail.com) Secure Email. >> >> ‐‐‐ Original Message ‐‐‐ >> On Saturday, March 27, 2021 9:22 PM, Joel Sherrill wrote: >> >>> On Sat, Mar 27, 2021, 3:52 PM zack_on_the_speed_chanel >>> wrote: >>> >>>> I found a part of the assembly that says that the path is not called. >>>> >>>> if ( ( flags & POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC ) != 0 ) { >>>> >>>> 40005594: 12 80 00 39 bne 40005678 >>>> <_POSIX_Condition_variables_Wait_support+0x118> <== NEVER TAKEN >>>> >>>> 40005598: f4 27 bf e8 st %i2, [ %fp + -24 ] >>>> >>>> So if i'm correct The BSP supports this fuction of CLOCK_Monotonic >>>> (because the assembly is archetcture specific)? Which means that there is >>>> a need for the test I assume? >>>> >>>> Also does leon= the same as the bsp erc32-sis (or the one in the >>>> tutorial) >>> >>> Please read the original source to confirm but I think you're right but it >>> supports it but doesn't have a test. >>> >>> The ERC32 what's the first space hardened sparc processor. The leon3 is a >>> later processor in the same family. Both use the same build of GCC and are >>> just different bsps. In fact both run on the same sis simulator. It's just >>> that a user starting today on a mission, is more likely to use the Leon3. >>> The leon3 also can support SMP >>> >>>> Zack >>>> >>>> Sent with [ProtonMail](https://protonmail.com) Secure Email. >>>> >>>> ‐‐‐ Original Message ‐‐‐ >>>> On Saturday, March 27, 2021 7:50 PM, Joel Sherrill wrote: >>>> >>>>> On Sat, Mar 27, 2021 at 2:33 PM zack_on_the_speed_chanel >>>>> wrote: >>>>> >>>>>> Hello, >>>>>> Last year I tried to do work and help to contribute to RTEMS. I didn't >>>>>> get too far but now I think I now I have a better shot at it! I was able >>>>>> to complete the BSP and tools build, and run the hello world examples. I >>>>>> want to work on small tickets first and work my way into the source >>>>>> code. The ticket is asking for a test clock_create with clock monotonic. >>>>>> here is the link for the ticket I'm referring to >>>>>> https://devel.rtems.org/ticket/3889 .My thinking is to look for code >>>>>> that does something similar. In the ticket it says that there is a test >>>>>> with clock_realtime. I was on the discord and someone suggested me to >>>>>> looking to the coverage tests. How come i don't see the function >>>>>> clock_create when looking at the annotated assembly code? Also I think >>>>>> the test should be based on this >>>>>> https://git.rtems.org/rtems/tree/testsuites/psxtests/psxtimer02/psxtimer.c >>>>> >>>>> That was me on Discord. :) >>>>> >>>>> Yep. psxtimer02 is a good test to start from since it is doing similar >>>>> cases on a different clock. >>>>> >>>>> The coverage I was suggesting to look at is here: >>>>> >>>>> https://ftp.rtems.org/pub/rtems/people/joel/coverage/coverage-2021-02-28/ >>>>> >>>>> Drill down to leon3 and posix and look at the timer methods (create, >>>>> settime, gettime) for current coverage. >>>>> >>>>> But I warn you, it may or may not actually support the CLOCK_REALTIME and >>>>> CLOCK_MONOTONIC as required here: >>>>> >>>>> https://pubs.opengroup.org/onlinepubs/9699919799/functions/timer_create.html >>>>> >>>>> So coverage may be high because the implementation of the posix methods >>>>> themselves are missing something. >>>>> >>>>> Pull the thread a bit to see if the methods support the clock value in >>>>> question. If so, we just need tests. If not, some code gets added to the >>>>> timer manager and tests get added. >>>>> >>>>> --joel >>>>> >>>>>> Thanks >>>>>> Zack >>>>>> >>>>>> ___ >>>>>> devel mailing list >>>>>> devel@rtems.org >>>>>> http://lists.rtems.org/mailman/listinfo/devel >>>> >>>> ___ >>>> devel mailing list >>>> devel@rtems.org >>>> http://lists.rtems.org/mailman/listinfo/devel___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Ticket#3889 updated
Hello all, I'm updating on what' i've found out with the issue (forgot to reply all) . Joel recommended me check the coverage for the leon BSP( to check if it's supported) and i found that the branch with CLOCK_MONOTONIC was not reached I think now that it's supported (because the annotated assembly is in the sparc instruction set). I also found out that the test would be similar to Psxclock02 and it runs the same tests on a different clock. Then I tried to build the psxclock02 test , change the create_clock to have the clock_monotonic argument and i didn't see the executable or any change in the ./waf build. Then I was suggested that you have to enable all tests some how? How do i enable all tests? Thanks Zack___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Ticket#3889 updated
Sorry that assumption was very native of me that i didn't have a working baseline. Joel said that the erc32 was similar to the leon bsp " The ERC32 what's the first space hardened sparc processor. The leon3 is a later processor in the same family. Both use the same build of GCC and are just different bsps. In fact both run on the same sis simulator. " I also though that the bsps were the same and I can work on the issue with only the erc32 BSP. I have one more question: when i run the hello world test. All the test files are within one specific directory and I don't see the executables for specific bsps that's why i thought all tests would be built (there would not be any specific considerations for bsps) . Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Monday, March 29, 2021 2:45 PM, Gedare Bloom wrote: > On Sun, Mar 28, 2021 at 1:26 PM zack_on_the_speed_chanel > zack_on_the_speed_cha...@protonmail.ch wrote: > > > Hello all, > > I'm updating on what' i've found out with the issue (forgot to reply all) . > > Joel recommended me check the coverage for the leon BSP( to check if it's > > supported) and i found that the branch with CLOCK_MONOTONIC was not reached > > I think now that it's supported (because the annotated assembly is in the > > sparc instruction set). I also found out that the test would be similar to > > Psxclock02 and it runs the same tests on a different clock. Then I tried to > > build the psxclock02 test , change the create_clock to have the > > clock_monotonic argument and i didn't see the executable or any change in > > the ./waf build. Then I was suggested that you have to enable all tests > > some how? How do i enable all tests? > > Do you use something like: ./waf bsp_defaults ---rtems-bsp=leon3 > config.ini > > Then, take a look, BUILD_TESTS and BUILD_PSXTESTS are two options that > if either is True it should build psxclock02. > > When you write code, you should first make sure you can build the code > as it exists if it is supposed to work, and run it to see that it > works. Then you should make changes from a working baseline. Otherwise > when you get a problem, how do you know if the problem is your > problem, or it already existed? > > > Thanks > > Zack > > > > devel mailing list > > devel@rtems.org > > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Ticket#3889 updated
I did build the leon3 bsp and I still don't see the psxtimer02 as an executable. Is there a way build a test from source? I have the sources for psxtest02. Also i'm thinking that it could be due to the fact that i don't have posix tests enabled. Is there a way that to enable posix? Thanks Zack Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Monday, March 29, 2021 8:11 PM, zack_on_the_speed_chanel wrote: > Sorry that assumption was very native of me that i didn't have a working > baseline. Joel said that the erc32 was similar to the leon bsp > > " > The ERC32 what's the first space hardened sparc processor. The leon3 is a > later processor in the same family. Both use the same build of GCC and are > just different bsps. In fact both run on the same sis simulator. " > I also though that the bsps were the same and I can work on the issue with > only the erc32 BSP. I have one more question: when i run the hello world > test. All the test files are within one specific directory and I don't see > the executables for specific bsps that's why i thought all tests would be > built (there would not be any specific considerations for bsps) . > > Sent with ProtonMail Secure Email. > > ‐‐‐ Original Message ‐‐‐ > On Monday, March 29, 2021 2:45 PM, Gedare Bloom ged...@rtems.org wrote: > > > On Sun, Mar 28, 2021 at 1:26 PM zack_on_the_speed_chanel > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > Hello all, > > > I'm updating on what' i've found out with the issue (forgot to reply all) > > > . Joel recommended me check the coverage for the leon BSP( to check if > > > it's supported) and i found that the branch with CLOCK_MONOTONIC was not > > > reached I think now that it's supported (because the annotated assembly > > > is in the sparc instruction set). I also found out that the test would be > > > similar to Psxclock02 and it runs the same tests on a different clock. > > > Then I tried to build the psxclock02 test , change the create_clock to > > > have the clock_monotonic argument and i didn't see the executable or any > > > change in the ./waf build. Then I was suggested that you have to enable > > > all tests some how? How do i enable all tests? > > > > Do you use something like: ./waf bsp_defaults ---rtems-bsp=leon3 > > > config.ini > > Then, take a look, BUILD_TESTS and BUILD_PSXTESTS are two options that > > if either is True it should build psxclock02. > > When you write code, you should first make sure you can build the code > > as it exists if it is supposed to work, and run it to see that it > > works. Then you should make changes from a working baseline. Otherwise > > when you get a problem, how do you know if the problem is your > > problem, or it already existed? > > > > > Thanks > > > Zack > > > devel mailing list > > > devel@rtems.org > > > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Ticket#3889 updated
my waf file look like this $cat config.ini [sparc/leon3] BUILD_TESTS=True for rebuilding the bsp I ran: ./waf configure ./waf Zack Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Tuesday, March 30, 2021 9:02 PM, Gedare Bloom wrote: > On Tue, Mar 30, 2021 at 2:41 PM zack_on_the_speed_chanel > zack_on_the_speed_cha...@protonmail.ch wrote: > > > I have both of the options and i tried to built it with BUILD_TESTS and > > PSXTESTS and the test didn't build. Is there anything else that could alter > > how rtems is built? > > After you set them to True, did you re-run waf configure before waf build? > > > Sent with ProtonMail Secure Email. > > ‐‐‐ Original Message ‐‐‐ > > On Tuesday, March 30, 2021 3:29 PM, Gedare Bloom ged...@rtems.org wrote: > > > > > BUILD_TESTS and BUILD_PSXTESTS are two options that > > > if either is True it should build psxclock02. > > > On Tue, Mar 30, 2021 at 9:20 AM zack_on_the_speed_chanel > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > I did build the leon3 bsp and I still don't see the psxtimer02 as an > > > > executable. Is there a way build a test from source? I have the sources > > > > for psxtest02. Also i'm thinking that it could be due to the fact that > > > > i don't have posix tests enabled. Is there a way > > > > that to enable posix? > > > > Thanks > > > > Zack > > > > Sent with ProtonMail Secure Email. > > > > ‐‐‐ Original Message ‐‐‐ > > > > On Monday, March 29, 2021 8:11 PM, zack_on_the_speed_chanel > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > Sorry that assumption was very native of me that i didn't have a > > > > > working baseline. Joel said that the erc32 was similar to the leon bsp > > > > > " > > > > > The ERC32 what's the first space hardened sparc processor. The leon3 > > > > > is a > > > > > later processor in the same family. Both use the same build of GCC > > > > > and are > > > > > just different bsps. In fact both run on the same sis simulator. " > > > > > I also though that the bsps were the same and I can work on the issue > > > > > with only the erc32 BSP. I have one more question: when i run the > > > > > hello world test. All the test files are within one specific > > > > > directory and I don't see the executables for specific bsps that's > > > > > why i thought all tests would be built (there would not be any > > > > > specific considerations for bsps) . > > > > > Sent with ProtonMail Secure Email. > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > On Monday, March 29, 2021 2:45 PM, Gedare Bloom ged...@rtems.org > > > > > wrote: > > > > > > > > > > > On Sun, Mar 28, 2021 at 1:26 PM zack_on_the_speed_chanel > > > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > > > > > Hello all, > > > > > > > I'm updating on what' i've found out with the issue (forgot to > > > > > > > reply all) . Joel recommended me check the coverage for the leon > > > > > > > BSP( to check if it's supported) and i found that the branch with > > > > > > > CLOCK_MONOTONIC was not reached I think now that it's supported > > > > > > > (because the annotated assembly is in the sparc instruction set). > > > > > > > I also found out that the test would be similar to Psxclock02 and > > > > > > > it runs the same tests on a different clock. Then I tried to > > > > > > > build the psxclock02 test , change the create_clock to have the > > > > > > > clock_monotonic argument and i didn't see the executable or any > > > > > > > change in the ./waf build. Then I was suggested that you have to > > > > > > > enable all tests some how? How do i enable all tests? > > > > > > > > > > > > Do you use something like: ./waf bsp_defaults ---rtems-bsp=leon3 > > > > > > > config.ini > > > > > > Then, take a look, BUILD_TESTS and BUILD_PSXTESTS are two options > > > > > > that > > > > > > if either is True it should build psxclock02. > > > > > > When you write code, you should first make sure you can build the > > > > > > code > > > > > > as it exists if it is supposed to work, and run it to see that it > > > > > > works. Then you should make changes from a working baseline. > > > > > > Otherwise > > > > > > when you get a problem, how do you know if the problem is your > > > > > > problem, or it already existed? > > > > > > > > > > > > > Thanks > > > > > > > Zack > > > > > > > devel mailing list > > > > > > > devel@rtems.org > > > > > > > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Ticket#3889 updated
I have both of the options and i tried to built it with BUILD_TESTS and PSXTESTS and the test didn't build. Is there anything else that could alter how rtems is built? Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Tuesday, March 30, 2021 3:29 PM, Gedare Bloom wrote: > BUILD_TESTS and BUILD_PSXTESTS are two options that > if either is True it should build psxclock02. > > On Tue, Mar 30, 2021 at 9:20 AM zack_on_the_speed_chanel > zack_on_the_speed_cha...@protonmail.ch wrote: > > > I did build the leon3 bsp and I still don't see the psxtimer02 as an > > executable. Is there a way build a test from source? I have the sources for > > psxtest02. Also i'm thinking that it could be due to the fact that i don't > > have posix tests enabled. Is there a way > > that to enable posix? > > Thanks > > Zack > > Sent with ProtonMail Secure Email. > > ‐‐‐ Original Message ‐‐‐ > > On Monday, March 29, 2021 8:11 PM, zack_on_the_speed_chanel > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > Sorry that assumption was very native of me that i didn't have a working > > > baseline. Joel said that the erc32 was similar to the leon bsp > > > " > > > The ERC32 what's the first space hardened sparc processor. The leon3 is a > > > later processor in the same family. Both use the same build of GCC and are > > > just different bsps. In fact both run on the same sis simulator. " > > > I also though that the bsps were the same and I can work on the issue > > > with only the erc32 BSP. I have one more question: when i run the hello > > > world test. All the test files are within one specific directory and I > > > don't see the executables for specific bsps that's why i thought all > > > tests would be built (there would not be any specific considerations for > > > bsps) . > > > Sent with ProtonMail Secure Email. > > > ‐‐‐ Original Message ‐‐‐ > > > On Monday, March 29, 2021 2:45 PM, Gedare Bloom ged...@rtems.org wrote: > > > > > > > On Sun, Mar 28, 2021 at 1:26 PM zack_on_the_speed_chanel > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > Hello all, > > > > > I'm updating on what' i've found out with the issue (forgot to reply > > > > > all) . Joel recommended me check the coverage for the leon BSP( to > > > > > check if it's supported) and i found that the branch with > > > > > CLOCK_MONOTONIC was not reached I think now that it's supported > > > > > (because the annotated assembly is in the sparc instruction set). I > > > > > also found out that the test would be similar to Psxclock02 and it > > > > > runs the same tests on a different clock. Then I tried to build the > > > > > psxclock02 test , change the create_clock to have the clock_monotonic > > > > > argument and i didn't see the executable or any change in the ./waf > > > > > build. Then I was suggested that you have to enable all tests some > > > > > how? How do i enable all tests? > > > > > > > > Do you use something like: ./waf bsp_defaults ---rtems-bsp=leon3 > > > > > config.ini > > > > Then, take a look, BUILD_TESTS and BUILD_PSXTESTS are two options that > > > > if either is True it should build psxclock02. > > > > When you write code, you should first make sure you can build the code > > > > as it exists if it is supposed to work, and run it to see that it > > > > works. Then you should make changes from a working baseline. Otherwise > > > > when you get a problem, how do you know if the problem is your > > > > problem, or it already existed? > > > > > > > > > Thanks > > > > > Zack > > > > > devel mailing list > > > > > devel@rtems.org > > > > > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Ticket#3889 updated
Did i do anything wrong with my .ini file? Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Wednesday, March 31, 2021 12:20 AM, zack_on_the_speed_chanel wrote: > my waf file look like this > > $cat config.ini > [sparc/leon3] > BUILD_TESTS=True > > for rebuilding the bsp I ran: > ./waf configure > ./waf > > Zack > Sent with ProtonMail Secure Email. > > ‐‐‐ Original Message ‐‐‐ > On Tuesday, March 30, 2021 9:02 PM, Gedare Bloom ged...@rtems.org wrote: > > > On Tue, Mar 30, 2021 at 2:41 PM zack_on_the_speed_chanel > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > I have both of the options and i tried to built it with BUILD_TESTS and > > > PSXTESTS and the test didn't build. Is there anything else that could > > > alter how rtems is built? > > > > After you set them to True, did you re-run waf configure before waf build? > > > > > Sent with ProtonMail Secure Email. > > > ‐‐‐ Original Message ‐‐‐ > > > On Tuesday, March 30, 2021 3:29 PM, Gedare Bloom ged...@rtems.org wrote: > > > > > > > BUILD_TESTS and BUILD_PSXTESTS are two options that > > > > if either is True it should build psxclock02. > > > > On Tue, Mar 30, 2021 at 9:20 AM zack_on_the_speed_chanel > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > I did build the leon3 bsp and I still don't see the psxtimer02 as an > > > > > executable. Is there a way build a test from source? I have the > > > > > sources for psxtest02. Also i'm thinking that it could be due to the > > > > > fact that i don't have posix tests enabled. Is there a way > > > > > that to enable posix? > > > > > Thanks > > > > > Zack > > > > > Sent with ProtonMail Secure Email. > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > On Monday, March 29, 2021 8:11 PM, zack_on_the_speed_chanel > > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > > > Sorry that assumption was very native of me that i didn't have a > > > > > > working baseline. Joel said that the erc32 was similar to the leon > > > > > > bsp > > > > > > " > > > > > > The ERC32 what's the first space hardened sparc processor. The > > > > > > leon3 is a > > > > > > later processor in the same family. Both use the same build of GCC > > > > > > and are > > > > > > just different bsps. In fact both run on the same sis simulator. " > > > > > > I also though that the bsps were the same and I can work on the > > > > > > issue with only the erc32 BSP. I have one more question: when i run > > > > > > the hello world test. All the test files are within one specific > > > > > > directory and I don't see the executables for specific bsps that's > > > > > > why i thought all tests would be built (there would not be any > > > > > > specific considerations for bsps) . > > > > > > Sent with ProtonMail Secure Email. > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > On Monday, March 29, 2021 2:45 PM, Gedare Bloom ged...@rtems.org > > > > > > wrote: > > > > > > > > > > > > > On Sun, Mar 28, 2021 at 1:26 PM zack_on_the_speed_chanel > > > > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > > > > > > > Hello all, > > > > > > > > I'm updating on what' i've found out with the issue (forgot to > > > > > > > > reply all) . Joel recommended me check the coverage for the > > > > > > > > leon BSP( to check if it's supported) and i found that the > > > > > > > > branch with CLOCK_MONOTONIC was not reached I think now that > > > > > > > > it's supported (because the annotated assembly is in the sparc > > > > > > > > instruction set). I also found out that the test would be > > > > > > > > similar to Psxclock02 and it runs the same tests on a different > > > > > > > > clock. Then I tried to build the psxclock02 test , change the > > > > > > > > create_clock to have the clock_monotonic argument and i didn't
Re: Ticket#3889 updated
Yes the build works successfully. I tried to also just try BUILD_PSXTESTS only and it failed midway. I also tried to do an automated build. It failed with __start symbol not found. Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Thursday, April 1, 2021 10:10 PM, Gedare Bloom wrote: > On Thu, Apr 1, 2021 at 2:52 PM zack_on_the_speed_chanel > zack_on_the_speed_cha...@protonmail.ch wrote: > > > Did i do anything wrong with my .ini file? > > Sent with ProtonMail Secure Email. > > ‐‐‐ Original Message ‐‐‐ > > On Wednesday, March 31, 2021 12:20 AM, zack_on_the_speed_chanel > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > my waf file look like this > > > $cat config.ini > > > [sparc/leon3] > > > BUILD_TESTS=True > > > for rebuilding the bsp I ran: > > > ./waf configure > > > ./waf > > This looks right, nothing obvious to me. > > Does the waf build finish successfully, or does it stop with an error? > > > > Zack > > > Sent with ProtonMail Secure Email. > > > ‐‐‐ Original Message ‐‐‐ > > > On Tuesday, March 30, 2021 9:02 PM, Gedare Bloom ged...@rtems.org wrote: > > > > > > > On Tue, Mar 30, 2021 at 2:41 PM zack_on_the_speed_chanel > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > I have both of the options and i tried to built it with BUILD_TESTS > > > > > and PSXTESTS and the test didn't build. Is there anything else that > > > > > could alter how rtems is built? > > > > > > > > After you set them to True, did you re-run waf configure before waf > > > > build? > > > > > > > > > Sent with ProtonMail Secure Email. > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > On Tuesday, March 30, 2021 3:29 PM, Gedare Bloom ged...@rtems.org > > > > > wrote: > > > > > > > > > > > BUILD_TESTS and BUILD_PSXTESTS are two options that > > > > > > if either is True it should build psxclock02. > > > > > > On Tue, Mar 30, 2021 at 9:20 AM zack_on_the_speed_chanel > > > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > > > > > I did build the leon3 bsp and I still don't see the psxtimer02 as > > > > > > > an executable. Is there a way build a test from source? I have > > > > > > > the sources for psxtest02. Also i'm thinking that it could be due > > > > > > > to the fact that i don't have posix tests enabled. Is there a way > > > > > > > that to enable posix? > > > > > > > Thanks > > > > > > > Zack > > > > > > > Sent with ProtonMail Secure Email. > > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > > On Monday, March 29, 2021 8:11 PM, zack_on_the_speed_chanel > > > > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > > > > > > > Sorry that assumption was very native of me that i didn't have > > > > > > > > a working baseline. Joel said that the erc32 was similar to the > > > > > > > > leon bsp > > > > > > > > " > > > > > > > > The ERC32 what's the first space hardened sparc processor. The > > > > > > > > leon3 is a > > > > > > > > later processor in the same family. Both use the same build of > > > > > > > > GCC and are > > > > > > > > just different bsps. In fact both run on the same sis > > > > > > > > simulator. " > > > > > > > > I also though that the bsps were the same and I can work on the > > > > > > > > issue with only the erc32 BSP. I have one more question: when i > > > > > > > > run the hello world test. All the test files are within one > > > > > > > > specific directory and I don't see the executables for specific > > > > > > > > bsps that's why i thought all tests would be built (there would > > > > > > > > not be any specific considerations for bsps) . > > > > > > > > Sent with ProtonMail Secure Email. > > > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > > > On Monday, Mar
Re: Ticket#3889 updated
Thanks so much I was able to get it working! I was able to modify the test code and i was able to create the clock with the clock monotonic. I basically changed the the clock create argument to CLOCK_MONOTONIC which should test the branch. During test it failed at puts( "timer_create - OK" ); status = timer_create( CLOCK_MONOTONIC, NULL, &timer ); posix_service_failed( status, "timer_create OK" ); which gave me the error of FAILED -- errno (22 - Invalid argument) I only see a case in psxcreatetimer.c for CLOCK_REALTIME which could be that it's just unimplimented. My question is there anything I overlooked for this issue? I think the only thing was to change the create argument? Also if this is the extent of the code that that has to be test I'm thinking just to add it into the exiting psxtimer02.c file. Also for coverage testing I was not able to get to test it due to a error: symbol parser write failed for score error. thanks zack Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Friday, April 2, 2021 9:08 PM, Gedare Bloom wrote: > On Fri, Apr 2, 2021 at 12:19 PM zack_on_the_speed_chanel > zack_on_the_speed_cha...@protonmail.ch wrote: > > > Yes the build works successfully. I tried to also just try BUILD_PSXTESTS > > only and it failed midway. I also tried to do an automated build. It failed > > with __start symbol not found. > > You also need to enable the POSIX API/signals, in your config.ini add > RTEMS_POSIX_API = True > > > Sent with ProtonMail Secure Email. > > ‐‐‐ Original Message ‐‐‐ > > On Thursday, April 1, 2021 10:10 PM, Gedare Bloom ged...@rtems.org wrote: > > > > > On Thu, Apr 1, 2021 at 2:52 PM zack_on_the_speed_chanel > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > Did i do anything wrong with my .ini file? > > > > Sent with ProtonMail Secure Email. > > > > ‐‐‐ Original Message ‐‐‐ > > > > On Wednesday, March 31, 2021 12:20 AM, zack_on_the_speed_chanel > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > my waf file look like this > > > > > $cat config.ini > > > > > [sparc/leon3] > > > > > BUILD_TESTS=True > > > > > for rebuilding the bsp I ran: > > > > > ./waf configure > > > > > ./waf > > > > > > This looks right, nothing obvious to me. > > > Does the waf build finish successfully, or does it stop with an error? > > > > > > > > Zack > > > > > Sent with ProtonMail Secure Email. > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > On Tuesday, March 30, 2021 9:02 PM, Gedare Bloom ged...@rtems.org > > > > > wrote: > > > > > > > > > > > On Tue, Mar 30, 2021 at 2:41 PM zack_on_the_speed_chanel > > > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > > > > > I have both of the options and i tried to built it with > > > > > > > BUILD_TESTS and PSXTESTS and the test didn't build. Is there > > > > > > > anything else that could alter how rtems is built? > > > > > > > > > > > > After you set them to True, did you re-run waf configure before waf > > > > > > build? > > > > > > > > > > > > > Sent with ProtonMail Secure Email. > > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > > On Tuesday, March 30, 2021 3:29 PM, Gedare Bloom ged...@rtems.org > > > > > > > wrote: > > > > > > > > > > > > > > > BUILD_TESTS and BUILD_PSXTESTS are two options that > > > > > > > > if either is True it should build psxclock02. > > > > > > > > On Tue, Mar 30, 2021 at 9:20 AM zack_on_the_speed_chanel > > > > > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > > > > > > > > > I did build the leon3 bsp and I still don't see the > > > > > > > > > psxtimer02 as an executable. Is there a way build a test from > > > > > > > > > source? I have the sources for psxtest02. Also i'm thinking > > > > > > > > > that it could be due to the fact that i don't have posix > > > > > > > > > tests enabled. Is there a way > > > > > > > > > that to enable posix?
Implimenting timer_monotonic
Hello, So in looking at the ticket i realized it was more the making the test and only testing the creation of a timer object. I also have to implement the monotonic timer. Right now it seems like a monumental task for me currently. I began to look at the code for timergettime. I'm looking at how the value of "now" (current time) will differ monotonic vs realtime. Currently now is set to Watchdog.ticks. I understand in timergettime that most of it is getting if the timer expired and putting it into the timespec. I also have a question about the setting of the overrun in settimer's _POSIX_Timer_TSR fuction. I'm wondering about how overrun is set, because it is incriminated and set to zero in the function? Thanks Zack___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
code review: help implementing clock_montonic
hello, Currenttly i'm trying to implement the clock_monotonic which was part of ticket #3889. So far these are the changes are as follows ptimer->clock_type= &clock_id; in the timer create i added a field for the timer id and saved it when the timer was made. Then in getttime I used the appropriate timers to get the time. for example. if (ptimer->clock_type ==CLOCK_REALTIME) { Per_CPU_Control *cpu; struct timespec spec; struct timespec expire; cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context ); _TOD_Get(spec); _Timespec_From_ticks( expire, &ptimer->Timer.expire); if (spec->tv.nsec+spec->tv.sec > expire->tv.nsec+expire->tv.sec ) { remaining = (uint32_t) (expire->tv.nsec+expire->tv.sec - spec->tv.nsec+spec->tv.sec); } else { remaining = 0; } _Timespec_From_ticks( remaining, &value->it_value ); value->it_interval = ptimer->timer_data.it_interval; _POSIX_Timer_Release( cpu, &lock_context ); return 0; } Here i made two separate cases for getting the time. Also joel told me to I feel that it is a bit redundant to call everything using timespec to calculating remaining time and then just use timespec_From_ticks to get the time. It was a recommendation from Joel. Did I make the correct change. Also I assume that Delete does not need any changes because It does not require any measuring of time. Is there anything i need to change for timer_settime? Thanks Zack___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: code review: help implementing clock_montonic
> This ticket mostly references the need for a test. Have you tried to > write a test for the missing functionality? > How I made a test for it was to create the timer using timer_create() . It also said to use a previous test with timer_realtime and i tested it with sometime similar to PSXtimer02 test. I got a invalid argument error when I tried it. Joel told me i also have to impliment the monotonic clock >his math doesn't make sense to me. explain what you're trying to do? I wanted calculate the remaining time with the timespec. I assumed that the timespec contained the total time seconds+miliseconds. I knew that a cpu tick is an uint32. So i converted to timspec remaining = (uint32_t) ( ptimer->Timer.expire - now ); to something like expire->tv.nsec+expire->tv.sec - spec->tv.nsec+spec->tv.sec); > > Yes, settime is an important function to distinguish between MONOTONIC > and REALTIME cases. That is going to be tricky to think through. Where do you want to check the clock type. I though I only need to distinguish between both when getting the value of the clock. I don't exactly know what needs to be done me being really new to posix and operating system development. Zack ‐‐‐ Original Message ‐‐‐ On Tuesday, May 11, 2021 6:23 AM, Gedare Bloom wrote: > On Fri, May 7, 2021 at 12:53 PM zack_on_the_speed_chanel > zack_on_the_speed_cha...@protonmail.ch wrote: > > > hello, > > Currenttly i'm trying to implement the clock_monotonic which was part of > > ticket #3889. So far these are the changes are as follows > > This ticket mostly references the need for a test. Have you tried to > write a test for the missing functionality? > > > ptimer->clock_type= &clock_id; > > in the timer create i added a field for the timer id and saved it when the > > timer was made. Then in getttime I used the appropriate timers to get the > > time. > > for example. > > if (ptimer->clock_type ==CLOCK_REALTIME) { > > Per_CPU_Control *cpu; > > struct timespec spec; > > struct timespec expire; > > > > cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context ); > > > > Maybe move the clock_type check to here? > > > _TOD_Get(spec); > > _Timespec_From_ticks( expire, &ptimer->Timer.expire); > > > > > > if (spec->tv.nsec+spec->tv.sec > expire->tv.nsec+expire->tv.sec ) { > > > > remaining = (uint32_t) (expire->tv.nsec+expire->tv.sec - > > spec->tv.nsec+spec->tv.sec); > > > > this math doesn't make sense to me. explain what you're trying to do? > > > } else { > > remaining = 0; > > } > > > > _Timespec_From_ticks( remaining, &value->it_value ); > > value->it_interval = ptimer->timer_data.it_interval; > > > > _POSIX_Timer_Release( cpu, &lock_context ); > > return 0; > > > > > > } > > Here i made two separate cases for getting the time. Also joel told me to I > > feel that it is a bit redundant to call everything using timespec to > > calculating remaining time and then just use timespec_From_ticks to get the > > time. It was a recommendation from Joel. Did I make the correct change. > > Also I assume that Delete does not need any changes because It does not > > require any measuring of time. Is there anything i need to change for > > timer_settime? > > Yes, settime is an important function to distinguish between MONOTONIC > and REALTIME cases. That is going to be tricky to think through. > > > Thanks > > Zack > > > > devel mailing list > > devel@rtems.org > > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: code review: help implementing clock_montonic
Use helper functions in rtems/timespec.h or score/timespec.h > (depending where you implement your code, in this case, you probably > use the score services). I did it using rtems subtract function. rtems_timespec_subtract (now, expire, result); where now expire and result are all timespec _TOD_Get(now); or _Timecounter_Nanouptime(now ); and expire is rtems_timespec_from_ticks (ptimer->Timer.expire,expire ); also i'm getting this compiler warning I don't know if i have to resolve it, I get that my timespec variable may not be initialized. warning: 'result' may be used uninitialized in this function [-Wmaybe-uninitialized] >The monotonic clock cannot be set. Were you talking about the fact that the monotonic clock only can go up in time? Yes, settime is an important function to distinguish between MONOTONIC > > > and REALTIME cases. That is going to be tricky to think through. > > > i don't understand what you mean since i have added a clock type field to the POSIX_TIMER_CONTROL Thanks Zack ‐‐‐ Original Message ‐‐‐ On Thursday, May 13, 2021 3:05 PM, Gedare Bloom wrote: > On Wed, May 12, 2021 at 2:42 PM zack_on_the_speed_chanel > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > This ticket mostly references the need for a test. Have you tried to > > > write a test for the missing functionality? > > > > How I made a test for it was to create the timer using timer_create() . It > > also said to use a previous test with timer_realtime and i tested it with > > sometime similar to PSXtimer02 test. I got a invalid argument error when I > > tried it. Joel told me i also have to impliment the monotonic clock > > > > > his math doesn't make sense to me. explain what you're trying to do? > > > > I wanted calculate the remaining time with the timespec. I assumed that the > > timespec contained the total time seconds+miliseconds. I knew that a cpu > > tick is an uint32. So i converted to timspec > > > > remaining = (uint32_t) ( ptimer->Timer.expire - now ); > > > > > > to something like > > expire->tv.nsec+expire->tv.sec - spec->tv.nsec+spec->tv.sec); > > This doesn't work. Example: > now = 0s 9ns > expire = 1s 0ns > > expire - now = 1ns > expire.nsec + expire.sec - now.nsec + now.sec = -9 cast to > uint32_t is 3294967297ns or so. > > Use helper functions in rtems/timespec.h or score/timespec.h > (depending where you implement your code, in this case, you probably > use the score services). > > > > > Yes, settime is an important function to distinguish between MONOTONIC > > > > and REALTIME cases. That is going to be tricky to think through. > > > > Where do you want to check the clock type. I though I only need to > > distinguish between both when getting the value of the clock. I don't > > exactly know what needs to be done me being really new to posix and > > operating system development. > > The monotonic clock cannot be set. > > > Zack > > ‐‐‐ Original Message ‐‐‐ > > On Tuesday, May 11, 2021 6:23 AM, Gedare Bloom ged...@rtems.org wrote: > > > > > On Fri, May 7, 2021 at 12:53 PM zack_on_the_speed_chanel > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > hello, > > > > Currenttly i'm trying to implement the clock_monotonic which was part > > > > of ticket #3889. So far these are the changes are as follows > > > > > > This ticket mostly references the need for a test. Have you tried to > > > write a test for the missing functionality? > > > > > > > ptimer->clock_type= &clock_id; > > > > in the timer create i added a field for the timer id and saved it when > > > > the timer was made. Then in getttime I used the appropriate timers to > > > > get the time. > > > > for example. > > > > if (ptimer->clock_type ==CLOCK_REALTIME) { > > > > Per_CPU_Control *cpu; > > > > struct timespec spec; > > > > struct timespec expire; > > > > > > > > cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context ); > > > > > > > > > > Maybe move the clock_type check to here? > > > > > > > _TOD_Get(spec); > > > > _Timespec_From_ticks( expire, &ptimer->Timer.expire); > > > > > > > > > > > > if (spec->tv.nsec+spec->tv.sec > expire->tv.nsec+expire->tv.sec ) { > > > > > > > > remaining = (uint32_t)
Re: code review: help implementing clock_montonic
ping Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Saturday, May 15th, 2021 at 9:22 PM, zack_on_the_speed_chanel wrote: > Use helper functions in rtems/timespec.h or score/timespec.h > > > (depending where you implement your code, in this case, you probably > > > > use the score services). > > I did it using rtems subtract function. > > rtems_timespec_subtract (now, expire, result); > > where now expire and result are all timespec > > _TOD_Get(now); or _Timecounter_Nanouptime(now ); > > and expire is > > rtems_timespec_from_ticks (ptimer->Timer.expire,expire ); > > also i'm getting this compiler warning I don't know if i have to resolve it, > I get that my timespec variable may not be initialized. > > warning: 'result' may be used uninitialized in this function > [-Wmaybe-uninitialized] > > > The monotonic clock cannot be set. > > Were you talking about the fact that the monotonic clock only can go up in > time? > > Yes, settime is an important function to distinguish between MONOTONIC > > > > > and REALTIME cases. That is going to be tricky to think through. > > i don't understand what you mean since i have added a clock type field to the > POSIX_TIMER_CONTROL > > Thanks > > Zack > > ‐‐‐ Original Message ‐‐‐ > > On Thursday, May 13, 2021 3:05 PM, Gedare Bloom ged...@rtems.org wrote: > > > On Wed, May 12, 2021 at 2:42 PM zack_on_the_speed_chanel > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > This ticket mostly references the need for a test. Have you tried to > > > > > > > > write a test for the missing functionality? > > > > > > How I made a test for it was to create the timer using timer_create() . > > > It also said to use a previous test with timer_realtime and i tested it > > > with sometime similar to PSXtimer02 test. I got a invalid argument error > > > when I tried it. Joel told me i also have to impliment the monotonic clock > > > > > > > his math doesn't make sense to me. explain what you're trying to do? > > > > > > I wanted calculate the remaining time with the timespec. I assumed that > > > the timespec contained the total time seconds+miliseconds. I knew that a > > > cpu tick is an uint32. So i converted to timspec > > > > > > remaining = (uint32_t) ( ptimer->Timer.expire - now ); > > > > > > > > > to something like > > > > > > expire->tv.nsec+expire->tv.sec - spec->tv.nsec+spec->tv.sec); > > > > This doesn't work. Example: > > > > now = 0s 9ns > > > > expire = 1s 0ns > > > > expire - now = 1ns > > > > expire.nsec + expire.sec - now.nsec + now.sec = -9 cast to > > > > uint32_t is 3294967297ns or so. > > > > Use helper functions in rtems/timespec.h or score/timespec.h > > > > (depending where you implement your code, in this case, you probably > > > > use the score services). > > > > > > > Yes, settime is an important function to distinguish between MONOTONIC > > > > > > > > > > and REALTIME cases. That is going to be tricky to think through. > > > > > > Where do you want to check the clock type. I though I only need to > > > distinguish between both when getting the value of the clock. I don't > > > exactly know what needs to be done me being really new to posix and > > > operating system development. > > > > The monotonic clock cannot be set. > > > > > Zack > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > On Tuesday, May 11, 2021 6:23 AM, Gedare Bloom ged...@rtems.org wrote: > > > > > > > On Fri, May 7, 2021 at 12:53 PM zack_on_the_speed_chanel > > > > > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > hello, > > > > > > > > > > Currenttly i'm trying to implement the clock_monotonic which was part > > > > > of ticket #3889. So far these are the changes are as follows > > > > > > > > This ticket mostly references the need for a test. Have you tried to > > > > > > > > write a test for the missing functionality? > > > > > > > > > ptimer->clock_type= &clock_id; > > > > > > > > > > in the timer create i added a field for the timer i
Re: code review: help implementing clock_montonic
hello, I used rtems_timespec_subtract to do all the arithmetic, I think that I have addressed the thing you wanted me to fix. Should I send a patch for you to look at? Zack Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Tuesday, June 8th, 2021 at 4:34 PM, Gedare Bloom wrote: > At this point, we probably need to see some more code. I can't piece > > together what you've done from the scattered emails here. Hopefully, > > the use of the helper methods fixes the previous concern I had. > > On Tue, Jun 8, 2021 at 9:20 AM zack_on_the_speed_chanel > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > ping > > > > Sent with ProtonMail Secure Email. > > > > ‐‐‐ Original Message ‐‐‐ > > > > On Saturday, May 15th, 2021 at 9:22 PM, zack_on_the_speed_chanel > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > Use helper functions in rtems/timespec.h or score/timespec.h > > > > > > > (depending where you implement your code, in this case, you probably > > > > > > > > use the score services). > > > > > > I did it using rtems subtract function. > > > > > > rtems_timespec_subtract (now, expire, result); > > > > > > where now expire and result are all timespec > > > > > > _TOD_Get(now); or _Timecounter_Nanouptime(now ); > > > > > > and expire is > > > > > > rtems_timespec_from_ticks (ptimer->Timer.expire,expire ); > > > > > > also i'm getting this compiler warning I don't know if i have to resolve > > > it, I get that my timespec variable may not be initialized. > > > > > > warning: 'result' may be used uninitialized in this function > > > [-Wmaybe-uninitialized] > > > > > > > The monotonic clock cannot be set. > > > > > > Were you talking about the fact that the monotonic clock only can go up > > > in time? > > > > > > Yes, settime is an important function to distinguish between MONOTONIC > > > > > > > > > and REALTIME cases. That is going to be tricky to think through. > > > > > > i don't understand what you mean since i have added a clock type field to > > > the POSIX_TIMER_CONTROL > > > > > > Thanks > > > > > > Zack > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > On Thursday, May 13, 2021 3:05 PM, Gedare Bloom ged...@rtems.org wrote: > > > > > > > On Wed, May 12, 2021 at 2:42 PM zack_on_the_speed_chanel > > > > > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > > This ticket mostly references the need for a test. Have you tried to > > > > > > > > > > > > write a test for the missing functionality? > > > > > > > > > > How I made a test for it was to create the timer using timer_create() > > > > > . It also said to use a previous test with timer_realtime and i > > > > > tested it with sometime similar to PSXtimer02 test. I got a invalid > > > > > argument error when I tried it. Joel told me i also have to impliment > > > > > the monotonic clock > > > > > > > > > > > his math doesn't make sense to me. explain what you're trying to do? > > > > > > > > > > I wanted calculate the remaining time with the timespec. I assumed > > > > > that the timespec contained the total time seconds+miliseconds. I > > > > > knew that a cpu tick is an uint32. So i converted to timspec > > > > > > > > > > remaining = (uint32_t) ( ptimer->Timer.expire - now ); > > > > > > > > > > > > > > > to something like > > > > > > > > > > expire->tv.nsec+expire->tv.sec - spec->tv.nsec+spec->tv.sec); > > > > > > > > This doesn't work. Example: > > > > > > > > now = 0s 9ns > > > > > > > > expire = 1s 0ns > > > > > > > > expire - now = 1ns > > > > > > > > expire.nsec + expire.sec - now.nsec + now.sec = -9 cast to > > > > > > > > uint32_t is 3294967297ns or so. > > > > > > > > Use helper functions in rtems/timespec.h or score/timespec.h > > > > > > > > (depending where you implement your code, in this case, you prob
Re: [PATCH] part of implimenting a monotonic clock in rtems part of this is not the final patch.
ping Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Wednesday, June 9th, 2021 at 6:27 PM, zack wrote: > From: zack zack_on_the_speed_cha...@protonmail.ch > > cpukit/include/rtems/posix/timer.h | 6 ++- > > cpukit/posix/src/psxtimercreate.c | 5 +- > > cpukit/posix/src/timergettime.c | 61 --- > > testsuites/psxtests/psxtimer02/psxtimer.c | 26 +++--- > > 4 files changed, 81 insertions(+), 17 deletions(-) > > diff --git a/cpukit/include/rtems/posix/timer.h > b/cpukit/include/rtems/posix/timer.h > > index bcbf07a65a..f8cf6115b2 100644 > > --- a/cpukit/include/rtems/posix/timer.h > > +++ b/cpukit/include/rtems/posix/timer.h > > @@ -21,7 +21,7 @@ > > #include > > #include > > +#include > > #include > > #ifdef __cplusplus > > @@ -47,7 +47,9 @@ typedef struct { > > struct itimerspec timer_data; /* Timing data of the timer / > > uint32_t ticks; / Number of ticks of the initialization / > > uint32_t overrun; / Number of expirations of the timer */ > > - struct timespec time; /* Time at which the timer was started */ > > - struct timespec time; /* Time at which the timer was started */ > - clockid_t clock_type; > > } POSIX_Timer_Control; > > /** > > diff --git a/cpukit/posix/src/psxtimercreate.c > b/cpukit/posix/src/psxtimercreate.c > > index a63cf1d100..e78c359bd5 100644 > > --- a/cpukit/posix/src/psxtimercreate.c > > +++ b/cpukit/posix/src/psxtimercreate.c > > @@ -40,7 +40,7 @@ int timer_create( > > { > > POSIX_Timer_Control *ptimer; > > - if ( clock_id != CLOCK_REALTIME ) > > - if ( clock_id != CLOCK_REALTIME || clock_id != CLOCK_MONOTONIC ) > > rtems_set_errno_and_return_minus_one( EINVAL ); > > if ( !timerid ) > > @@ -91,7 +91,8 @@ int timer_create( > > ptimer->timer_data.it_value.tv_nsec = 0; > > ptimer->timer_data.it_interval.tv_sec = 0; > > ptimer->timer_data.it_interval.tv_nsec = 0; > > > - ptimer->clock_type=clock_id; > > - _Watchdog_Preinitialize( &ptimer->Timer, _Per_CPU_Get_snapshot() ); > > _Watchdog_Initialize( &ptimer->Timer, _POSIX_Timer_TSR ); > > _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); > > > diff --git a/cpukit/posix/src/timergettime.c b/cpukit/posix/src/timergettime.c > > index ee2a566f0e..62011cde58 100644 > > --- a/cpukit/posix/src/timergettime.c > > +++ b/cpukit/posix/src/timergettime.c > > @@ -28,6 +28,7 @@ > > #include > > #include > > #include > > +#include > > /* > > -- When a timer is initialized, the value of the time in > > > > @@ -43,21 +44,67 @@ int timer_gettime( > > { > > POSIX_Timer_Control *ptimer; > > ISR_lock_Context lock_context; > > - uint64_t now; > > uint32_t remaining; > > - Per_CPU_Control *cpu; > > > - struct timespec * now; // get time now either with > > > - struct timespec * expire; // expire > > > > - struct timespec * result;// get remaining time > > > > if ( !value ) > > - rtems_set_errno_and_return_minus_one( EINVAL ); > > - rtems_set_errno_and_return_minus_one( EINVAL ); > > ptimer = _POSIX_Timer_Get( timerid, &lock_context ); > > - if ( ptimer != NULL ) { > - Per_CPU_Control *cpu; > > - if(ptimer== NULL ){ > - rtems_set_errno_and_return_minus_one( EINVAL ); > - } > > +if ( ptimer->clock_type ==CLOCK_REALTIME) { > > - cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context ); > > > -_TOD_Get(now); // get current time > > > - rtems_timespec_from_ticks (ptimer->Timer.expire,expire ); // get > the time to expire > > > > - if (now->tv_nsec+now->tv_sec > expire->tv_nsec+expire->tv_sec) { // check > if the time expired > > > - rtems_timespec_subtract (now ,expire , result); // > > > > -remaining = (uint32_t) result->tv_nsec+result->tv_sec; > > > - } else { > > -remaining = 0; > > > - } > > - _Timespec_From_ticks( remaining, &value->it_value ); > > - value->it_interval = ptimer->timer_data.it_interval; > > > - _POSIX_Timer_Release( cpu, &lock_context ); > > - return 0; > > - } > > > +if ( ptimer->clock_type ==CLOCK_MONOTONIC) { > > - cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context ); > > - now = cpu->Watchdog.ticks; > > - _Timecounter_Nanouptime(now ); > > > - rtems_timespec_from_ticks (ptimer->Timer.expire,expire ); > > > > - if (now->tv_nsec+now->tv_sec > expire->tv_nsec+expire->tv_sec) { > > > - rtems_timespec_subtract (now, expire, result); > > > > - if ( now < ptimer->Timer.expire ) { > > -remaining = (uint32_t) ( ptimer->Timer.expire - now ); > > > > -remaining = (uint32_t) result->tv_nsec+result->tv_sec; > > > } else { > > remaining = 0; > > } > > diff --git a/testsuites/psxtests/psxtimer02/psxtimer.c > b/testsuites/psxtests/psxtimer02/psxtimer.c > > index 9f79d33c42..029e638c76 100644 > > --- a/testsuites/psxtests/psxtimer02/psxtimer.c > > +++ b/testsuites/psxtests/psxtimer02/psxtimer.c > > @@ -59,17 +59,31 @@
Re: [PATCH] part of implimenting a monotonic clock in rtems part of this is not the final patch.
So the intention of the patch was to implement a timer_create function for monotonic clocks. A monotonic clock is a clock that keeps track of the time that has elapsed since the Linux epoch. I did the following so far. - I added a field in the RTEMS_timer_control so that in create_timer it's able to keep track of what type of clock is provided as a argument - I have looked at the old source code for the getttime and joel suggested me to use different functions to get the value of the time one being _Timecounter_Nanouptime and _TOD_Get These are so far the changes I made so far. I think since the clock type only affects the value given for time I do not think I need to make anymore changes to the code. I do not know if need to add anything else. Im just looking for suggestions on anything I overlooked. Thanks Zack Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Friday, June 11th, 2021 at 4:01 PM, Christian Mauderer wrote: > Hello Zack, > > you say: "part of this is not the final patch" in the subject. So what > > is the intention of this patch? Do you need a complete review? Is it > > some kind of preview and you need input? If yes: For what parts do you > > need input? > > Best regards > > Christian > > On 11/06/2021 17:20, zack_on_the_speed_chanel wrote: > > > ping > > > > Sent with ProtonMail Secure Email. > > > > ‐‐‐ Original Message ‐‐‐ > > > > On Wednesday, June 9th, 2021 at 6:27 PM, zack zakthertems...@outlook.com > > wrote: > > > > > From: zack zack_on_the_speed_cha...@protonmail.ch > > > > > > cpukit/include/rtems/posix/timer.h | 6 ++- > > > > > > cpukit/posix/src/psxtimercreate.c | 5 +- > > > > > > cpukit/posix/src/timergettime.c | 61 --- > > > > > > testsuites/psxtests/psxtimer02/psxtimer.c | 26 +++--- > > > > > > 4 files changed, 81 insertions(+), 17 deletions(-) > > > > > > diff --git a/cpukit/include/rtems/posix/timer.h > > > b/cpukit/include/rtems/posix/timer.h > > > > > > index bcbf07a65a..f8cf6115b2 100644 > > > > > > --- a/cpukit/include/rtems/posix/timer.h > > > > > > +++ b/cpukit/include/rtems/posix/timer.h > > > > > > @@ -21,7 +21,7 @@ > > > > > > #include > > > > > > #include > > > > > > +#include > > > > > > #include > > > > > > #ifdef __cplusplus > > > > > > @@ -47,7 +47,9 @@ typedef struct { > > > > > > struct itimerspec timer_data; /* Timing data of the timer / > > > > > > uint32_t ticks; / Number of ticks of the initialization / > > > > > > uint32_t overrun; / Number of expirations of the timer */ > > > > > > - struct timespec time; /* Time at which the timer was started */ > > > > > > - struct timespec time; /* Time at which the timer was started */ > > > > > > - clockid_t clock_type; > > > > > > > > > } POSIX_Timer_Control; > > > > > > /** > > > > > > diff --git a/cpukit/posix/src/psxtimercreate.c > > > b/cpukit/posix/src/psxtimercreate.c > > > > > > index a63cf1d100..e78c359bd5 100644 > > > > > > --- a/cpukit/posix/src/psxtimercreate.c > > > > > > +++ b/cpukit/posix/src/psxtimercreate.c > > > > > > @@ -40,7 +40,7 @@ int timer_create( > > > > > > { > > > > > > POSIX_Timer_Control *ptimer; > > > > > > - if ( clock_id != CLOCK_REALTIME ) > > > > > > - if ( clock_id != CLOCK_REALTIME || clock_id != CLOCK_MONOTONIC ) > > > > > > rtems_set_errno_and_return_minus_one( EINVAL ); > > > > > > if ( !timerid ) > > > > > > @@ -91,7 +91,8 @@ int timer_create( > > > > > > ptimer->timer_data.it_value.tv_nsec = 0; > > > > > > ptimer->timer_data.it_interval.tv_sec = 0; > > > > > > ptimer->timer_data.it_interval.tv_nsec = 0; > > > > > > - ptimer->clock_type=clock_id; > > > > > > - _Watchdog_Preinitialize( &ptimer->Timer, _Per_CPU_Get_snapshot() ); > > > > > > _Watchdog_Initialize( &ptimer->Timer, _POSIX_Timer_TSR ); > > > > > > _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); > > > > > > > > > diff --git a/cpukit/posix/src/timergettime.c >
Re: [PATCH] part of implimenting a monotonic clock in rtems part of this is not the final patch.
so I tested it with the but I have not made a new test file I'll do that soon. How do I add a new test? All the tests that test the timer functionality do work. I"m confident that all the changes I had to made to implement a monotonic clock should be there. Thanks Zack Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Tuesday, June 15th, 2021 at 7:29 AM, Christian Mauderer wrote: > If you add a new functionallity you should add a test that tests the > > expected behaviour. You just shouldn't replace one but add a new test or > > a new test case to an existing test. > > Best regards > > Christian > > On 14/06/2021 22:18, zack_on_the_speed_chanel wrote: > > > also i'll revert the posix test that I changed back to normal because it > > was only for testing. > > > > Sent with ProtonMail Secure Email. > > > > ‐‐‐ Original Message ‐‐‐ > > > > On Monday, June 14th, 2021 at 8:14 PM, zack_on_the_speed_chanel > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > I've made most of the corrections to the code. I fixed up the formatting > > > but I still don't know if I have to add anything for the settime and > > > delete_timer(). i assume as the monotonic clock only affects the value I > > > think it's all I have to do. I also can try to modify a posix test to > > > check my theory. > > > > > > Thanks > > > > > > Zack > > > > > > Sent with ProtonMail Secure Email. > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > On Saturday, June 12th, 2021 at 9:31 AM, Christian Mauderer > > > o...@c-mauderer.de wrote: > > > > > > > Hello Zack, > > > > > > > > I don't really know a lot about the timer toppic. So this is more of a > > > > > > > > style and general suggestion review. > > > > > > > > On 09/06/2021 20:27, zack wrote: > > > > > > > > > From: zack zack_on_the_speed_cha...@protonmail.ch > > > > > > > > > > cpukit/include/rtems/posix/timer.h | 6 ++- > > > > > > > > > > cpukit/posix/src/psxtimercreate.c | 5 +- > > > > > > > > > > cpukit/posix/src/timergettime.c | 61 --- > > > > > > > > > > testsuites/psxtests/psxtimer02/psxtimer.c | 26 +++--- > > > > > > > > > > 4 files changed, 81 insertions(+), 17 deletions(-) > > > > > > > > > > diff --git a/cpukit/include/rtems/posix/timer.h > > > > > b/cpukit/include/rtems/posix/timer.h > > > > > > > > > > index bcbf07a65a..f8cf6115b2 100644 > > > > > > > > > > --- a/cpukit/include/rtems/posix/timer.h > > > > > > > > > > +++ b/cpukit/include/rtems/posix/timer.h > > > > > > > > > > @@ -21,7 +21,7 @@ > > > > > > > > > > #include > > > > > > > > > > #include > > > > > - > > > > > > > > I think the blank line separated rtems includes from others. So please > > > > > > > > don't remove it. > > > > > > > > > +#include > > > > > > > > > > #include > > > > > > > > > > #ifdef __cplusplus > > > > > > > > > > @@ -47,7 +47,9 @@ typedef struct { > > > > > > > > > > struct itimerspec timer_data; /* Timing data of the timer / > > > > > > > > > > uint32_t ticks; / Number of ticks of the initialization / > > > > > > > > > > uint32_t overrun; / Number of expirations of the timer */ > > > > > > > > > > - struct timespec time; /* Time at which the timer was started */ > > > > > > > > > > - struct timespec time; /* Time at which the timer was started */ > > > > > > > > > > > > > Not sure what changed in that line. Looks like a whitespace change. > > > > > > > > Please avoid these. > > > > > > > > > - clockid_t clock_type; > > > > > > > > Why a blank line? > > > > > > > > > } POSIX_Timer_Control; > > > > > > > > > > /** > > > > > > > > > > diff --git a/cpukit/posix/src/psxtimercreate.c > &g
Re: [PATCH] part of implimenting a monotonic clock in rtems part of this is not the final patch.
I have added the tests and added the ones that create the timer. My idea for testing is that if I change the wall clock and I'll check the monotonic clock's time. But I think I have to make a signal and arm the timer. Thanks Zack Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Friday, June 18th, 2021 at 8:01 AM, Christian Mauderer wrote: > Hello Zack, > > On 18/06/2021 04:34, zack_on_the_speed_chanel wrote: > > > so I tested it with the but I have not made a new test file I'll do that > > soon. How do I add a new test? All the tests that test the timer > > functionality do work. I"m confident that all the changes I had to made to > > implement a monotonic clock should be there. > > Regarding a new test: Just grep for example for psxtimer01 in the > > sources and add the new test simmilar to the existing one. > > The most relevant files are spec/build/testsuites/psxtests/*.yml for the > > waf based build system and testsuites/psxtests/Makefile.am and > > .../configure.ac for the old build system. > > But please check whether you need a new test program. If you basically > > only copy the test routine of psxtimer01 or psxtimer02 and replace all > > CLOCK_REALTIME by CLOCK_MONOTONIC then you shouldn't add a new test. > > Instead create a function in the test that is called once with > > CLOCK_REALTIME and once with CLOCK_MONOTONIC. > > Please make sure that the test not only tests the API but also whether > > the timer work as expected. A timer with CLOCK_REALTIME can be affected > > by changes in the wall clock. CLOCK_MONOTONIC should not be affected. So > > please make sure that your test checks whether that is really the case. > > Best regards > > Christian > > > Thanks > > > > Zack > > > > Sent with ProtonMail Secure Email. > > > > ‐‐‐ Original Message ‐‐‐ > > > > On Tuesday, June 15th, 2021 at 7:29 AM, Christian Mauderer > > o...@c-mauderer.de wrote: > > > > > If you add a new functionallity you should add a test that tests the > > > > > > expected behaviour. You just shouldn't replace one but add a new test or > > > > > > a new test case to an existing test. > > > > > > Best regards > > > > > > Christian > > > > > > On 14/06/2021 22:18, zack_on_the_speed_chanel wrote: > > > > > > > also i'll revert the posix test that I changed back to normal because > > > > it was only for testing. > > > > > > > > Sent with ProtonMail Secure Email. > > > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > > > On Monday, June 14th, 2021 at 8:14 PM, zack_on_the_speed_chanel > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > I've made most of the corrections to the code. I fixed up the > > > > > formatting but I still don't know if I have to add anything for the > > > > > settime and delete_timer(). i assume as the monotonic clock only > > > > > affects the value I think it's all I have to do. I also can try to > > > > > modify a posix test to check my theory. > > > > > > > > > > Thanks > > > > > > > > > > Zack > > > > > > > > > > Sent with ProtonMail Secure Email. > > > > > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > > > > > On Saturday, June 12th, 2021 at 9:31 AM, Christian Mauderer > > > > > o...@c-mauderer.de wrote: > > > > > > > > > > > Hello Zack, > > > > > > > > > > > > I don't really know a lot about the timer toppic. So this is more > > > > > > of a > > > > > > > > > > > > style and general suggestion review. > > > > > > > > > > > > On 09/06/2021 20:27, zack wrote: > > > > > > > > > > > > > From: zack zack_on_the_speed_cha...@protonmail.ch > > > > > > > > > > > > > > cpukit/include/rtems/posix/timer.h | 6 ++- > > > > > > > > > > > > > > cpukit/posix/src/psxtimercreate.c | 5 +- > > > > > > > > > > > > > > cpukit/posix/src/timergettime.c | 61 --- > > > > > > > > > > > > > > testsuites/psxtests/psxtimer02/psxtimer.c | 26 +
Re: [PATCH] part of implimenting a monotonic clock in rtems part of this is not the final patch.
I tried to do some testing with the code I write. I tired to test it by making a rtems app. I modified the code from the ubuntu manpage ( here https://manpages.ubuntu.com/manpages/bionic/man2/timer_create.2.html)so it does not need command line arguments and my code was able to compile. When I run the program it does not print anything. I double-checked the POSIX calls and all were compatible with rtems. Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Saturday, June 19th, 2021 at 6:49 PM, zack_on_the_speed_chanel wrote: > I have added the tests and added the ones that create the timer. My idea for > testing is that if I change the wall clock and I'll check the monotonic > clock's time. But I think I have to make a signal and arm the timer. > > Thanks > > Zack > > Sent with ProtonMail Secure Email. > > ‐‐‐ Original Message ‐‐‐ > > On Friday, June 18th, 2021 at 8:01 AM, Christian Mauderer o...@c-mauderer.de > wrote: > > > Hello Zack, > > > > On 18/06/2021 04:34, zack_on_the_speed_chanel wrote: > > > > > so I tested it with the but I have not made a new test file I'll do that > > > soon. How do I add a new test? All the tests that test the timer > > > functionality do work. I"m confident that all the changes I had to made > > > to implement a monotonic clock should be there. > > > > Regarding a new test: Just grep for example for psxtimer01 in the > > > > sources and add the new test simmilar to the existing one. > > > > The most relevant files are spec/build/testsuites/psxtests/*.yml for the > > > > waf based build system and testsuites/psxtests/Makefile.am and > > > > .../configure.ac for the old build system. > > > > But please check whether you need a new test program. If you basically > > > > only copy the test routine of psxtimer01 or psxtimer02 and replace all > > > > CLOCK_REALTIME by CLOCK_MONOTONIC then you shouldn't add a new test. > > > > Instead create a function in the test that is called once with > > > > CLOCK_REALTIME and once with CLOCK_MONOTONIC. > > > > Please make sure that the test not only tests the API but also whether > > > > the timer work as expected. A timer with CLOCK_REALTIME can be affected > > > > by changes in the wall clock. CLOCK_MONOTONIC should not be affected. So > > > > please make sure that your test checks whether that is really the case. > > > > Best regards > > > > Christian > > > > > Thanks > > > > > > Zack > > > > > > Sent with ProtonMail Secure Email. > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > On Tuesday, June 15th, 2021 at 7:29 AM, Christian Mauderer > > > o...@c-mauderer.de wrote: > > > > > > > If you add a new functionallity you should add a test that tests the > > > > > > > > expected behaviour. You just shouldn't replace one but add a new test or > > > > > > > > a new test case to an existing test. > > > > > > > > Best regards > > > > > > > > Christian > > > > > > > > On 14/06/2021 22:18, zack_on_the_speed_chanel wrote: > > > > > > > > > also i'll revert the posix test that I changed back to normal because > > > > > it was only for testing. > > > > > > > > > > Sent with ProtonMail Secure Email. > > > > > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > > > > > On Monday, June 14th, 2021 at 8:14 PM, zack_on_the_speed_chanel > > > > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > > > > > > > I've made most of the corrections to the code. I fixed up the > > > > > > formatting but I still don't know if I have to add anything for the > > > > > > settime and delete_timer(). i assume as the monotonic clock only > > > > > > affects the value I think it's all I have to do. I also can try to > > > > > > modify a posix test to check my theory. > > > > > > > > > > > > Thanks > > > > > > > > > > > > Zack > > > > > > > > > > > > Sent with ProtonMail Secure Email. > > > > > > > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > > > > > > > On Saturday, June 12th, 2021 at 9:31 AM, Christia
Re: [PATCH] part of implimenting a monotonic clock in rtems part of this is not the final patch.
I wrote a test for the psxtimer using timer_monotonic. The timer create function worked and all of the get and set time functions work. Cristian told me to verify that the monotonic timer is unaffected by the wall clock. I found some code that I'm just using to test it. I'm using that excerpt from that man page to check if everything is working including timer overrun. Then will run that program with hardcoded values as a control and then change the date on the next running of the program ( which should not affect the delay or the time overrun ). I don't know if there needs to be any change with timeroverrun or timersettime ( I don't think so because it does not deal with getting the time) Thanks Zack ent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Wednesday, June 23rd, 2021 at 8:44 PM, Gedare Bloom wrote: > On Wed, Jun 23, 2021 at 12:16 PM zack_on_the_speed_chanel > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > I tried to do some testing with the code I write. I tired to test it by > > making a rtems app. I modified the code from the ubuntu manpage ( here > > https://manpages.ubuntu.com/manpages/bionic/man2/timer_create.2.html)so it > > does not need command line arguments and my code was able to compile. When > > I run the program it does not print anything. I double-checked the POSIX > > calls and all were compatible with rtems. > > The easiest thing to do is to modify an existing test to add new test > > cases, or else copy a test that is similar to what you need to do. > > > Sent with ProtonMail Secure Email. > > > > ‐‐‐ Original Message ‐‐‐ > > > > On Saturday, June 19th, 2021 at 6:49 PM, zack_on_the_speed_chanel > > zack_on_the_speed_cha...@protonmail.ch wrote: > > > > > I have added the tests and added the ones that create the timer. My idea > > > for testing is that if I change the wall clock and I'll check the > > > monotonic clock's time. But I think I have to make a signal and arm the > > > timer. > > > > > > Thanks > > > > > > Zack > > > > > > Sent with ProtonMail Secure Email. > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > On Friday, June 18th, 2021 at 8:01 AM, Christian Mauderer > > > o...@c-mauderer.de wrote: > > > > > > > Hello Zack, > > > > > > > > On 18/06/2021 04:34, zack_on_the_speed_chanel wrote: > > > > > > > > > so I tested it with the but I have not made a new test file I'll do > > > > > that soon. How do I add a new test? All the tests that test the timer > > > > > functionality do work. I"m confident that all the changes I had to > > > > > made to implement a monotonic clock should be there. > > > > > > > > Regarding a new test: Just grep for example for psxtimer01 in the > > > > > > > > sources and add the new test simmilar to the existing one. > > > > > > > > The most relevant files are spec/build/testsuites/psxtests/*.yml for the > > > > > > > > waf based build system and testsuites/psxtests/Makefile.am and > > > > > > > > .../configure.ac for the old build system. > > > > > > > > But please check whether you need a new test program. If you basically > > > > > > > > only copy the test routine of psxtimer01 or psxtimer02 and replace all > > > > > > > > CLOCK_REALTIME by CLOCK_MONOTONIC then you shouldn't add a new test. > > > > > > > > Instead create a function in the test that is called once with > > > > > > > > CLOCK_REALTIME and once with CLOCK_MONOTONIC. > > > > > > > > Please make sure that the test not only tests the API but also whether > > > > > > > > the timer work as expected. A timer with CLOCK_REALTIME can be affected > > > > > > > > by changes in the wall clock. CLOCK_MONOTONIC should not be affected. So > > > > > > > > please make sure that your test checks whether that is really the case. > > > > > > > > Best regards > > > > > > > > Christian > > > > > > > > > Thanks > > > > > > > > > > Zack > > > > > > > > > > Sent with ProtonMail Secure Email. > > > > > > > > > > ‐‐‐ Original Message ‐‐‐ > > > > > > > > > > On Tuesday, June 15th, 2021 at 7:29 AM, Christian Mauder
Re: Contributing to rtems
hello, I got locked out of my email but I'm the same person! Currently, I know that we had an original script to format it but it was lost, I also know that to make the new formatting script i have to take the old one and configure it until the diff matches with the original file. Can I get a hold of the old script I heard that Amar as it Thanks Zack ‐‐‐ Original Message ‐‐‐ On Monday, September 14, 2020 5:04 PM, Gedare Bloom wrote: > Either is fine. You can comment to https://devel.rtems.org/ticket/3818 > about build system problems. More eyes see it here :) > > On Mon, Sep 14, 2020 at 12:40 PM Karel Gardas karel.gar...@centrum.cz wrote: > > > On 9/14/20 6:48 PM, Gedare Bloom wrote: > > > > > Nice to see you got through that. Right now we are actually > > > transitioning the new build system into place. It would be great if > > > you can try it out now with your BSP build and report any > > > feedback/problems you may encounter. > > > > Where to report issues? To devel@ or right to the trac? > > Thanks, > > Karel > > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel