Create ATF tests The NetBSD Project
Status: Closed Time to complete: 168 hrs Mentors: Julian Coleman, Julian Fagir Tags: c, sh, man, research

ATF is the automatic test framework for NetBSD. We strive to have automatic tests for all the important parts of our system: libraries, syscalls, binaries, etc.
Your task is to write such tests. You should read the ?tutorial about how to write an atf test, and then you can start testing things.
As testing is an endless task, here are just a few ideas about which items could be tested:

  • atomic_ops(3)
  • cdbr(3) and cdbw(3)
  • inet(3) and inet_net(3)
  • ethers(3) , iso_addr(3) and link_addr(3)


Though this task is originally rather considered quality assurance, the actual test writing is only coding work (whether the test succeeds or not, is up to the original author of the library or tool).
The tests should be written in either C or sh, depending on the test subject.

Every single written test is considered as one task. If you think there is another test that should be added, but is not listed here, feel free to contact us. This task can be fulfilled multiple times and will be recreated once it is claimed.



Link to the wiki article describing atf: http://wiki.netbsd.org/tutorials/atf/

Uploaded Work
File name/URL File size Date submitted
AtfInet.tgz 20.0 KB January 09 2013 20:01 UTC
AtfInet.tgz 20.0 KB January 10 2013 16:07 UTC
AtfInet.tgz 40.0 KB January 10 2013 16:19 UTC
AtfInet.tgz 30.0 KB January 10 2013 16:29 UTC
Comments
Philip Hayes on December 13 2012 02:11 UTC Task Claimed

I would like to work on this task.

Philip Hayes on December 13 2012 02:13 UTC Task

I will test atomic_ops(3).

Aleksej Saushev on December 13 2012 09:03 UTC Task Assigned

This task has been assigned to Philip Hayes. You have 168 hours to complete this task, good luck!

Philip Hayes on December 15 2012 08:06 UTC Claim Removed

The claim on this task has been removed, someone else can claim it now.

Puck Meerburg on January 7 2013 18:01 UTC Task Claimed

I would like to work on this task.

Puck Meerburg on January 7 2013 19:21 UTC Claim Removed

The claim on this task has been removed, someone else can claim it now.

Puck Meerburg on January 9 2013 06:31 UTC Task Claimed

I would like to work on this task.

Puck Meerburg on January 9 2013 06:31 UTC Claim

I'm in for inet(3) and inet_net(3)!

Aleksej Saushev on January 9 2013 07:19 UTC Task Assigned

This task has been assigned to Puck Meerburg. You have 168 hours to complete this task, good luck!

Puck Meerburg on January 9 2013 20:02 UTC Ready for review

The work on this task is ready to be reviewed.

Julian Coleman on January 10 2013 15:40 UTC Code needs fixing.

Hi,


I tried to run the tests, but both the test programs dump core (NetBSD sparc64 6.99.15).  Adding the environment variable WARNS set to 4, gives hints as to the problems:


:; WARNS=4 make inet
rm -f .gdbinit
touch .gdbinit
#   compile  Tests/inet.o
gcc -O2 -std=gnu99  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wno-traditional  -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wsign-compare -Wformat=2   -Wno-format-zero-length  -Werror      -c    inet.c
cc1: warnings being treated as errors
inet.c:10:5: error: no previous prototype for 'is_big_endian'
inet.c: In function 'atfu_inet_ntop_ipv6_body':
inet.c:169:9: error: missing braces around initializer
inet.c:169:9: error: (near initialization for 'element.parts')
inet.c: In function 'atfu_inet_pton_ipv6_body':
inet.c:205:9: error: missing braces around initializer
inet.c:205:9: error: (near initialization for 'actualresult.parts')
inet.c: At top level:
inet.c:138:1: error: 'atfu_inet_ntoa_tc' defined but not used
inet.c: In function 'atfu_tp_add_tcs':
inet.c:221:1: error: control reaches end of non-void function
*** Error code 1


:; WARNS=4 make inet_net
#   compile  Tests/inet_net.o
gcc -O2 -std=gnu99  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wno-traditional  -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wsign-compare -Wformat=2   -Wno-format-zero-length  -Werror      -c    inet_net.c
cc1: warnings being treated as errors
inet_net.c:11:5: error: no previous prototype for 'is_big_endian'
inet_net.c: In function 'atfu_inet_net_ntop_ipv6_body':
inet_net.c:52:9: error: missing braces around initializer
inet_net.c:52:9: error: (near initialization for 'ad.parts')
inet_net.c: In function 'atfu_inet_net_pton_ipv6_body':
inet_net.c:100:9: error: missing braces around initializer
inet_net.c:100:9: error: (near initialization for 'address.parts')
inet_net.c:101:9: error: missing braces around initializer
inet_net.c:101:9: error: (near initialization for 'actualaddress.parts')
inet_net.c: In function 'atfu_tp_add_tcs':
inet_net.c:113:1: error: control reaches end of non-void function
*** Error code 1


Please could you fix these errorstoo?


Thanks,


J

Julian Coleman on January 10 2013 15:40 UTC Task Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Puck Meerburg on January 10 2013 16:06 UTC Ready for review

The work on this task is ready to be reviewed.

Julian Coleman on January 10 2013 18:13 UTC Tests are fine now

Hi,


The tests are fine now.


Thank you!


J

Julian Coleman on January 10 2013 18:13 UTC Task Closed

Congratulations, this task has been completed successfully.