]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 'refs/heads/t/attribute_fix'
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 10 Apr 2016 21:46:02 +0000 (23:46 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 10 Apr 2016 21:46:02 +0000 (23:46 +0200)
com_setatt() was broken if more than 32 attributes are defined. The
branch merged in this commit contains a fix for this bug, and a new
test that exercises the code related to attributes.

Was cooking in next for six weeks.

* refs/heads/t/attribute_fix:
  manual: Add realpath to list of packages.
  Add test that exercises attribute code.
  test-lib: Canonicalize test_dir.
  attribute: Avoid shifting 32 bit integers.

attribute.c
t/t0004-server.sh
t/test-lib.sh
web/manual.m4

index f3f8ea7a45d0fb1136827cc19c8a715fdd3773a6..4cb2982860de78dd26b9fc55ad552c73a7ca1b9f 100644 (file)
@@ -437,13 +437,13 @@ err:
 
 static int att_logical_or(struct osl_row *row, void *data)
 {
-       uint64_t *att_mask = data;
+       uint64_t *att_mask = data, one = 1;
        struct osl_object bitnum_obj;
        int ret = osl_get_object(attribute_table, row, ATTCOL_BITNUM, &bitnum_obj);
 
        if (ret < 0)
                return ret;
-       *att_mask |= 1 << *(unsigned char *)bitnum_obj.data;
+       *att_mask |= one << *(unsigned char *)bitnum_obj.data;
        return 0;
 }
 
index 76128512bca28b7fba427cdb4b36b446629472cd..3cb37d4260cf21fb3ec83109642642cf67bc1f52 100755 (executable)
@@ -48,6 +48,30 @@ required_objects[$i]='ogg_afh'
 cmdline[$i]="ls -l=v ${oggs_base[@]}"
 good[$i]='^basename:'
 
+let i++
+commands[$i]='addatt'
+required_objects[$i]=''
+cmdline[$i]="addatt $(seq 64 | tr '\n' ' ')"
+bad[$i]='.'
+
+let i++
+commands[$i]='lsatt'
+required_objects[$i]=''
+cmdline[$i]="lsatt"
+good[$i]='^1$'
+
+let i++
+commands[$i]='setatt'
+required_objects[$i]='ogg_afh'
+cmdline[$i]="setatt 33+ ${oggs[@]}"
+bad[$i]='.'
+
+let i++
+commands[$i]="ls"
+required_objects[$i]='ogg_afh'
+cmdline[$i]="ls -l=v -p ${oggs[@]}"
+good[$i]='^attributes_txt: 33'
+
 let i++
 commands[$i]="term"
 cmdline[$i]="term"
index 0e702b53c9b4c4150418dc0e2a07e55949817b04..99e575d3b66d0f54e9746647eee1af4eba84fa2c 100644 (file)
@@ -272,7 +272,7 @@ fixup_dirs()
 {
        local wd=$(pwd)
 
-       test_dir="$wd/${0%/*}"
+       test_dir="$(realpath $wd/${0%/*})"
        test_audio_file_dir="$test_dir/audio_files"
 
        [[ -z "$o_results_dir" ]] && o_results_dir="$test_dir/test-results"
index 59abc5385f9eb5cdcc4a21bfbdb6a30567fa6b90..addc24589b9fb5958273b54d6542edce1c2615b8 100644 (file)
@@ -208,7 +208,7 @@ For the impatient:
        cd osl && make && sudo make install && sudo ldconfig
        sudo apt-get install autoconf libssl-dev help2man gengetopt \
               libmad0-dev libid3tag0-dev libasound2-dev libvorbis-dev \
-              libfaad-dev libspeex-dev libFLAC-dev libsamplerate-dev \
+              libfaad-dev libspeex-dev libFLAC-dev libsamplerate-dev realpath \
               libasound2-dev libao-dev libreadline-dev libncurses-dev \
               libopus-dev