From Fedora Project Wiki

Revision as of 04:50, 13 August 2023 by Sumantrom (talk | contribs) (Created page with "{{QA/Test_Case |description=c-ares is a C library for asynchronous DNS requests (including name resolves).This test case ensures the proper installation and basic functionality of the `c-ares` library for asynchronous DNS requests. |setup= # Install the development package for `c-ares`: `sudo dnf install c-ares-devel`. # Prepare a basic C code to test the functionality using `c-ares`. |actions= # Write a simple C program to use the `c-ares` library for DNS resolution....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{QA/Test_Case |description=c-ares is a C library for asynchronous DNS requests (including name resolves).This test case ensures the proper installation and basic functionality of the c-ares library for asynchronous DNS requests. |setup=

  1. Install the development package for c-ares: sudo dnf install c-ares-devel.
  2. Prepare a basic C code to test the functionality using c-ares.

|actions=

  1. Write a simple C program to use the c-ares library for DNS resolution.
 The program should:
 - Initialize the library.
 - Make a DNS request to resolve a known domain (e.g., "www.google.com").
 - Print the results.
 - Cleanup.
  1. Here's a simple program [[
  2. Compile the program: gcc -o test_cares test_cares.c -lcares.
  3. Run the program: ./test_cares.

|results=

  1. The C program should compile without any errors.
  2. Running the program should display the resolved IP addresses for the specified domain.
  3. The program should exit gracefully after printing the results.

|optional=For advanced testing:

  1. Test the program with multiple domains.
  2. Test DNS resolution for various record types (e.g., MX, TXT).
  3. Examine the behavior of the program when given invalid or non-existent domain names.
  4. Check the behavior with different DNS server configurations.

}}