13_r12907-fix-unit-tests.dpatch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #! /bin/sh -e
  2. ## All lines beginning with `## DP:' are a description of the patch.
  3. ## DP: No description.
  4. if [ $# -lt 1 ]; then
  5. echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
  6. exit 1
  7. fi
  8. [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  9. patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
  10. case "$1" in
  11. -patch) patch -p1 ${patch_opts} < $0;;
  12. -unpatch) patch -R -p1 ${patch_opts} < $0;;
  13. *)
  14. echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
  15. exit 1;;
  16. esac
  17. exit 0
  18. #Author: arma
  19. #Date: 2007-12-21 05:44:10 -0500 (Fri, 21 Dec 2007)
  20. #New Revision: 12907
  21. #
  22. #Modified:
  23. #tor/trunk/src/or/test.c
  24. #Log:
  25. #the better fix for the unit tests
  26. #
  27. #
  28. #Modified: tor/trunk/src/or/test.c
  29. #===================================================================
  30. @DPATCH@
  31. --- tor/src/or/test.c 2007-12-21 10:42:14 UTC (rev 12906)
  32. +++ tor/src/or/test.c 2007-12-21 10:44:10 UTC (rev 12907)
  33. @@ -3330,7 +3330,7 @@
  34. intro->extend_info->addr = crypto_rand_int(65536); /* Does not cover all
  35. * IP addresses. */
  36. intro->extend_info->port = crypto_rand_int(65536);
  37. - intro->intro_key = pk2;
  38. + intro->intro_key = crypto_pk_dup_key(pk2);
  39. smartlist_add(generated->intro_nodes, intro);
  40. }
  41. test_assert(rend_encode_v2_descriptors(descs, generated, now,
  42. #@@ -3374,7 +3374,7 @@
  43. # rend_encoded_v2_service_descriptor_free(smartlist_get(descs, i));
  44. # smartlist_free(descs);
  45. # rend_service_descriptor_free(parsed);
  46. #-// rend_service_descriptor_free(generated); XXX020
  47. #+ rend_service_descriptor_free(generated);
  48. # }
  49. #
  50. # static void
  51. #