Un-break s_lock_test.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 13 Aug 2021 18:42:27 +0000 (14:42 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 13 Aug 2021 18:42:27 +0000 (14:42 -0400)
Commit 80abbeba2 evidently didn't bother checking this code.
Also, list the generated executable in .gitignore (so it's
been a REALLY long time since anyone tried this).

Noted while trying out RISC-V spinlock patch.  Given that
this has been broken for 5 years and nobody noticed, it's
likely not worth back-patching.

src/backend/storage/lmgr/.gitignore
src/backend/storage/lmgr/s_lock.c

index 9355caea8c1f8fa0c10698c54278911011a90682..dab4c3f580611a1495c14104582aae74e11e0460 100644 (file)
@@ -1,2 +1,3 @@
 /lwlocknames.c
 /lwlocknames.h
+/s_lock_test
index 2dc2d6715107213088a5e1b899ed56760497b156..91322a40c1cb571c87bb268d45ebbd6be083b6f8 100644 (file)
@@ -368,7 +368,7 @@ main()
    printf("             if S_LOCK() and TAS() are working.\n");
    fflush(stdout);
 
-   s_lock(&test_lock.lock, __FILE__, __LINE__);
+   s_lock(&test_lock.lock, __FILE__, __LINE__, PG_FUNCNAME_MACRO);
 
    printf("S_LOCK_TEST: failed, lock not locked\n");
    return 1;