-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#375] New v63010/gtm9076 test to check for expected error messages f…
…or file paths over 255 characters This commit adds a v63010/gtm9076 test that checks that the following expected errors show up in the following 3 circumstances where the file path is over 255 characters: * When GDE attempts to create a global directory file with a path longer than 255 characters, it produces a `FILEPATHTOOLONG` error. * When MUPIP CREATE attempts to create a database with a path longer than 255 characters, it produces a `FNTRANSERROR` message. * When MUPIP attempts to create a journal file with a path longer than 255 characters, it produces a `FILEPATHTOOLONG` error. The `FILEPATHTOOLONG` error was added in V6.3-010 as a replacement for PARBUSFM that now covers those 2 additional circumstances.`FNTRANSERROR` pre-dates V6.3-010 but its message was changed in V6.3-010 and it was not covered by an existing test.
- Loading branch information
1 parent
9c293ed
commit 5e948e1
Showing
4 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This test checks that FILEPATHTOOLONG error messages show up as expected when creating a global directory or a journal file where | ||
# the full file path exceeds 255 characters. It also checks that the FNTRANSERROR message shows up as expected when creating a | ||
# database file with MUPIP CREATE where the path for the database exceeds 255 characters. | ||
################################################################### | ||
# Create a mumps.gld file in the test root directory. We will need this later for a MUPIP CREATE. | ||
%GDE-I-GDUSEDEFS, Using defaults for Global Directory | ||
##TEST_PATH##/mumps.gld | ||
%GDE-I-VERIFY, Verification OK | ||
|
||
%GDE-I-GDCREATE, Creating Global Directory file | ||
##TEST_PATH##/mumps.gld | ||
################################################################### | ||
# Switch to the subdirectory where the full path of mumps.gld/mumps.dat will be 256 characters | ||
################################################################### | ||
# Run GDE here to create a mumps.gld, expecting a FILEPATHTOOLONG error. | ||
150374602,GDEINIT+88^GDEINIT,%YDB-E-FILEPARSE, Error parsing file specification: GDEINITSZ,%YDB-E-FILEPATHTOOLONG, Filename including the path cannot be longer than 255 characters | ||
################################################################### | ||
# Set ydb_gbldir to the test root's mumps.gld file. | ||
################################################################### | ||
# Run MUPIP CREATE to create a mumps.dat, expecting a FNTRANSERROR error. | ||
%YDB-E-FNTRANSERROR, Filename including path exceeded 255 chars while trying to resolve filename DEFAULT | ||
%YDB-F-DBNOCRE, Not all specified database files, or their associated journal files were created | ||
################################################################### | ||
# Returning to the test root directory and creating a database. | ||
Files Created in ##TEST_PATH##: | ||
Using: ##SOURCE_PATH##/mumps -run GDE | ||
mumps.gld | ||
Using: ##SOURCE_PATH##/mupip | ||
mumps.dat | ||
################################################################### | ||
# Creating a journal file with a full path of 256 characters | ||
##TEST_AWK%YDB-E-FILEPARSE, Error parsing file specification: [a]+/mumps.mjl | ||
%YDB-E-FILEPATHTOOLONG, Filename including the path cannot be longer than 255 characters | ||
##TEST_AWK%YDB-E-JNLNOCREATE, Journal file [a]+/mumps.mjl not created | ||
%YDB-E-MUNOFINISH, MUPIP unable to finish all requested actions | ||
################################################################### | ||
##SOURCE_PATH##/mupip | ||
##SOURCE_PATH##/mupip integ -REG * | ||
No errors detected by integ. | ||
##TEST_AWK##TEST_PATH##/[a]+/GDEDUMP.DMP | ||
abortzs="150374602,GDEINIT+88^GDEINIT,%YDB-E-FILEPARSE, Error parsing file specification: GDEINITSZ,%YDB-E-FILEPATHTOOLONG, Filename including the path cannot be longer than 255 characters" | ||
$ZSTATUS="150374602,GDEINIT+88^GDEINIT,%YDB-E-FILEPARSE, Error parsing file specification: GDEINITSZ,%YDB-E-FILEPATHTOOLONG, Filename including the path cannot be longer than 255 characters" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/usr/local/bin/tcsh | ||
################################################################# | ||
# # | ||
# Copyright (c) 2021 YottaDB LLC and/or its subsidiaries. # | ||
# All rights reserved. # | ||
# # | ||
# This source code contains the intellectual property # | ||
# of its copyright holder(s), and is made available # | ||
# under a license. If you do not know the terms of # | ||
# the license, please stop and do not read further. # | ||
# # | ||
################################################################# | ||
|
||
echo "# This test checks that FILEPATHTOOLONG error messages show up as expected when creating a global directory or a journal file where" | ||
echo "# the full file path exceeds 255 characters. It also checks that the FNTRANSERROR message shows up as expected when creating a" | ||
echo "# database file with MUPIP CREATE where the path for the database exceeds 255 characters." | ||
|
||
set path_length = `expr length $PWD` | ||
|
||
set path255_length = 0 | ||
set filenamelength = 11 # includes 2 "/"s (before and after the large number of "a"s) | ||
set path255 = "" | ||
set testpath = $PWD | ||
|
||
while (255 >= `expr $path_length + $path255_length + $filenamelength`) | ||
set path255 = "${path255}a" | ||
set path255_length = `expr $path255_length + 1` | ||
end | ||
|
||
$echoline | ||
echo "# Create a mumps.gld file in the test root directory. We will need this later for a MUPIP CREATE." | ||
|
||
$GDE exit | ||
|
||
$echoline | ||
echo "# Switch to the subdirectory where the full path of mumps.gld/mumps.dat will be 256 characters" | ||
|
||
mkdir $path255 | ||
cd $path255 | ||
|
||
$echoline | ||
echo "# Run GDE here to create a mumps.gld, expecting a FILEPATHTOOLONG error." | ||
|
||
$GDE exit | ||
|
||
$echoline | ||
echo "# Set ydb_gbldir to the test root's mumps.gld file." | ||
setenv ydb_gbldir "$testpath/mumps.gld" | ||
|
||
$echoline | ||
echo "# Run MUPIP CREATE to create a mumps.dat, expecting a FNTRANSERROR error." | ||
$MUPIP CREATE | ||
|
||
$echoline | ||
echo "# Returning to the test root directory and creating a database." | ||
cd .. | ||
$gtm_tst/com/dbcreate.csh mumps | ||
|
||
|
||
$echoline | ||
echo "# Creating a journal file with a full path of 256 characters" | ||
$MUPIP set -journal="enable,file=${path255}/mumps.mjl" -file mumps.dat | ||
|
||
$echoline | ||
$gtm_tst/com/dbcheck.csh |