Hello community, here is the log from the commit of package fatsort for openSUSE:Factory checked in at 2018-10-17 08:39:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fatsort (Old) and /work/SRC/openSUSE:Factory/.fatsort.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fatsort" Wed Oct 17 08:39:36 2018 rev:3 rq:642004 version:1.5.0.456 Changes: -------- --- /work/SRC/openSUSE:Factory/fatsort/fatsort.changes 2017-10-26 18:46:02.695300370 +0200 +++ /work/SRC/openSUSE:Factory/.fatsort.new/fatsort.changes 2018-10-17 08:41:17.593861519 +0200 @@ -1,0 +2,8 @@ +Sat Oct 13 04:48:28 UTC 2018 - s...@suspend.net + +- Update to version 1.5.0.456: + * added options -e and -E to select directories with regular expressions + * FIX: possible memory leak for OPT_LOCALE + * FIX: bug affecting case sensitive sorting with locales + +------------------------------------------------------------------- Old: ---- fatsort-1.4.2.439.tar.xz New: ---- fatsort-1.5.0.456.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fatsort.spec ++++++ --- /var/tmp/diff_new_pack.Wh5qwv/_old 2018-10-17 08:41:17.989861181 +0200 +++ /var/tmp/diff_new_pack.Wh5qwv/_new 2018-10-17 08:41:17.989861181 +0200 @@ -1,7 +1,7 @@ # # spec file for package fatsort # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,15 +12,15 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: fatsort -Version: 1.4.2.439 +Version: 1.5.0.456 Release: 0 Summary: FAT Filesystem Sorting Utility -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Filesystems Url: http://fatsort.sourceforge.net Source0: https://sourceforge.net/projects/fatsort/files/fatsort-%{version}.tar.xz ++++++ fatsort-1.4.2.439.tar.xz -> fatsort-1.5.0.456.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/CHANGES.md new/fatsort-1.5.0.456/CHANGES.md --- old/fatsort-1.4.2.439/CHANGES.md 2017-08-06 20:28:33.000000000 +0200 +++ new/fatsort-1.5.0.456/CHANGES.md 2018-09-13 20:44:17.000000000 +0200 @@ -1,5 +1,10 @@ # Changelog +## v1.5.0 (September 08, 2018) +- added options -e and -E to select directories with regular expressions +- FIX: possible memory leak for OPT_LOCALE +- FIX: bug affecting case sensitive sorting with locales + ## v1.4.2 (August 06, 2017) - FIX: sorting with option -m on big endian architectures is now working as intended - reproducible docker tests added for i386, amd64, ppc64le diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/docker_tests/docker_tests_arm/Makefile new/fatsort-1.5.0.456/docker_tests/docker_tests_arm/Makefile --- old/fatsort-1.4.2.439/docker_tests/docker_tests_arm/Makefile 2017-08-05 03:07:58.000000000 +0200 +++ new/fatsort-1.5.0.456/docker_tests/docker_tests_arm/Makefile 2018-09-19 20:01:59.000000000 +0200 @@ -6,7 +6,7 @@ all: build_image $(DOCKER) run --rm --privileged -v ${CURDIR}:/home/tester/artifacts --tmpfs /tmp:rw,noexec,nosuid,size=2G -v ${CURDIR}/qemu-arm-static:/usr/bin/qemu-arm-static -it fatsort-test-arm -build_image: Dockerfile qemu-arm-static /proc/sys/fs/binfmt_misc/arm do_tests.sh +build_image: Dockerfile qemu-arm-static /proc/sys/fs/binfmt_misc/qemu-arm do_tests.sh $(DOCKER) build -t fatsort-test-arm -v ${CURDIR}/qemu-arm-static:/usr/bin/qemu-arm-static . $(TOUCH) build_image @@ -14,7 +14,7 @@ $(WGET) https://github.com/multiarch/qemu-user-static/releases/download/v2.9.1/qemu-arm-static.tar.gz $(TAR) xvfz qemu-arm-static.tar.gz -/proc/sys/fs/binfmt_misc/arm: +/proc/sys/fs/binfmt_misc/qemu-arm: $(DOCKER) run --rm --privileged multiarch/qemu-user-static:register clean: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/docker_tests/docker_tests_ppc/Dockerfile new/fatsort-1.5.0.456/docker_tests/docker_tests_ppc/Dockerfile --- old/fatsort-1.4.2.439/docker_tests/docker_tests_ppc/Dockerfile 2017-08-05 03:07:58.000000000 +0200 +++ new/fatsort-1.5.0.456/docker_tests/docker_tests_ppc/Dockerfile 2018-09-19 20:01:59.000000000 +0200 @@ -8,7 +8,7 @@ RUN apt-get -y install \ bbe=0.2.2-2ubuntu1 \ locales=2.13+git20120306-12.1 \ - subversion=1.8.8-1ubuntu3.2 \ + subversion \ gcc=4:4.8.2-1ubuntu6 \ make=3.81-8.2ubuntu3 \ man-db=2.6.7.1-1ubuntu1 \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/docker_tests/docker_tests_ppc/Makefile new/fatsort-1.5.0.456/docker_tests/docker_tests_ppc/Makefile --- old/fatsort-1.4.2.439/docker_tests/docker_tests_ppc/Makefile 2017-08-05 03:07:58.000000000 +0200 +++ new/fatsort-1.5.0.456/docker_tests/docker_tests_ppc/Makefile 2018-09-19 20:01:59.000000000 +0200 @@ -6,7 +6,7 @@ all: build_image $(DOCKER) run --rm --privileged -v ${CURDIR}:/home/tester/artifacts --tmpfs /tmp:rw,noexec,nosuid,size=2G -v ${CURDIR}/qemu-ppc-static:/usr/bin/qemu-ppc-static -it fatsort-test-ppc -build_image: Dockerfile qemu-ppc-static /proc/sys/fs/binfmt_misc/ppc do_tests.sh +build_image: Dockerfile qemu-ppc-static $(DOCKER) build -t fatsort-test-ppc -v ${CURDIR}/qemu-ppc-static:/usr/bin/qemu-ppc-static . $(TOUCH) build_image diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/src/Makefile new/fatsort-1.5.0.456/src/Makefile --- old/fatsort-1.4.2.439/src/Makefile 2017-08-02 21:35:06.000000000 +0200 +++ new/fatsort-1.5.0.456/src/Makefile 2018-09-08 22:23:41.000000000 +0200 @@ -38,7 +38,7 @@ SBINDIR=/usr/local/sbin endif -OBJ=fatsort.o FAT_fs.o fileio.o endianness.o signal.o entrylist.o errors.o options.o clusterchain.o sort.o misc.o natstrcmp.o stringlist.o +OBJ=fatsort.o FAT_fs.o fileio.o endianness.o signal.o entrylist.o errors.o options.o clusterchain.o sort.o misc.o natstrcmp.o stringlist.o regexlist.o all: fatsort @@ -69,7 +69,7 @@ errors.o: errors.c errors.h mallocv.h Makefile $(CC) ${CFLAGS} -c $< -o $@ -options.o: options.c options.h platform.h FAT_fs.h stringlist.h errors.h \ +options.o: options.c options.h platform.h FAT_fs.h stringlist.h regexlist.h errors.h \ mallocv.h Makefile $(CC) ${CFLAGS} -c $< -o $@ @@ -78,7 +78,7 @@ $(CC) ${CFLAGS} -c $< -o $@ sort.o: sort.c sort.h FAT_fs.h platform.h clusterchain.h entrylist.h \ - errors.h options.h stringlist.h endianness.h signal.h misc.h fileio.h \ + errors.h options.h stringlist.h regexlist.h endianness.h signal.h misc.h fileio.h \ mallocv.h Makefile $(CC) ${CFLAGS} -c $< -o $@ @@ -93,6 +93,10 @@ mallocv.h Makefile $(CC) ${CFLAGS} -c $< -o $@ +regexlist.o: regexlist.c regexlist.h platform.h FAT_fs.h errors.h \ + mallocv.h Makefile + $(CC) ${CFLAGS} -c $< -o $@ + mallocv.o: mallocv.c mallocv.h errors.h $(CC) ${CFLAGS} -c $< -o $@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/src/entrylist.c new/fatsort-1.5.0.456/src/entrylist.c --- old/fatsort-1.4.2.439/src/entrylist.c 2017-08-05 02:38:52.000000000 +0200 +++ new/fatsort-1.5.0.456/src/entrylist.c 2018-09-15 00:12:54.000000000 +0200 @@ -26,6 +26,7 @@ #include <string.h> #include <assert.h> #include <errno.h> +#include <ctype.h> #include "entrylist.h" #include "options.h" @@ -174,6 +175,10 @@ char s2[MAX_PATH_LEN+1]; char s1_col[MAX_PATH_LEN*2+1]; char s2_col[MAX_PATH_LEN*2+1]; + char scase1[MAX_PATH_LEN+1]; + char scase2[MAX_PATH_LEN+1]; + + u_int16_t i; // the volume label must always remain at the beginning of the (root) directory if ((de1->sde->DIR_Atrr & (ATTR_READ_ONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_VOLUME_ID | ATTR_DIRECTORY)) == ATTR_VOLUME_ID) { @@ -255,36 +260,39 @@ } } - if (!OPT_ASCII) { - // consider locale for comparison - if ((strxfrm(s1_col, ss1, MAX_PATH_LEN*2) == MAX_PATH_LEN*2) || - (strxfrm(s2_col, ss2, MAX_PATH_LEN*2) == MAX_PATH_LEN*2)) { - myerror("String collation error!"); - exit(1); + //printf("Orig S1: %s, Orig S2: %s, Locale S1: %s, Locale S2: %s\n", ss1, ss2, s1_col, s2_col); + + if (OPT_IGNORE_CASE) { + i=0; + while(ss1[i]) { + scase1[i] = tolower(ss1[i]); + i++; } + ss1=scase1; + i=0; + while(ss2[i]) { + scase2[i] = tolower(ss2[i]); + i++; + } + ss2=scase2; } - //printf("Orig S1: %s, Orig S2: %s, Locale S1: %s, Locale S2: %s\n", ss1, ss2, s1_col, s2_col); - if (OPT_NATURAL_SORT) { - if (OPT_IGNORE_CASE) { - return natstrcasecmp(ss1, ss2) * OPT_REVERSE; - } else { - return natstrcmp(ss1, ss2) * OPT_REVERSE; - } + return natstrcmp(ss1, ss2) * OPT_REVERSE; } else if (OPT_ASCII) { // use plain ASCII corder - if (OPT_IGNORE_CASE) { - return strcasecmp(ss1, ss2) * OPT_REVERSE; - } else { - return strcmp(ss1, ss2) * OPT_REVERSE; - } + return strcmp(ss1, ss2) * OPT_REVERSE; } else { - if (OPT_IGNORE_CASE) { - return strcasecmp(s1_col, s2_col) * OPT_REVERSE; - } else { - return strcmp(s1_col, s2_col) * OPT_REVERSE; + + // consider locale for comparison + if ((strxfrm(s1_col, ss1, MAX_PATH_LEN*2) == MAX_PATH_LEN*2) || + (strxfrm(s2_col, ss2, MAX_PATH_LEN*2) == MAX_PATH_LEN*2)) { + myerror("String collation error!"); + exit(1); } + + return strcmp(s1_col, s2_col) * OPT_REVERSE; + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/src/fatsort.c new/fatsort-1.5.0.456/src/fatsort.c --- old/fatsort-1.4.2.439/src/fatsort.c 2017-08-05 03:09:42.000000000 +0200 +++ new/fatsort-1.5.0.456/src/fatsort.c 2018-09-19 21:26:20.000000000 +0200 @@ -46,9 +46,9 @@ // program information #define INFO_PROGRAM "fatsort" -#define INFO_VERSION "1.4.2" +#define INFO_VERSION "1.5.0" #define INFO_AUTHOR "Written by Boris Leidner.\n" -#define INFO_COPYRIGHT "Copyright (C) 2004-2017 Boris Leidner.\n" +#define INFO_COPYRIGHT "Copyright (C) 2004-2018 Boris Leidner.\n" #define INFO_LICENSE "License GPLv2: GNU GPL version 2 (see LICENSE.txt)\n" \ "This is free software: you are free to change and redistribute it.\n" \ "There is NO WARRANTY, to the extent permitted by law.\n" @@ -79,11 +79,19 @@ "\t-t\tSort by last modification date and time\n\n" \ "\t-v, --version\n\n" \ "\t\tPrint version information\n\n" \ - "\tThe following options can be specified multiple times:\n\n" \ + "The following options can be specified multiple times\n" \ + "to select which directories shall be sorted:\n\n" \ "\t-d DIR\tSort directory DIR only\n\n" \ "\t-D DIR\tSort directory DIR and all subdirectories\n\n" \ "\t-x DIR\tDon't sort directory DIR\n\n" \ "\t-X DIR\tDon't sort directory DIR and its subdirectories\n\n" \ + "The following options can be specified multiple times\n" \ + "to select which directories shall be sorted using\n" \ + "POSIX.2 extended regular expressions:\n\n" \ + "\t-e RE\tOnly sort directories that match regular expression RE\n\n" \ + "\t-E RE\tDon't sort directories that match regular expression RE\n\n" \ + "However, options -e and -E may not be used simultaneously with\n" \ + "options -d, -D, -x and -X.\n\n" \ "\t-L LOC\tUse the locale LOC instead of the locale from the environment variables\n\n" \ "DEVICE must be a FAT12, FAT16 or FAT32 file system.\n\n" \ "WARNING: THE FILESYSTEM MUST BE CONSISTENT (NO FILESYSTEM ERRORS).\n" \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/src/options.c new/fatsort-1.5.0.456/src/options.c --- old/fatsort-1.4.2.439/src/options.c 2017-07-29 09:41:10.000000000 +0200 +++ new/fatsort-1.5.0.456/src/options.c 2018-09-08 22:23:41.000000000 +0200 @@ -28,12 +28,13 @@ #include <errno.h> #include "errors.h" #include "stringlist.h" +#include "regexlist.h" #include "mallocv.h" u_int32_t OPT_VERSION, OPT_HELP, OPT_INFO, OPT_QUIET, OPT_IGNORE_CASE, OPT_ORDER, OPT_LIST, OPT_REVERSE, OPT_FORCE, OPT_NATURAL_SORT, OPT_RECURSIVE, OPT_RANDOM, OPT_MORE_INFO, OPT_MODIFICATION, - OPT_ASCII; + OPT_ASCII, OPT_REGEX; struct sStringList *OPT_INCL_DIRS = NULL; struct sStringList *OPT_EXCL_DIRS = NULL; @@ -41,6 +42,9 @@ struct sStringList *OPT_EXCL_DIRS_REC = NULL; struct sStringList *OPT_IGNORE_PREFIXES_LIST = NULL; +struct sRegExList *OPT_REGEX_INCL = NULL; +struct sRegExList *OPT_REGEX_EXCL = NULL; + char *OPT_LOCALE; int32_t addDirPathToStringList(struct sStringList *stringList, const char (*str)[MAX_PATH_LEN+1]) { @@ -201,6 +205,18 @@ return -1; } + if ((OPT_REGEX_INCL=newRegExList()) == NULL) { + myerror("Could not create regExList!"); + freeOptions(); + return -1; + } + if ((OPT_REGEX_EXCL=newRegExList()) == NULL) { + myerror("Could not create regExList!"); + freeOptions(); + return -1; + } + OPT_REGEX=0; // regex disabled by default + // empty string list for to be ignored prefixes if ((OPT_IGNORE_PREFIXES_LIST=newStringList()) == NULL) { myerror("Could not create stringList!"); @@ -209,7 +225,7 @@ } opterr=0; - while ((c=getopt_long(argc, argv, "imvhqcfo:lrRnd:D:x:X:I:taL:", longOpts, NULL)) != -1) { + while ((c=getopt_long(argc, argv, "imvhqcfo:lrRnd:D:x:X:I:taL:e:E:", longOpts, NULL)) != -1) { switch(c) { case 'a' : OPT_ASCII = 1; break; case 'c' : OPT_IGNORE_CASE = 1; break; @@ -258,6 +274,22 @@ return -1; } break; + case 'e' : + if (addRegExToRegExList(OPT_REGEX_INCL, (const char*) optarg)) { + myerror("Could not add regular expression to regex list"); + freeOptions(); + return -1; + } + OPT_REGEX=1; + break; + case 'E' : + if (addRegExToRegExList(OPT_REGEX_EXCL, (const char*) optarg)) { + myerror("Could not add regular expression to regex list"); + freeOptions(); + return -1; + } + OPT_REGEX=1; + break; case 'I' : if (addStringToStringList(OPT_IGNORE_PREFIXES_LIST, optarg)) { myerror("Could not add directory path to string list"); @@ -287,6 +319,13 @@ } } + // regex or not regex + if ((OPT_EXCL_DIRS->next || OPT_EXCL_DIRS_REC->next || OPT_INCL_DIRS->next || OPT_INCL_DIRS_REC->next) && (OPT_REGEX)) { + myerror(" -d, -D, -x and -X may not be used simultaneously with options -e and -E!"); + freeOptions(); + return -1; + } + return 0; } @@ -296,7 +335,5 @@ freeStringList(OPT_EXCL_DIRS); freeStringList(OPT_EXCL_DIRS_REC); freeStringList(OPT_IGNORE_PREFIXES_LIST); - if (strcmp(OPT_LOCALE, "") != 0) { - free(OPT_LOCALE); - } + free(OPT_LOCALE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/src/options.h new/fatsort-1.5.0.456/src/options.h --- old/fatsort-1.4.2.439/src/options.h 2017-07-28 22:22:15.000000000 +0200 +++ new/fatsort-1.5.0.456/src/options.h 2018-09-08 22:23:41.000000000 +0200 @@ -28,12 +28,14 @@ #include "platform.h" #include "FAT_fs.h" #include "stringlist.h" +#include "regexlist.h" extern u_int32_t OPT_VERSION, OPT_HELP, OPT_INFO, OPT_QUIET, OPT_IGNORE_CASE, OPT_ORDER, OPT_LIST, OPT_REVERSE, OPT_FORCE, OPT_NATURAL_SORT, OPT_RECURSIVE, OPT_RANDOM, OPT_MORE_INFO, OPT_MODIFICATION, - OPT_ASCII; + OPT_ASCII, OPT_REGEX; extern struct sStringList *OPT_INCL_DIRS, *OPT_EXCL_DIRS, *OPT_INCL_DIRS_REC, *OPT_EXCL_DIRS_REC, *OPT_IGNORE_PREFIXES_LIST; +extern struct sRegExList *OPT_REGEX_INCL, *OPT_REGEX_EXCL; char *OPT_LOCALE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/src/regexlist.c new/fatsort-1.5.0.456/src/regexlist.c --- old/fatsort-1.4.2.439/src/regexlist.c 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/src/regexlist.c 2018-09-09 21:25:39.000000000 +0200 @@ -0,0 +1,136 @@ +/* + FATSort, utility for sorting FAT directory structures + Copyright (C) 2004 Boris Leidner <fatsort(at)formenos.de> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +/* + This file contains/describes functions to manage lists of regular expressions. +*/ +#include "regexlist.h" + +#include <stdlib.h> +#include <assert.h> +#include <errno.h> +#include "errors.h" +#include "mallocv.h" + +struct sRegExList *newRegExList() { +/* + create a new string list +*/ + struct sRegExList *regExList; + + // create the dummy head element + regExList = malloc(sizeof(struct sRegExList)); + if (regExList == NULL) { + stderror(); + return NULL; + } + regExList->regex = NULL; + regExList->next = NULL; + + return regExList; +} + +int32_t addRegExToRegExList(struct sRegExList *regExList, const char *regExStr) { +/* + insert new regular expression into directory path list +*/ + assert(regExList != NULL); + assert(regExList->regex == NULL); + assert(regExStr != NULL); + + int32_t ret; + char errbuf[128]; + + // find end of list + while (regExList->next != NULL) { + regExList = regExList->next; + } + + // allocate memory for new entry + regExList->next=malloc(sizeof(struct sRegExList)); + if (regExList->next == NULL) { + stderror(); + return -1; + } + regExList->next->next = NULL; + + // allocate memory for regex + regExList->next->regex=malloc(sizeof(regex_t)); + if (regExList->next->regex == NULL) { + stderror(); + return -1; + } + + // compilete regex + ret=regcomp(regExList->next->regex, regExStr, REG_EXTENDED | REG_NOSUB); + if (ret) { + regerror(ret, regExList->next->regex, errbuf, 128); + myerror("Failed to compile regular expression \"%s\": %s!", regExStr, errbuf); + return -1; + } + + return 0; + +} + +int32_t matchesRegExList(struct sRegExList *regExList, const char *str) { +/* + evaluates whether str matches regular expressions in regExList +*/ + + assert(regExList != NULL); + assert(regExList->regex == NULL); + assert(str != NULL); + + regmatch_t pmatch[0]; + + regExList=regExList->next; + while (regExList != NULL) { + + // return on first match with success + if (!regexec(regExList->regex, str, 0, pmatch, 0)) { + return RETURN_MATCH; + } + + regExList = regExList->next; + } + + return RETURN_NO_MATCH; +} + +void freeRegExList(struct sRegExList *regExList) { +/* + free regExList +*/ + + assert(regExList != NULL); + + struct sRegExList *tmp; + + while (regExList != NULL) { + if (regExList->regex) { + regfree(regExList->regex); + free(regExList->regex); + } + tmp=regExList; + regExList=regExList->next; + free(tmp); + } + +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/src/regexlist.h new/fatsort-1.5.0.456/src/regexlist.h --- old/fatsort-1.4.2.439/src/regexlist.h 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/src/regexlist.h 2018-09-08 22:23:41.000000000 +0200 @@ -0,0 +1,53 @@ +/* + FATSort, utility for sorting FAT directory structures + Copyright (C) 2004 Boris Leidner <fatsort(at)formenos.de> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +/* + This file contains/describes functions to manage lists of regular expressions. +*/ + +#ifndef __regexlist_h__ +#define __regexlist_h__ + +#include <sys/types.h> +#include <regex.h> +#include "platform.h" +#include "FAT_fs.h" + +struct sRegExList { + regex_t *regex; + struct sRegExList *next; +}; + +// defines return values for function matchesRegExList +#define RETURN_NO_MATCH 0 +#define RETURN_MATCH 1 + +// create a new string list +struct sRegExList *newRegExList(); + +// insert new regular expression into directory path list +int32_t addRegExToRegExList(struct sRegExList *regExList, const char *regExStr); + +// evaluates whether str matches regular expressions in regExList +int32_t matchesRegExList(struct sRegExList *regExList, const char *str); + +// free regExList +void freeRegExList(struct sRegExList *regExList); + +#endif //__regexlist_h__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/src/sort.c new/fatsort-1.5.0.456/src/sort.c --- old/fatsort-1.4.2.439/src/sort.c 2017-07-28 22:22:15.000000000 +0200 +++ new/fatsort-1.5.0.456/src/sort.c 2018-09-08 22:23:41.000000000 +0200 @@ -701,7 +701,12 @@ u_int32_t match; - match=matchesDirPathLists(OPT_INCL_DIRS, OPT_INCL_DIRS_REC, OPT_EXCL_DIRS, OPT_EXCL_DIRS_REC, path); + if (!OPT_REGEX) { + match=matchesDirPathLists(OPT_INCL_DIRS, OPT_INCL_DIRS_REC, OPT_EXCL_DIRS, OPT_EXCL_DIRS_REC, path); + } else { + match=!matchesRegExList(OPT_REGEX_EXCL, (const char *) path); + if (OPT_REGEX_INCL->next != NULL) match &= matchesRegExList(OPT_REGEX_INCL, (const char *) path); + } if ((ClusterChain=newClusterChain()) == NULL) { myerror("Failed to generate new ClusterChain!"); @@ -787,11 +792,16 @@ u_int32_t match; - match=matchesDirPathLists(OPT_INCL_DIRS, - OPT_INCL_DIRS_REC, - OPT_EXCL_DIRS, - OPT_EXCL_DIRS_REC, - (const char(*)[MAX_PATH_LEN+1]) "/"); + if (!OPT_REGEX) { + match=matchesDirPathLists(OPT_INCL_DIRS, + OPT_INCL_DIRS_REC, + OPT_EXCL_DIRS, + OPT_EXCL_DIRS_REC, + (const char(*)[MAX_PATH_LEN+1]) "/"); + } else { + match=!matchesRegExList(OPT_REGEX_EXCL, (const char *) "/"); + if (OPT_REGEX_INCL->next != NULL) match &= matchesRegExList(OPT_REGEX_INCL, (const char *) "/"); + } if (!OPT_LIST) { if (match) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/src/stringlist.c new/fatsort-1.5.0.456/src/stringlist.c --- old/fatsort-1.4.2.439/src/stringlist.c 2012-05-12 20:03:57.000000000 +0200 +++ new/fatsort-1.5.0.456/src/stringlist.c 2018-09-08 22:23:41.000000000 +0200 @@ -39,7 +39,7 @@ if (stringList == NULL) { stderror(); return NULL; - } + } stringList->str = NULL; stringList->next = NULL; @@ -53,9 +53,9 @@ assert(stringList != NULL); assert(stringList->str == NULL); assert(str != NULL); - + int32_t len; - + // find end of list while (stringList->next != NULL) { stringList = stringList->next; @@ -68,9 +68,9 @@ return -1; } stringList->next->next = NULL; - + len=strlen(str); - + // allocate memory for string stringList->next->str=malloc(len+1); if (stringList->next->str == NULL) { @@ -82,7 +82,7 @@ stringList->next->str[len] = '\0'; return 0; - + } int32_t matchesStringList(struct sStringList *stringList, const char *str) { @@ -129,4 +129,3 @@ } } - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/src/stringlist.h new/fatsort-1.5.0.456/src/stringlist.h --- old/fatsort-1.4.2.439/src/stringlist.h 2012-05-12 20:03:57.000000000 +0200 +++ new/fatsort-1.5.0.456/src/stringlist.h 2018-09-08 22:23:41.000000000 +0200 @@ -47,15 +47,7 @@ // evaluates whether str is contained in strList int32_t matchesStringList(struct sStringList *stringList, const char *str); -// evaluate whether str matches the include an exclude dir path lists or not -int32_t matchesStringLists(struct sStringList *includes, - struct sStringList *includes_recursion, - struct sStringList *excludes, - struct sStringList *excludes_recursion, - const char *str); - // free string list void freeStringList(struct sStringList *stringList); #endif //__stringlist_h__ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_case_fat12/stdout_expected.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_case_fat12/stdout_expected.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_case_fat12/stdout_expected.txt 2013-05-13 23:07:47.000000000 +0200 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_case_fat12/stdout_expected.txt 2018-09-15 00:12:54.000000000 +0200 @@ -6,8 +6,8 @@ directory2 001c 01b -1 10 +1 1a 2 3 @@ -23,10 +23,10 @@ c d e -f file1.bin file2.bin file3.bin +f g h i @@ -36,15 +36,15 @@ Long file name with lots of words and characters just to test long file name entries in FAT file systems m n -o Ö +o p q r s t -u Ü +u v w x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_case_fat16/stdout_expected.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_case_fat16/stdout_expected.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_case_fat16/stdout_expected.txt 2013-05-13 23:07:47.000000000 +0200 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_case_fat16/stdout_expected.txt 2018-09-15 00:12:54.000000000 +0200 @@ -6,8 +6,8 @@ directory2 001c 01b -1 10 +1 1a 2 3 @@ -23,10 +23,10 @@ c d e -f file1.bin file2.bin file3.bin +f g h i @@ -36,15 +36,15 @@ Long file name with lots of words and characters just to test long file name entries in FAT file systems m n -o Ö +o p q r s t -u Ü +u v w x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_case_fat32/stdout_expected.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_case_fat32/stdout_expected.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_case_fat32/stdout_expected.txt 2013-05-12 22:22:52.000000000 +0200 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_case_fat32/stdout_expected.txt 2018-09-15 00:12:54.000000000 +0200 @@ -6,8 +6,8 @@ directory2 001c 01b -1 10 +1 1a 2 3 @@ -23,10 +23,10 @@ c d e -f file1.bin file2.bin file3.bin +f g h i @@ -36,15 +36,15 @@ Long file name with lots of words and characters just to test long file name entries in FAT file systems m n -o Ö +o p q r s t -u Ü +u v w x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat12/Makefile new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat12/Makefile --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat12/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat12/Makefile 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,88 @@ +include ../testconfig.mk + +FS_FATType=12 +# MiBytes +FS_SIZE=1 +FS_FATs=1 +FS_VOL_NAME=TEST +FS_ROOT_ENTRIES=512 +FS_RSVD_SEC=32 +FS_SEC_PER_CLUS=1 +FS_SEC_SIZE=512 + +DIRECTORIES=directories.txt +FILES=files.txt + +TESTLOG=test.log + +STDOUT=stdout.log +STDOUT_EXP=stdout_expected.txt +STDERR=stderr.log +STDERR_EXP=stderr_expected.txt + +REF_FS_BASENAME=fs.img +REF_FS=$(TMPDIR)/$(REF_FS_BASENAME) +REF_FS_XZ=$(REF_FS_BASENAME).xz +XZ=xz + +all: passed + if [ ${DEL_FS_ON_PASS} -eq 1 ]; then rm -f ${FS_IMG}; fi + +clean: + rm -f passed + rm -fr *.log *.tmp ${FS_IMG} ${TMPFILE} ${TMPDIR} + if [ -d ${MOUNT_POINT} ]; then \ + until sudo umount ${MOUNT_POINT}; do sleep 1; done; \ + rmdir ${MOUNT_POINT}; \ + fi + +# create file system +mkfs: + # ++++++++++ Creating file ${FATType} system ++++++++++ + rm -f ${FS_IMG} + truncate -s ${FS_SIZE}MB ${FS_IMG} + mkfs.vfat -F ${FS_FATType} -f ${FS_FATs} -n ${FS_VOL_NAME} -r ${FS_ROOT_ENTRIES} -R ${FS_RSVD_SEC} -s ${FS_SEC_PER_CLUS} -S ${FS_SEC_SIZE} ${FS_IMG} + +# populate fs +populatefs: mkfs + # ++++++++++ Populating file system with directories and files ++++++++++ + mkdir -p ${MOUNT_POINT} + sudo mount -o loop,codepage=850,iocharset=iso8859-1,utf8,uid=${MOUNT_UID},gid=${MOUNT_GID} ${FS_IMG} ${MOUNT_POINT} + cat ${DIRECTORIES} | while read dir; do mkdir -p "${MOUNT_POINT}/$$dir"; done + cat ${FILES} | while read file; do touch "${MOUNT_POINT}/$$file"; done + # delete some files + until sudo umount ${MOUNT_POINT}; do sleep 1; done + rmdir ${MOUNT_POINT} + +# alter file system as necessary for the test +alterfs: populatefs + # ++++++++++ Altering file system ++++++++++ + # empty here + rm -fr ${TMPFILE} + +reffs: alterfs + ${XZ} -c --stdout ${FS_IMG} >> ${REF_FS_XZ} + rm -f ${FS_IMG} + +$(FS_IMG): $(REF_FS_XZ) + # ++++++++++ Unpacking reference file systen ++++++++++ + mkdir -p $(TMPDIR) + ${XZ} -d -f --stdout ${REF_FS_XZ} >> ${FS_IMG} + +execute: $(FS_IMG) + # ++++++++++ Executing tests ++++++++++ + ${FATSORT} -e "Dir" ${FS_IMG} > ${STDOUT} 2> ${STDERR} + diff ${STDOUT} ${STDOUT_EXP} + diff ${STDERR} ${STDERR_EXP} + +# check result +fsck: execute + # ++++++++++ Checking file system ++++++++++ + fsck.vfat -n ${FS_IMG} + +# test passed +passed: execute + touch passed + +.PHONY: passed fsck execute reffs populatefs mkfs clean + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat12/directories.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat12/directories.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat12/directories.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat12/directories.txt 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,3 @@ +Directory1 +directory2 +dir3/subDir Binary files old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat12/fs.img.xz and new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat12/fs.img.xz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat12/stdout_expected.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat12/stdout_expected.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat12/stdout_expected.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat12/stdout_expected.txt 2018-09-19 20:51:17.000000000 +0200 @@ -0,0 +1,4 @@ +File system: FAT12. + +Sorting directory /dir3/subDir/ +Sorting directory /Directory1/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat16/Makefile new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat16/Makefile --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat16/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat16/Makefile 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,88 @@ +include ../testconfig.mk + +FS_FATType=16 +# MiBytes +FS_SIZE=10 +FS_FATs=1 +FS_VOL_NAME=TEST +FS_ROOT_ENTRIES=512 +FS_RSVD_SEC=32 +FS_SEC_PER_CLUS=1 +FS_SEC_SIZE=512 + +DIRECTORIES=directories.txt +FILES=files.txt + +TESTLOG=test.log + +STDOUT=stdout.log +STDOUT_EXP=stdout_expected.txt +STDERR=stderr.log +STDERR_EXP=stderr_expected.txt + +REF_FS_BASENAME=fs.img +REF_FS=$(TMPDIR)/$(REF_FS_BASENAME) +REF_FS_XZ=$(REF_FS_BASENAME).xz +XZ=xz + +all: passed + if [ ${DEL_FS_ON_PASS} -eq 1 ]; then rm -f ${FS_IMG}; fi + +clean: + rm -f passed + rm -fr *.log *.tmp ${FS_IMG} ${TMPFILE} ${TMPDIR} + if [ -d ${MOUNT_POINT} ]; then \ + until sudo umount ${MOUNT_POINT}; do sleep 1; done; \ + rmdir ${MOUNT_POINT}; \ + fi + +# create file system +mkfs: + # ++++++++++ Creating file ${FATType} system ++++++++++ + rm -f ${FS_IMG} + truncate -s ${FS_SIZE}MB ${FS_IMG} + mkfs.vfat -F ${FS_FATType} -f ${FS_FATs} -n ${FS_VOL_NAME} -r ${FS_ROOT_ENTRIES} -R ${FS_RSVD_SEC} -s ${FS_SEC_PER_CLUS} -S ${FS_SEC_SIZE} ${FS_IMG} + +# populate fs +populatefs: mkfs + # ++++++++++ Populating file system with directories and files ++++++++++ + mkdir -p ${MOUNT_POINT} + sudo mount -o loop,codepage=850,iocharset=iso8859-1,utf8,uid=${MOUNT_UID},gid=${MOUNT_GID} ${FS_IMG} ${MOUNT_POINT} + cat ${DIRECTORIES} | while read dir; do mkdir -p "${MOUNT_POINT}/$$dir"; done + cat ${FILES} | while read file; do touch "${MOUNT_POINT}/$$file"; done + # delete some files + until sudo umount ${MOUNT_POINT}; do sleep 1; done + rmdir ${MOUNT_POINT} + +# alter file system as necessary for the test +alterfs: populatefs + # ++++++++++ Altering file system ++++++++++ + # empty here + rm -fr ${TMPFILE} + +reffs: alterfs + ${XZ} -c --stdout ${FS_IMG} >> ${REF_FS_XZ} + rm -f ${FS_IMG} + +$(FS_IMG): $(REF_FS_XZ) + # ++++++++++ Unpacking reference file systen ++++++++++ + mkdir -p $(TMPDIR) + ${XZ} -d -f --stdout ${REF_FS_XZ} >> ${FS_IMG} + +execute: $(FS_IMG) + # ++++++++++ Executing tests ++++++++++ + ${FATSORT} -e "Dir" ${FS_IMG} > ${STDOUT} 2> ${STDERR} + diff ${STDOUT} ${STDOUT_EXP} + diff ${STDERR} ${STDERR_EXP} + +# check result +fsck: execute + # ++++++++++ Checking file system ++++++++++ + fsck.vfat -n ${FS_IMG} + +# test passed +passed: execute + touch passed + +.PHONY: passed fsck execute reffs populatefs mkfs clean + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat16/directories.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat16/directories.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat16/directories.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat16/directories.txt 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,3 @@ +Directory1 +directory2 +dir3/subDir Binary files old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat16/fs.img.xz and new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat16/fs.img.xz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat16/stdout_expected.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat16/stdout_expected.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat16/stdout_expected.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat16/stdout_expected.txt 2018-09-19 20:51:17.000000000 +0200 @@ -0,0 +1,4 @@ +File system: FAT16. + +Sorting directory /dir3/subDir/ +Sorting directory /Directory1/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat32/Makefile new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat32/Makefile --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat32/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat32/Makefile 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,88 @@ +include ../testconfig.mk + +FS_FATType=32 +# MiBytes +FS_SIZE=100 +FS_FATs=1 +FS_VOL_NAME=TEST +FS_ROOT_ENTRIES=512 +FS_RSVD_SEC=32 +FS_SEC_PER_CLUS=1 +FS_SEC_SIZE=512 + +DIRECTORIES=directories.txt +FILES=files.txt + +TESTLOG=test.log + +STDOUT=stdout.log +STDOUT_EXP=stdout_expected.txt +STDERR=stderr.log +STDERR_EXP=stderr_expected.txt + +REF_FS_BASENAME=fs.img +REF_FS=$(TMPDIR)/$(REF_FS_BASENAME) +REF_FS_XZ=$(REF_FS_BASENAME).xz +XZ=xz + +all: passed + if [ ${DEL_FS_ON_PASS} -eq 1 ]; then rm -f ${FS_IMG}; fi + +clean: + rm -f passed + rm -fr *.log *.tmp ${FS_IMG} ${TMPFILE} ${TMPDIR} + if [ -d ${MOUNT_POINT} ]; then \ + until sudo umount ${MOUNT_POINT}; do sleep 1; done; \ + rmdir ${MOUNT_POINT}; \ + fi + +# create file system +mkfs: + # ++++++++++ Creating file ${FATType} system ++++++++++ + rm -f ${FS_IMG} + truncate -s ${FS_SIZE}MB ${FS_IMG} + mkfs.vfat -F ${FS_FATType} -f ${FS_FATs} -n ${FS_VOL_NAME} -r ${FS_ROOT_ENTRIES} -R ${FS_RSVD_SEC} -s ${FS_SEC_PER_CLUS} -S ${FS_SEC_SIZE} ${FS_IMG} + +# populate fs +populatefs: mkfs + # ++++++++++ Populating file system with directories and files ++++++++++ + mkdir -p ${MOUNT_POINT} + sudo mount -o loop,codepage=850,iocharset=iso8859-1,utf8,uid=${MOUNT_UID},gid=${MOUNT_GID} ${FS_IMG} ${MOUNT_POINT} + cat ${DIRECTORIES} | while read dir; do mkdir -p "${MOUNT_POINT}/$$dir"; done + cat ${FILES} | while read file; do touch "${MOUNT_POINT}/$$file"; done + # delete some files + until sudo umount ${MOUNT_POINT}; do sleep 1; done + rmdir ${MOUNT_POINT} + +# alter file system as necessary for the test +alterfs: populatefs + # ++++++++++ Altering file system ++++++++++ + # empty here + rm -fr ${TMPFILE} + +reffs: alterfs + ${XZ} -c --stdout ${FS_IMG} >> ${REF_FS_XZ} + rm -f ${FS_IMG} + +$(FS_IMG): $(REF_FS_XZ) + # ++++++++++ Unpacking reference file systen ++++++++++ + mkdir -p $(TMPDIR) + ${XZ} -d -f --stdout ${REF_FS_XZ} >> ${FS_IMG} + +execute: $(FS_IMG) + # ++++++++++ Executing tests ++++++++++ + ${FATSORT} -e "Dir" ${FS_IMG} > ${STDOUT} 2> ${STDERR} + diff ${STDOUT} ${STDOUT_EXP} + diff ${STDERR} ${STDERR_EXP} + +# check result +fsck: execute + # ++++++++++ Checking file system ++++++++++ + fsck.vfat -n ${FS_IMG} + +# test passed +passed: execute + touch passed + +.PHONY: passed fsck execute reffs populatefs mkfs clean + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat32/directories.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat32/directories.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat32/directories.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat32/directories.txt 2018-09-18 21:45:59.000000000 +0200 @@ -0,0 +1,3 @@ +Directory1 +directory2 +dir3/subDir Binary files old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat32/fs.img.xz and new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat32/fs.img.xz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat32/stdout_expected.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat32/stdout_expected.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex1_fat32/stdout_expected.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex1_fat32/stdout_expected.txt 2018-09-18 21:45:59.000000000 +0200 @@ -0,0 +1,4 @@ +File system: FAT32. + +Sorting directory /dir3/subDir/ +Sorting directory /Directory1/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat12/Makefile new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat12/Makefile --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat12/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat12/Makefile 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,88 @@ +include ../testconfig.mk + +FS_FATType=12 +# MiBytes +FS_SIZE=1 +FS_FATs=1 +FS_VOL_NAME=TEST +FS_ROOT_ENTRIES=512 +FS_RSVD_SEC=32 +FS_SEC_PER_CLUS=1 +FS_SEC_SIZE=512 + +DIRECTORIES=directories.txt +FILES=files.txt + +TESTLOG=test.log + +STDOUT=stdout.log +STDOUT_EXP=stdout_expected.txt +STDERR=stderr.log +STDERR_EXP=stderr_expected.txt + +REF_FS_BASENAME=fs.img +REF_FS=$(TMPDIR)/$(REF_FS_BASENAME) +REF_FS_XZ=$(REF_FS_BASENAME).xz +XZ=xz + +all: passed + if [ ${DEL_FS_ON_PASS} -eq 1 ]; then rm -f ${FS_IMG}; fi + +clean: + rm -f passed + rm -fr *.log *.tmp ${FS_IMG} ${TMPFILE} ${TMPDIR} + if [ -d ${MOUNT_POINT} ]; then \ + until sudo umount ${MOUNT_POINT}; do sleep 1; done; \ + rmdir ${MOUNT_POINT}; \ + fi + +# create file system +mkfs: + # ++++++++++ Creating file ${FATType} system ++++++++++ + rm -f ${FS_IMG} + truncate -s ${FS_SIZE}MB ${FS_IMG} + mkfs.vfat -F ${FS_FATType} -f ${FS_FATs} -n ${FS_VOL_NAME} -r ${FS_ROOT_ENTRIES} -R ${FS_RSVD_SEC} -s ${FS_SEC_PER_CLUS} -S ${FS_SEC_SIZE} ${FS_IMG} + +# populate fs +populatefs: mkfs + # ++++++++++ Populating file system with directories and files ++++++++++ + mkdir -p ${MOUNT_POINT} + sudo mount -o loop,codepage=850,iocharset=iso8859-1,utf8,uid=${MOUNT_UID},gid=${MOUNT_GID} ${FS_IMG} ${MOUNT_POINT} + cat ${DIRECTORIES} | while read dir; do mkdir -p "${MOUNT_POINT}/$$dir"; done + cat ${FILES} | while read file; do touch "${MOUNT_POINT}/$$file"; done + # delete some files + until sudo umount ${MOUNT_POINT}; do sleep 1; done + rmdir ${MOUNT_POINT} + +# alter file system as necessary for the test +alterfs: populatefs + # ++++++++++ Altering file system ++++++++++ + # empty here + rm -fr ${TMPFILE} + +reffs: alterfs + ${XZ} -c --stdout ${FS_IMG} >> ${REF_FS_XZ} + rm -f ${FS_IMG} + +$(FS_IMG): $(REF_FS_XZ) + # ++++++++++ Unpacking reference file systen ++++++++++ + mkdir -p $(TMPDIR) + ${XZ} -d -f --stdout ${REF_FS_XZ} >> ${FS_IMG} + +execute: $(FS_IMG) + # ++++++++++ Executing tests ++++++++++ + ${FATSORT} -e "^/[ABD]/" -E "B" ${FS_IMG} > ${STDOUT} 2> ${STDERR} + diff ${STDOUT} ${STDOUT_EXP} + diff ${STDERR} ${STDERR_EXP} + +# check result +fsck: execute + # ++++++++++ Checking file system ++++++++++ + fsck.vfat -n ${FS_IMG} + +# test passed +passed: execute + touch passed + +.PHONY: passed fsck execute reffs populatefs mkfs clean + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat12/directories.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat12/directories.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat12/directories.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat12/directories.txt 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,15 @@ +A +B +C +D +A/A +A/B +A/C +B/A +B/B +B/C +C/A +C/B +C/C +C/D +C/D/E Binary files old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat12/fs.img.xz and new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat12/fs.img.xz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat12/stdout_expected.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat12/stdout_expected.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat12/stdout_expected.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat12/stdout_expected.txt 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,6 @@ +File system: FAT12. + +Sorting directory /A/ +Sorting directory /A/A/ +Sorting directory /A/C/ +Sorting directory /D/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat16/Makefile new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat16/Makefile --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat16/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat16/Makefile 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,88 @@ +include ../testconfig.mk + +FS_FATType=16 +# MiBytes +FS_SIZE=10 +FS_FATs=1 +FS_VOL_NAME=TEST +FS_ROOT_ENTRIES=512 +FS_RSVD_SEC=32 +FS_SEC_PER_CLUS=1 +FS_SEC_SIZE=512 + +DIRECTORIES=directories.txt +FILES=files.txt + +TESTLOG=test.log + +STDOUT=stdout.log +STDOUT_EXP=stdout_expected.txt +STDERR=stderr.log +STDERR_EXP=stderr_expected.txt + +REF_FS_BASENAME=fs.img +REF_FS=$(TMPDIR)/$(REF_FS_BASENAME) +REF_FS_XZ=$(REF_FS_BASENAME).xz +XZ=xz + +all: passed + if [ ${DEL_FS_ON_PASS} -eq 1 ]; then rm -f ${FS_IMG}; fi + +clean: + rm -f passed + rm -fr *.log *.tmp ${FS_IMG} ${TMPFILE} ${TMPDIR} + if [ -d ${MOUNT_POINT} ]; then \ + until sudo umount ${MOUNT_POINT}; do sleep 1; done; \ + rmdir ${MOUNT_POINT}; \ + fi + +# create file system +mkfs: + # ++++++++++ Creating file ${FATType} system ++++++++++ + rm -f ${FS_IMG} + truncate -s ${FS_SIZE}MB ${FS_IMG} + mkfs.vfat -F ${FS_FATType} -f ${FS_FATs} -n ${FS_VOL_NAME} -r ${FS_ROOT_ENTRIES} -R ${FS_RSVD_SEC} -s ${FS_SEC_PER_CLUS} -S ${FS_SEC_SIZE} ${FS_IMG} + +# populate fs +populatefs: mkfs + # ++++++++++ Populating file system with directories and files ++++++++++ + mkdir -p ${MOUNT_POINT} + sudo mount -o loop,codepage=850,iocharset=iso8859-1,utf8,uid=${MOUNT_UID},gid=${MOUNT_GID} ${FS_IMG} ${MOUNT_POINT} + cat ${DIRECTORIES} | while read dir; do mkdir -p "${MOUNT_POINT}/$$dir"; done + cat ${FILES} | while read file; do touch "${MOUNT_POINT}/$$file"; done + # delete some files + until sudo umount ${MOUNT_POINT}; do sleep 1; done + rmdir ${MOUNT_POINT} + +# alter file system as necessary for the test +alterfs: populatefs + # ++++++++++ Altering file system ++++++++++ + # empty here + rm -fr ${TMPFILE} + +reffs: alterfs + ${XZ} -c --stdout ${FS_IMG} >> ${REF_FS_XZ} + rm -f ${FS_IMG} + +$(FS_IMG): $(REF_FS_XZ) + # ++++++++++ Unpacking reference file systen ++++++++++ + mkdir -p $(TMPDIR) + ${XZ} -d -f --stdout ${REF_FS_XZ} >> ${FS_IMG} + +execute: $(FS_IMG) + # ++++++++++ Executing tests ++++++++++ + ${FATSORT} -e "^/[ABD]/" -E "B" ${FS_IMG} > ${STDOUT} 2> ${STDERR} + diff ${STDOUT} ${STDOUT_EXP} + diff ${STDERR} ${STDERR_EXP} + +# check result +fsck: execute + # ++++++++++ Checking file system ++++++++++ + fsck.vfat -n ${FS_IMG} + +# test passed +passed: execute + touch passed + +.PHONY: passed fsck execute reffs alterfs populatefs mkfs clean + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat16/directories.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat16/directories.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat16/directories.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat16/directories.txt 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,15 @@ +A +B +C +D +A/A +A/B +A/C +B/A +B/B +B/C +C/A +C/B +C/C +C/D +C/D/E Binary files old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat16/fs.img.xz and new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat16/fs.img.xz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat16/stdout_expected.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat16/stdout_expected.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat16/stdout_expected.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat16/stdout_expected.txt 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,6 @@ +File system: FAT16. + +Sorting directory /A/ +Sorting directory /A/A/ +Sorting directory /A/C/ +Sorting directory /D/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat32/Makefile new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat32/Makefile --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat32/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat32/Makefile 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,88 @@ +include ../testconfig.mk + +FS_FATType=32 +# MiBytes +FS_SIZE=100 +FS_FATs=1 +FS_VOL_NAME=TEST +FS_ROOT_ENTRIES=512 +FS_RSVD_SEC=32 +FS_SEC_PER_CLUS=1 +FS_SEC_SIZE=512 + +DIRECTORIES=directories.txt +FILES=files.txt + +TESTLOG=test.log + +STDOUT=stdout.log +STDOUT_EXP=stdout_expected.txt +STDERR=stderr.log +STDERR_EXP=stderr_expected.txt + +REF_FS_BASENAME=fs.img +REF_FS=$(TMPDIR)/$(REF_FS_BASENAME) +REF_FS_XZ=$(REF_FS_BASENAME).xz +XZ=xz + +all: passed + if [ ${DEL_FS_ON_PASS} -eq 1 ]; then rm -f ${FS_IMG}; fi + +clean: + rm -f passed + rm -fr *.log *.tmp ${FS_IMG} ${TMPFILE} ${TMPDIR} + if [ -d ${MOUNT_POINT} ]; then \ + until sudo umount ${MOUNT_POINT}; do sleep 1; done; \ + rmdir ${MOUNT_POINT}; \ + fi + +# create file system +mkfs: + # ++++++++++ Creating file ${FATType} system ++++++++++ + rm -f ${FS_IMG} + truncate -s ${FS_SIZE}MB ${FS_IMG} + mkfs.vfat -F ${FS_FATType} -f ${FS_FATs} -n ${FS_VOL_NAME} -r ${FS_ROOT_ENTRIES} -R ${FS_RSVD_SEC} -s ${FS_SEC_PER_CLUS} -S ${FS_SEC_SIZE} ${FS_IMG} + +# populate fs +populatefs: mkfs + # ++++++++++ Populating file system with directories and files ++++++++++ + mkdir -p ${MOUNT_POINT} + sudo mount -o loop,codepage=850,iocharset=iso8859-1,utf8,uid=${MOUNT_UID},gid=${MOUNT_GID} ${FS_IMG} ${MOUNT_POINT} + cat ${DIRECTORIES} | while read dir; do mkdir -p "${MOUNT_POINT}/$$dir"; done + cat ${FILES} | while read file; do touch "${MOUNT_POINT}/$$file"; done + # delete some files + until sudo umount ${MOUNT_POINT}; do sleep 1; done + rmdir ${MOUNT_POINT} + +# alter file system as necessary for the test +alterfs: populatefs + # ++++++++++ Altering file system ++++++++++ + # empty here + rm -fr ${TMPFILE} + +reffs: alterfs + ${XZ} -c --stdout ${FS_IMG} >> ${REF_FS_XZ} + rm -f ${FS_IMG} + +$(FS_IMG): $(REF_FS_XZ) + # ++++++++++ Unpacking reference file systen ++++++++++ + mkdir -p $(TMPDIR) + ${XZ} -d -f --stdout ${REF_FS_XZ} >> ${FS_IMG} + +execute: $(FS_IMG) + # ++++++++++ Executing tests ++++++++++ + ${FATSORT} -e "^/[ABD]/" -E "B" ${FS_IMG} > ${STDOUT} 2> ${STDERR} + diff ${STDOUT} ${STDOUT_EXP} + diff ${STDERR} ${STDERR_EXP} + +# check result +fsck: execute + # ++++++++++ Checking file system ++++++++++ + fsck.vfat -n ${FS_IMG} + +# test passed +passed: execute + touch passed + +.PHONY: passed fsck execute reffs populatefs mkfs clean + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat32/directories.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat32/directories.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat32/directories.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat32/directories.txt 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,15 @@ +A +B +C +D +A/A +A/B +A/C +B/A +B/B +B/C +C/A +C/B +C/C +C/D +C/D/E Binary files old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat32/fs.img.xz and new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat32/fs.img.xz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat32/stdout_expected.txt new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat32/stdout_expected.txt --- old/fatsort-1.4.2.439/tests/tc_pos_sort_dir_regex2_fat32/stdout_expected.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/fatsort-1.5.0.456/tests/tc_pos_sort_dir_regex2_fat32/stdout_expected.txt 2018-09-19 18:24:49.000000000 +0200 @@ -0,0 +1,6 @@ +File system: FAT32. + +Sorting directory /A/ +Sorting directory /A/A/ +Sorting directory /A/C/ +Sorting directory /D/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/ts_amd64 new/fatsort-1.5.0.456/tests/ts_amd64 --- old/fatsort-1.4.2.439/tests/ts_amd64 2017-08-04 23:14:44.000000000 +0200 +++ new/fatsort-1.5.0.456/tests/ts_amd64 2018-09-19 20:08:59.000000000 +0200 @@ -86,3 +86,9 @@ tc_pos_valgrind_fat12 tc_pos_valgrind_fat16 tc_pos_valgrind_fat32 +tc_pos_sort_dir_regex1_fat12 +tc_pos_sort_dir_regex1_fat16 +tc_pos_sort_dir_regex1_fat32 +tc_pos_sort_dir_regex2_fat12 +tc_pos_sort_dir_regex2_fat16 +tc_pos_sort_dir_regex2_fat32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/ts_arm new/fatsort-1.5.0.456/tests/ts_arm --- old/fatsort-1.4.2.439/tests/ts_arm 2017-08-04 23:14:44.000000000 +0200 +++ new/fatsort-1.5.0.456/tests/ts_arm 2018-09-19 20:08:59.000000000 +0200 @@ -83,3 +83,9 @@ tc_pos_three_fats_fat12 tc_pos_three_fats_fat16 tc_pos_three_fats_fat32 +tc_pos_sort_dir_regex1_fat12 +tc_pos_sort_dir_regex1_fat16 +tc_pos_sort_dir_regex1_fat32 +tc_pos_sort_dir_regex2_fat12 +tc_pos_sort_dir_regex2_fat16 +tc_pos_sort_dir_regex2_fat32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/ts_i386 new/fatsort-1.5.0.456/tests/ts_i386 --- old/fatsort-1.4.2.439/tests/ts_i386 2017-08-04 23:14:44.000000000 +0200 +++ new/fatsort-1.5.0.456/tests/ts_i386 2018-09-19 20:08:59.000000000 +0200 @@ -86,3 +86,9 @@ tc_pos_valgrind_fat12 tc_pos_valgrind_fat16 tc_pos_valgrind_fat32 +tc_pos_sort_dir_regex1_fat12 +tc_pos_sort_dir_regex1_fat16 +tc_pos_sort_dir_regex1_fat32 +tc_pos_sort_dir_regex2_fat12 +tc_pos_sort_dir_regex2_fat16 +tc_pos_sort_dir_regex2_fat32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/ts_ppc new/fatsort-1.5.0.456/tests/ts_ppc --- old/fatsort-1.4.2.439/tests/ts_ppc 2017-08-05 02:45:43.000000000 +0200 +++ new/fatsort-1.5.0.456/tests/ts_ppc 2018-09-19 20:08:59.000000000 +0200 @@ -83,3 +83,9 @@ tc_pos_three_fats_fat12 tc_pos_three_fats_fat16 tc_pos_three_fats_fat32 +tc_pos_sort_dir_regex1_fat12 +tc_pos_sort_dir_regex1_fat16 +tc_pos_sort_dir_regex1_fat32 +tc_pos_sort_dir_regex2_fat12 +tc_pos_sort_dir_regex2_fat16 +tc_pos_sort_dir_regex2_fat32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatsort-1.4.2.439/tests/ts_ppc64le new/fatsort-1.5.0.456/tests/ts_ppc64le --- old/fatsort-1.4.2.439/tests/ts_ppc64le 2017-08-05 01:18:22.000000000 +0200 +++ new/fatsort-1.5.0.456/tests/ts_ppc64le 2018-09-19 20:08:59.000000000 +0200 @@ -83,3 +83,9 @@ tc_pos_three_fats_fat12 tc_pos_three_fats_fat16 tc_pos_three_fats_fat32 +tc_pos_sort_dir_regex1_fat12 +tc_pos_sort_dir_regex1_fat16 +tc_pos_sort_dir_regex1_fat32 +tc_pos_sort_dir_regex2_fat12 +tc_pos_sort_dir_regex2_fat16 +tc_pos_sort_dir_regex2_fat32