diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-01-26 19:49:54 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-01-26 19:49:54 +0200 |
commit | e2cbb77cc7e21faad90dfe4ad18d46ca97f11434 (patch) | |
tree | a34cf49339964cdd9279e15f4e5c8ca63f2f1cef | |
parent | 4ff30c3c9e5ac07567f64996a624e06c8af51091 (diff) | |
download | egawk-e2cbb77cc7e21faad90dfe4ad18d46ca97f11434.tar.gz egawk-e2cbb77cc7e21faad90dfe4ad18d46ca97f11434.tar.bz2 egawk-e2cbb77cc7e21faad90dfe4ad18d46ca97f11434.zip |
Improvements to functab4 test.
-rw-r--r-- | test/ChangeLog | 6 | ||||
-rw-r--r-- | test/functab4.awk | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index b4ba26ff..39d6ae2c 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2020-01-26 Arnold D. Robbins <arnold@skeeve.com> + + * functab4.awk: Code changes to avoid race conditions + calling stat on the test directory. Thanks to + Michal Jaegermann and Andrew J. Schorr. + 2020-01-23 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (EXTRA_DIST): New test, symtab11. diff --git a/test/functab4.awk b/test/functab4.awk index 196fcc6d..3be971f3 100644 --- a/test/functab4.awk +++ b/test/functab4.awk @@ -9,11 +9,14 @@ BEGIN { f = FUNCTAB["foo"] @f() - ret1 = stat(".", data1) - print "ret1 =", ret1 + # Do the two stats one after the other, and use ".." instead + # of "." to avoid race conditions seen using ".". + ret1 = stat("..", data1) f = "stat" - ret2 = @f(".", data2) + ret2 = @f("..", data2) + + print "ret1 =", ret1 print "ret2 =", ret2 problem = 0 |