- From 6385a49d32b59731d41d9cd8abf3ce49ac9de14d Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 4 Sep 2025 11:48:10 +0200
- Subject: [PATCH 1/3] tests: Add test for git symlink support in Windows git
- Add test for git symlink support in Windows git.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/manual_testing.txt | 80 +++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 79 insertions(+), 1 deletion(-)
- diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
- index 38bd49b..945dd44 100644
- --- a/tests/manual_testing.txt
- +++ b/tests/manual_testing.txt
- @@ -1,5 +1,5 @@
- #
- -# ms-nfs41-client manual testing sequence, 2025-08-20
- +# ms-nfs41-client manual testing sequence, 2025-09-04
- #
- # Draft version, needs to be turned into automated tests
- # if possible
- @@ -302,6 +302,84 @@ bash -c 'set -o errexit ; m="$(printf "\U0001f313")" ; typeset filenames=( "$m$m
- #
- CYGWIN='winsymlinks:nativestrict' bash -c 'rm -f symlrootdotslash && ln -sf / symlrootdotslash && cmd /C "cd symlrootdotslash" && echo "Test OK"'
- +#
- +# Test script to test git symlink with Windows git
- +#
- +---- snip ----
- +#
- +# Windows git symlink test
- +#
- +set -o xtrace
- +set -o errexit
- +
- +export PATH='/bin:/usr/bin'
- +
- +builtin cat
- +builtin ln
- +builtin rm
- +
- +which -a git
- +
- +integer test_errs=0
- +
- +rm -Rf newgitproj newgitproj_cloned
- +
- +#
- +# Create via Cygwin git
- +#
- +mkdir newgitproj
- +cd newgitproj
- +git init --initial-branch='master'
- +git config --global --add safe.directory "$PWD"
- +git config --global --add safe.directory "$PWD/.git"
- +
- +printf 'Hello, Git symlink test!\n' >'README.md'
- +printf '123\n' >'123.txt'
- +git add 'README.md' '123.txt'
- +git commit -m 'Add README file'
- +
- +ln -s 'README.md' 'README_link.md'
- +ln -s '123.txt' '123_link.txt'
- +ln -s '123_link.txt' '123_link_link.txt'
- +git add 'README_link.md' '123_link.txt' '123_link_link.txt'
- +git commit -m 'Add symlink to README+123.txt files'
- +cd ..
- +
- +#
- +# clone via Windows git
- +#
- +'/cygdrive/c/Program Files/Git/cmd/git' clone -c core.symlinks=true newgitproj newgitproj_cloned
- +cd newgitproj_cloned
- +ls -l
- +if [[ ! -L 'README_link.md' ]] ; then
- + printf '## FAIL: README_link.md should be a symlink\n'
- + (( test_errs++ ))
- +fi
- +if [[ ! -L '123_link.txt' ]] ; then
- + printf '## FAIL: 123_link.txt should be a symlink\n'
- + (( test_errs++ ))
- +fi
- +if [[ ! -L '123_link_link.txt' ]] ; then
- + printf '## FAIL: 123_link_link.txt should be a symlink\n'
- + (( test_errs++ ))
- +fi
- +
- +if [[ "$(cat '123_link_link.txt')" != $'123\r' ]] ; then
- + printf '## FAIL: 123_link_link.txt contain the string "123\\r", got %q\n' "$(cat '123_link_link.txt')"
- + (( test_errs++ ))
- +fi
- +
- +if (( test_errs > 0 )) ; then
- + printf '#### FAILURE: %d test failed.\n' test_errs
- + exit 1
- +fi
- +
- +printf '#### ALL Test OK\n'
- +exit 0
- +
- +# EOF.
- +---- snip ----
- +
- #
- # Test for mkdir with UNC path
- #
- --
- 2.45.4
- From 9f67d2940a076f534be8929d5834186e03ff1d28 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 4 Sep 2025 14:24:58 +0200
- Subject: [PATCH 2/3] sys: Make OFFLOAD READ/WRITE debug output less noisy by
- default
- Make OFFLOAD READ/WRITE debug output less noisy by default.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41sys_buildconfig.h | 1 +
- sys/nfs41sys_fsctl.c | 6 ++++++
- 2 files changed, 7 insertions(+)
- diff --git a/sys/nfs41sys_buildconfig.h b/sys/nfs41sys_buildconfig.h
- index 21eb201..aec9c54 100644
- --- a/sys/nfs41sys_buildconfig.h
- +++ b/sys/nfs41sys_buildconfig.h
- @@ -75,6 +75,7 @@
- //#define DEBUG_EA_SET
- //#define DEBUG_LOCK
- #define DEBUG_FSCTL
- +//#define DEBUG_FSCTL_OFFLOAD_READWRITE
- #define DEBUG_IOCTL
- #define DEBUG_TIME_BASED_COHERENCY
- #define DEBUG_MOUNT
- diff --git a/sys/nfs41sys_fsctl.c b/sys/nfs41sys_fsctl.c
- index 275bc22..0ab99fb 100644
- --- a/sys/nfs41sys_fsctl.c
- +++ b/sys/nfs41sys_fsctl.c
- @@ -948,8 +948,10 @@ void nfs41_remove_offloadcontext_for_fobx(
- RxFreePool(found);
- }
- else {
- +#ifdef DEBUG_FSCTL_OFFLOAD_READWRITE
- DbgP("nfs41_remove_offloadcontext(pFobx=0x%p): Nothing found.\n",
- pFobx);
- +#endif /* DEBUG_FSCTL_OFFLOAD_READWRITE */
- }
- ExReleaseFastMutexUnsafe(&offloadcontextlist.lock);
- @@ -979,9 +981,11 @@ offloadcontext_entry *nfs41_find_offloadcontext_acquireshared(
- }
- if (found) {
- +#ifdef DEBUG_FSCTL_OFFLOAD_READWRITE
- DbgP("nfs41_find_offloadcontext_acquireshared(unvalidated_oce=0x%p): "
- "found=0x%p\n",
- unvalidated_oce);
- +#endif /* DEBUG_FSCTL_OFFLOAD_READWRITE */
- (void)ExAcquireSharedStarveExclusive(&found->resource, TRUE);
- ExReleaseFastMutexUnsafe(&offloadcontextlist.lock);
- @@ -1187,8 +1191,10 @@ NTSTATUS nfs41_OffloadWrite(
- */
- unvalidated_src_oce =
- *((void **)(&(((STORAGE_OFFLOAD_TOKEN *)(&owi->Token[0]))->Token[0])));
- +#ifdef DEBUG_FSCTL_OFFLOAD_READWRITE
- DbgP("nfs41_OffloadWrite: "
- "unvalidated_src_oce=0x%p\n", unvalidated_src_oce);
- +#endif /* DEBUG_FSCTL_OFFLOAD_READWRITE */
- /*
- * ... and validate it (and take a shared lock if validation was
- --
- 2.45.4
- From a4414832dd23864912f273fc453bf7be3b673128 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 4 Sep 2025 14:28:53 +0200
- Subject: [PATCH 3/3] tests: nfsbuildtest should return an error if there is no
- code signing certificate
- nfsbuildtest should return an error if there is no code signing
- certificate.
- Reported-by: Aurelien Couderc <aurelien.couderc2002@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/nfsbuildtest/nfsbuildtest.ksh93 | 4 ++++
- 1 file changed, 4 insertions(+)
- diff --git a/tests/nfsbuildtest/nfsbuildtest.ksh93 b/tests/nfsbuildtest/nfsbuildtest.ksh93
- index 14ee651..5946fa3 100644
- --- a/tests/nfsbuildtest/nfsbuildtest.ksh93
- +++ b/tests/nfsbuildtest/nfsbuildtest.ksh93
- @@ -525,6 +525,10 @@ function msnfs41client_build
- # Use WDK test certificate to sign *.(exe|dll) files
- export CERTIFICATE_THUMBPRINT="$(powershell -c 'Get-ChildItem -Path Cert:\CurrentUser\My | Where-Object {$_.Subject -like "*WDKTestCert*"} | Select-Object -ExpandProperty Thumbprint')"
- + if [[ "${CERTIFICATE_THUMBPRINT}" == '' ]] ; then
- + printf '%s: ERROR: Empty CERTIFICATE_THUMBPRINT\n' "$0"
- + return 1
- + fi
- #
- # build ms-nfs41-client
- --
- 2.45.4
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
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.