pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Patches for testing native Win32 git symlink support, tests+debug+misc, 2025-09-04
Posted by Anonymous on Thu 4th Sep 2025 13:42
raw | new post

  1. From 6385a49d32b59731d41d9cd8abf3ce49ac9de14d Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Thu, 4 Sep 2025 11:48:10 +0200
  4. Subject: [PATCH 1/3] tests: Add test for git symlink support in Windows git
  5.  
  6. Add test for git symlink support in Windows git.
  7.  
  8. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  9. ---
  10. tests/manual_testing.txt | 80 +++++++++++++++++++++++++++++++++++++++-
  11.  1 file changed, 79 insertions(+), 1 deletion(-)
  12.  
  13. diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
  14. index 38bd49b..945dd44 100644
  15. --- a/tests/manual_testing.txt
  16. +++ b/tests/manual_testing.txt
  17. @@ -1,5 +1,5 @@
  18.  #
  19. -# ms-nfs41-client manual testing sequence, 2025-08-20
  20. +# ms-nfs41-client manual testing sequence, 2025-09-04
  21.  #
  22.  # Draft version, needs to be turned into automated tests
  23.  # if possible
  24. @@ -302,6 +302,84 @@ bash -c 'set -o errexit ; m="$(printf "\U0001f313")" ; typeset filenames=( "$m$m
  25.  #
  26.  CYGWIN='winsymlinks:nativestrict' bash -c 'rm -f symlrootdotslash &&  ln -sf / symlrootdotslash && cmd /C "cd symlrootdotslash" && echo "Test OK"'
  27.  
  28. +#
  29. +# Test script to test git symlink with Windows git
  30. +#
  31. +---- snip ----
  32. +#
  33. +# Windows git symlink test
  34. +#
  35. +set -o xtrace
  36. +set -o errexit
  37. +
  38. +export PATH='/bin:/usr/bin'
  39. +
  40. +builtin cat
  41. +builtin ln
  42. +builtin rm
  43. +
  44. +which -a git
  45. +
  46. +integer test_errs=0
  47. +
  48. +rm -Rf newgitproj newgitproj_cloned
  49. +
  50. +#
  51. +# Create via Cygwin git
  52. +#
  53. +mkdir newgitproj
  54. +cd newgitproj
  55. +git init --initial-branch='master'
  56. +git config --global --add safe.directory "$PWD"
  57. +git config --global --add safe.directory "$PWD/.git"
  58. +
  59. +printf 'Hello, Git symlink test!\n' >'README.md'
  60. +printf '123\n' >'123.txt'
  61. +git add 'README.md' '123.txt'
  62. +git commit -m 'Add README file'
  63. +
  64. +ln -s 'README.md' 'README_link.md'
  65. +ln -s '123.txt' '123_link.txt'
  66. +ln -s '123_link.txt' '123_link_link.txt'
  67. +git add 'README_link.md' '123_link.txt' '123_link_link.txt'
  68. +git commit -m 'Add symlink to README+123.txt files'
  69. +cd ..
  70. +
  71. +#
  72. +# clone via Windows git
  73. +#
  74. +'/cygdrive/c/Program Files/Git/cmd/git' clone -c core.symlinks=true newgitproj newgitproj_cloned
  75. +cd newgitproj_cloned
  76. +ls -l
  77. +if [[ ! -L 'README_link.md' ]] ; then
  78. +       printf '## FAIL: README_link.md should be a symlink\n'
  79. +        (( test_errs++ ))
  80. +fi
  81. +if [[ ! -L '123_link.txt' ]] ; then
  82. +       printf '## FAIL: 123_link.txt should be a symlink\n'
  83. +        (( test_errs++ ))
  84. +fi
  85. +if [[ ! -L '123_link_link.txt' ]] ; then
  86. +       printf '## FAIL: 123_link_link.txt should be a symlink\n'
  87. +        (( test_errs++ ))
  88. +fi
  89. +
  90. +if [[ "$(cat '123_link_link.txt')" != $'123\r' ]] ; then
  91. +       printf '## FAIL: 123_link_link.txt contain the string "123\\r", got %q\n' "$(cat '123_link_link.txt')"
  92. +        (( test_errs++ ))
  93. +fi
  94. +
  95. +if (( test_errs > 0 )) ; then
  96. +    printf '#### FAILURE: %d test failed.\n' test_errs
  97. +    exit 1
  98. +fi
  99. +
  100. +printf '#### ALL Test OK\n'
  101. +exit 0
  102. +
  103. +# EOF.
  104. +---- snip ----
  105. +
  106.  #
  107.  # Test for mkdir with UNC path
  108.  #
  109. --
  110. 2.45.4
  111.  
  112. From 9f67d2940a076f534be8929d5834186e03ff1d28 Mon Sep 17 00:00:00 2001
  113. From: Roland Mainz <roland.mainz@nrubsig.org>
  114. Date: Thu, 4 Sep 2025 14:24:58 +0200
  115. Subject: [PATCH 2/3] sys: Make OFFLOAD READ/WRITE debug output less noisy by
  116.  default
  117.  
  118. Make OFFLOAD READ/WRITE debug output less noisy by default.
  119.  
  120. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  121. ---
  122. sys/nfs41sys_buildconfig.h | 1 +
  123.  sys/nfs41sys_fsctl.c       | 6 ++++++
  124.  2 files changed, 7 insertions(+)
  125.  
  126. diff --git a/sys/nfs41sys_buildconfig.h b/sys/nfs41sys_buildconfig.h
  127. index 21eb201..aec9c54 100644
  128. --- a/sys/nfs41sys_buildconfig.h
  129. +++ b/sys/nfs41sys_buildconfig.h
  130. @@ -75,6 +75,7 @@
  131.  //#define DEBUG_EA_SET
  132.  //#define DEBUG_LOCK
  133.  #define DEBUG_FSCTL
  134. +//#define DEBUG_FSCTL_OFFLOAD_READWRITE
  135.  #define DEBUG_IOCTL
  136.  #define DEBUG_TIME_BASED_COHERENCY
  137.  #define DEBUG_MOUNT
  138. diff --git a/sys/nfs41sys_fsctl.c b/sys/nfs41sys_fsctl.c
  139. index 275bc22..0ab99fb 100644
  140. --- a/sys/nfs41sys_fsctl.c
  141. +++ b/sys/nfs41sys_fsctl.c
  142. @@ -948,8 +948,10 @@ void nfs41_remove_offloadcontext_for_fobx(
  143.          RxFreePool(found);
  144.      }
  145.      else {
  146. +#ifdef DEBUG_FSCTL_OFFLOAD_READWRITE
  147.          DbgP("nfs41_remove_offloadcontext(pFobx=0x%p): Nothing found.\n",
  148.              pFobx);
  149. +#endif /* DEBUG_FSCTL_OFFLOAD_READWRITE */
  150.      }
  151.  
  152.      ExReleaseFastMutexUnsafe(&offloadcontextlist.lock);
  153. @@ -979,9 +981,11 @@ offloadcontext_entry *nfs41_find_offloadcontext_acquireshared(
  154.      }
  155.  
  156.      if (found) {
  157. +#ifdef DEBUG_FSCTL_OFFLOAD_READWRITE
  158.          DbgP("nfs41_find_offloadcontext_acquireshared(unvalidated_oce=0x%p): "
  159.              "found=0x%p\n",
  160.              unvalidated_oce);
  161. +#endif /* DEBUG_FSCTL_OFFLOAD_READWRITE */
  162.  
  163.          (void)ExAcquireSharedStarveExclusive(&found->resource, TRUE);
  164.          ExReleaseFastMutexUnsafe(&offloadcontextlist.lock);
  165. @@ -1187,8 +1191,10 @@ NTSTATUS nfs41_OffloadWrite(
  166.       */
  167.      unvalidated_src_oce =
  168.          *((void **)(&(((STORAGE_OFFLOAD_TOKEN *)(&owi->Token[0]))->Token[0])));
  169. +#ifdef DEBUG_FSCTL_OFFLOAD_READWRITE
  170.      DbgP("nfs41_OffloadWrite: "
  171.          "unvalidated_src_oce=0x%p\n", unvalidated_src_oce);
  172. +#endif /* DEBUG_FSCTL_OFFLOAD_READWRITE */
  173.  
  174.      /*
  175.       * ... and validate it (and take a shared lock if validation was
  176. --
  177. 2.45.4
  178.  
  179. From a4414832dd23864912f273fc453bf7be3b673128 Mon Sep 17 00:00:00 2001
  180. From: Roland Mainz <roland.mainz@nrubsig.org>
  181. Date: Thu, 4 Sep 2025 14:28:53 +0200
  182. Subject: [PATCH 3/3] tests: nfsbuildtest should return an error if there is no
  183.  code signing certificate
  184.  
  185. nfsbuildtest should return an error if there is no code signing
  186. certificate.
  187.  
  188. Reported-by: Aurelien Couderc <aurelien.couderc2002@gmail.com>
  189. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  190. ---
  191. tests/nfsbuildtest/nfsbuildtest.ksh93 | 4 ++++
  192.  1 file changed, 4 insertions(+)
  193.  
  194. diff --git a/tests/nfsbuildtest/nfsbuildtest.ksh93 b/tests/nfsbuildtest/nfsbuildtest.ksh93
  195. index 14ee651..5946fa3 100644
  196. --- a/tests/nfsbuildtest/nfsbuildtest.ksh93
  197. +++ b/tests/nfsbuildtest/nfsbuildtest.ksh93
  198. @@ -525,6 +525,10 @@ function msnfs41client_build
  199.  
  200.         # Use WDK test certificate to sign *.(exe|dll) files
  201.         export CERTIFICATE_THUMBPRINT="$(powershell -c 'Get-ChildItem -Path Cert:\CurrentUser\My | Where-Object {$_.Subject -like "*WDKTestCert*"} | Select-Object -ExpandProperty Thumbprint')"
  202. +       if [[ "${CERTIFICATE_THUMBPRINT}" == '' ]] ; then
  203. +               printf '%s: ERROR: Empty CERTIFICATE_THUMBPRINT\n' "$0"
  204. +               return 1
  205. +       fi
  206.  
  207.         #
  208.         # build ms-nfs41-client
  209. --
  210. 2.45.4

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at